Corrected the password dialog and progress bar related errors. Texts and titles of...
[qtmeetings] / src / UserInterface / Utils / PasswordDialog.h
index 5bf8c62..c62223c 100644 (file)
@@ -4,6 +4,7 @@
 #include <QDialog>
 
 class QLineEdit;
+class QLabel;
 class QByteArray;
 
 //! UserInterface class. Responsible for poping-up password query on the screen.
@@ -26,18 +27,22 @@ public:
                Incorrect, /*!< Incorrect password. */
                Canceled
        };
-
-       //! Creates a new PasswordDialog instance and shows the dialog on the screen.
+       
+       //! Constructor.
        /*!
-        * Creates a new Password query dialog.
+        * Constructor to initialize a PasswordDialog instance.
         * \param aParent The parent object.
         * \param aPassword The password.
-        * \param aText Optional. Text displayed in the dialog.
-        * \param aTitle Optional. Dialog title, defaults to "Enter password".
-        * \return The instance which was created.
         */
-       static PasswordDialog * query( QWidget *aParent, const QString &aPassword,
-                                                const QString &aText = 0, const QString &aTitle = 0 );
+       PasswordDialog( const QString &aPassword, const QString &aText, const QString &aTitle = "", QWidget *aParent = 0 );
+       //! Destructor.
+       virtual ~PasswordDialog();
+       //! Updates the text of the password dialog label.
+       /*!
+        * Updates the text of the password dialog label.
+        * \param aText The text for the label.
+        */
+       void update( const QString &aText );
 
 signals:
        //! Signals the authenticity of the password when the uuser dismisses the dialog.
@@ -52,17 +57,8 @@ private slots:
        void cancelButtonPressed();
 
 private:
-       //! Constructor.
-       /*!
-        * Constructor to initialize a PasswordDialog instance.
-        * \param aParent The parent object.
-        * \param aPassword The password.
-        */
-       PasswordDialog( QWidget *aParent, const QString &aPassword, const QString &aText, const QString &aTitle );
-       //! Destructor.
-       virtual ~PasswordDialog();
-
        QLineEdit *iPasswordEdit;
+       QLabel *iText;
        QByteArray iPasswordHash;
 };