1 #ifndef PASSWORDDIALOG_H_
2 #define PASSWORDDIALOG_H_
10 //! UserInterface class. Responsible for poping-up password query on the screen.
12 * UserInterface class. Responsible for poping-up password query on the screen. The class is used
13 * through static method, just like the QMessageBox in the standard Qt library.
15 class PasswordDialog : public QDialog
20 //! Enumeration of password authenticity.
22 * Password authenticity.
26 Correct, /*!< Correct password. */
27 Incorrect, /*!< Incorrect password. */
33 * Constructor to initialize a PasswordDialog instance.
34 * \param aParent The parent object.
35 * \param aPassword The password.
37 PasswordDialog( const QString &aPassword, const QString &aText, const QString &aTitle = "", QWidget *aParent = 0 );
39 virtual ~PasswordDialog();
40 //! Updates the text of the password dialog label.
42 * Updates the text of the password dialog label.
43 * \param aText The text for the label.
45 void update( const QString &aText );
48 //! Signals the authenticity of the password when the uuser dismisses the dialog.
50 * The signal is emitted if user presses a key available for the dialog.
51 * \param aStatus Password authenticity.
53 void passwordEntered( PasswordDialog::PasswordStatus aStatus );
56 void okButtonPressed();
57 void cancelButtonPressed();
60 QLineEdit *iPasswordEdit;
62 QByteArray iPasswordHash;
65 #endif /*PASSWORDDIALOG_H_*/