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