diff options
Diffstat (limited to 'src/AuthDialog.h')
-rw-r--r-- | src/AuthDialog.h | 78 |
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 + |