Changeset View
Changeset View
Standalone View
Standalone View
src/passworddialog.h
Show All 17 Lines | |||||
18 | 18 | | |||
19 | #ifndef PASSWORD_DIALOG_H | 19 | #ifndef PASSWORD_DIALOG_H | ||
20 | #define PASSWORD_DIALOG_H | 20 | #define PASSWORD_DIALOG_H | ||
21 | 21 | | |||
22 | #include "ui_password.h" | 22 | #include "ui_password.h" | ||
23 | 23 | | |||
24 | #include <pwquality.h> | 24 | #include <pwquality.h> | ||
25 | 25 | | |||
26 | #include <kdialog.h> | 26 | #include <QDialog> | ||
27 | class QDialogButtonBox; | ||||
28 | | ||||
27 | 29 | | |||
28 | class QTimer; | 30 | class QTimer; | ||
29 | class PasswordDialog : public KDialog, private Ui::PasswordDlg | 31 | class PasswordDialog : public QDialog, private Ui::PasswordDlg | ||
30 | { | 32 | { | ||
31 | Q_OBJECT | 33 | Q_OBJECT | ||
32 | 34 | | |||
33 | public: | 35 | public: | ||
34 | explicit PasswordDialog(QWidget* parent = 0, Qt::WindowFlags flags = 0); | 36 | explicit PasswordDialog(QWidget* parent = 0, Qt::WindowFlags flags = 0); | ||
35 | virtual ~PasswordDialog(); | 37 | virtual ~PasswordDialog(); | ||
36 | 38 | | |||
37 | void setUsername(const QByteArray &username); | 39 | void setUsername(const QByteArray &username); | ||
38 | QString password() const; | 40 | QString password() const; | ||
39 | private Q_SLOTS: | 41 | private Q_SLOTS: | ||
40 | void passwordChanged(); | 42 | void passwordChanged(); | ||
41 | void checkPassword(); | 43 | void checkPassword(); | ||
42 | 44 | | |||
43 | private: | 45 | private: | ||
44 | QString errorString(int error); | 46 | QString errorString(int error); | ||
45 | QPalette m_negative; | 47 | QPalette m_negative; | ||
46 | QPalette m_neutral; | 48 | QPalette m_neutral; | ||
47 | QPalette m_positive; | 49 | QPalette m_positive; | ||
50 | QDialogButtonBox *buttons; | ||||
48 | 51 | | |||
49 | pwquality_settings_t *m_pwSettings; | 52 | pwquality_settings_t *m_pwSettings; | ||
50 | QByteArray m_username; | 53 | QByteArray m_username; | ||
51 | QTimer *m_timer; | 54 | QTimer *m_timer; | ||
52 | }; | 55 | }; | ||
53 | 56 | | |||
54 | #endif //PASSWORD_DIALOG_H | 57 | #endif //PASSWORD_DIALOG_H | ||
55 | No newline at end of file | |