1 #ifndef PASSWORDDIALOG_H_
2 #define PASSWORDDIALOG_H_
9 //! UserInterface class. Responsible for poping-up password query on the screen.
11 * UserInterface class. Responsible for poping-up password query on the screen. The class is used
12 * through static method, just like the QMessageBox in the standard Qt library.
14 class PasswordDialog : public QDialog
19 //! Enumeration of password authenticity.
21 * Password authenticity.
25 Correct, /*!< Correct password. */
26 Incorrect, /*!< Incorrect password. */
30 //! Creates a new PasswordDialog instance and shows the dialog on the screen.
32 * Creates a new Password query dialog.
33 * \param aParent The parent object.
34 * \param aPassword The password.
35 * \param aText Optional. Text displayed in the dialog.
36 * \param aTitle Optional. Dialog title, defaults to "Enter password".
37 * \return The instance which was created.
38 static PasswordDialog * query( QWidget *aParent, const QString &aPassword,
39 const QString &aText = 0, const QString &aTitle = 0 );
43 //! Signals the authenticity of the password when the uuser dismisses the dialog.
45 * The signal is emitted if user presses a key available for the dialog.
46 * \param aStatus Password authenticity.
48 void passwordEntered( PasswordDialog::PasswordStatus aStatus );
51 void okButtonPressed();
52 void cancelButtonPressed();
57 * Constructor to initialize a PasswordDialog instance.
58 * \param aParent The parent object.
59 * \param aPassword The password.
61 PasswordDialog( const QString &aPassword, const QString &aText, const QString &aTitle = "", QWidget *aParent = 0 );
63 virtual ~PasswordDialog();
65 QLineEdit *iPasswordEdit;
66 QByteArray iPasswordHash;
69 #endif /*PASSWORDDIALOG_H_*/