summaryrefslogtreecommitdiffstats
path: root/src/AuthDialog.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2021-12-28 09:48:56 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-12-28 09:59:28 +0900
commiteb684d7fa3c107977074672615c957086e7e9088 (patch)
tree60a255e522fa34a81aab3a701b2859454f09175e /src/AuthDialog.h
parentab12cfe230b06ba2a4505e681d7b8ce6ea35fb34 (diff)
downloadpolkit-agent-tde-eb684d7fa3c107977074672615c957086e7e9088.tar.gz
polkit-agent-tde-eb684d7fa3c107977074672615c957086e7e9088.zip
Conversion of package functionality.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/AuthDialog.h')
-rw-r--r--src/AuthDialog.h78
1 files changed, 38 insertions, 40 deletions
diff --git a/src/AuthDialog.h b/src/AuthDialog.h
index 7aa42eb..9c8cb65 100644
--- a/src/AuthDialog.h
+++ b/src/AuthDialog.h
@@ -1,4 +1,4 @@
-/* This file is part of the KDE project
+/* This file is part of the TDE project
Copyright (C) 2007-2008 Gökçen Eraslan <gokcen@pardus.org.tr>
Copyright (C) 2008 Daniel Nicoletti <dantti85-pk@yahoo.com.br>
Copyright (C) 2010 Dario Freddi <drf@kde.org>
@@ -17,74 +17,72 @@
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
-
*/
#ifndef AUTHDIALOG_H
#define AUTHDIALOG_H
-#include "ui_AuthDialog.h"
-#include "ui_authdetails.h"
+#include <kdialogbase.h>
+#include "AuthDetailsWidget.h"
-#include <PolkitTQt1/Identity>
-#include <PolkitTQt1/ActionDescription>
+#include <PolkitTQt/Identity>
+#include <PolkitTQt/ActionDescription>
-namespace PolkitTQt1
+namespace PolkitTQt
{
class Details;
}
-class AuthDialog : public KDialog, private Ui::AuthDialog
+class AuthDialogWidget;
+
+class AuthDialog : public KDialogBase
{
- Q_OBJECT
-public:
- AuthDialog(const TQString &actionId,
- const TQString &message,
- const TQString &iconName,
- const PolkitTQt1::Details &details,
- const PolkitTQt1::Identity::List &identities,
- WId parent);
+ Q_OBJECT
+
+ public:
+ AuthDialog(const TQString &actionId, const TQString &message,
+ const TQString &iconName, const PolkitTQt::Details &details,
+ const PolkitTQt::Identity::List &identities);
~AuthDialog();
void setRequest(const TQString &request, bool requiresAdmin);
void setOptions();
- TQString password() const;
void authenticationFailure();
+ TQString password() const;
+ PolkitTQt::Identity adminUserSelected() const;
- PolkitTQt1::Identity adminUserSelected() const;
-
- PolkitTQt1::ActionDescription m_actionDescription;
+ PolkitTQt::ActionDescription m_actionDescription;
-signals:
- void adminUserSelected(PolkitTQt1::Identity);
+ signals:
+ void adminUserSelected(const PolkitTQt::Identity&);
-public slots:
+ public slots:
virtual void accept();
-private slots:
+ private slots:
void on_userCB_currentIndexChanged(int index);
- void notificationActivated(unsigned int action);
-private:
+ private:
TQString m_appname;
TQString m_message;
+ AuthDialogWidget *m_authWidget;
+ TQStringList m_userData;
- void createUserCB(const PolkitTQt1::Identity::List &identities);
- void showEvent(TQShowEvent *);
+ void createUserCB(const PolkitTQt::Identity::List &identities);
};
-class AuthDetails : public TQWidget, private Ui::AuthDetails
+class AuthDetails : public AuthDetailsWidget
{
- Q_OBJECT
-public:
- AuthDetails(const PolkitTQt1::Details &details,
- const PolkitTQt1::ActionDescription &actionDescription,
- const TQString &appname,
- TQWidget *parent);
-
-private slots:
- void openUrl(const TQString&);
- void openAction(const TQString&);
+ Q_OBJECT
+
+ public:
+ AuthDetails(const PolkitTQt::Details &details,
+ const PolkitTQt::ActionDescription &actionDescription,
+ const TQString &appname, TQWidget *parent);
+
+ private slots:
+ void openUrl(const TQString &url);
};
-#endif // AUTHDIALOG_H
+#endif
+