Corrected the password dialog and progress bar related errors. Texts and titles of...
[qtmeetings] / src / UserInterface / Utils / PasswordDialog.h
1 #ifndef PASSWORDDIALOG_H_
2 #define PASSWORDDIALOG_H_
3
4 #include <QDialog>
5
6 class QLineEdit;
7 class QLabel;
8 class QByteArray;
9
10 //! UserInterface class. Responsible for poping-up password query on the screen.
11 /*!
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.
14  */
15 class PasswordDialog : public QDialog
16 {
17         Q_OBJECT
18
19 public:
20         //! Enumeration of password authenticity.
21         /*!
22          * Password authenticity.
23          */
24         enum PasswordStatus
25         {
26                 Correct, /*!< Correct password. */
27                 Incorrect, /*!< Incorrect password. */
28                 Canceled
29         };
30         
31         //! Constructor.
32         /*!
33          * Constructor to initialize a PasswordDialog instance.
34          * \param aParent The parent object.
35          * \param aPassword The password.
36          */
37         PasswordDialog( const QString &aPassword, const QString &aText, const QString &aTitle = "", QWidget *aParent = 0 );
38         //! Destructor.
39         virtual ~PasswordDialog();
40         //! Updates the text of the password dialog label.
41         /*!
42          * Updates the text of the password dialog label.
43          * \param aText The text for the label.
44          */
45         void update( const QString &aText );
46
47 signals:
48         //! Signals the authenticity of the password when the uuser dismisses the dialog.
49         /*!
50          * The signal is emitted if user presses a key available for the dialog.
51          * \param aStatus Password authenticity.
52          */
53         void passwordEntered( PasswordDialog::PasswordStatus aStatus );
54
55 private slots:
56         void okButtonPressed();
57         void cancelButtonPressed();
58
59 private:
60         QLineEdit *iPasswordEdit;
61         QLabel *iText;
62         QByteArray iPasswordHash;
63 };
64
65 #endif /*PASSWORDDIALOG_H_*/