Merge branch 'master' of https://git.maemo.org/projects/qtmeetings
[qtmeetings] / src / UserInterface / Utils / ProgressBar.h
1 #ifndef PROGRESSBAR_H_
2 #define PROGRESSBAR_H_
3
4 #include <QDialog>
5
6 class QProgressBar;
7 class QLabel;
8 class QPushButton;
9
10 //! UserInterface class.
11 /*!
12  * UserInterface class which launches a modal progress bar during application events that might take
13  * some time
14  */
15 class ProgressBar : public QDialog
16 {
17         Q_OBJECT
18
19 public:
20         //! Constructor.
21         /*!
22          * Constructor to initialize the StatusWidget instance.
23          * \param aParent Parent object.
24          * \param aTitle Title string to be set to the progress bar.
25          */
26         ProgressBar( const QString &aTitle, bool aCancellable = false, QWidget *aParent = 0 );
27         //! Destructor.
28         virtual ~ProgressBar();
29         //! Updates the text fields of progress bar dialog.
30         /*!
31          * Updates the text fields of progress bar dialog.
32          * \param aMessage The text for the label of the dialog.
33          * \param aTitle Title string to be set to the progress bar.
34          */
35         void update( const QString &aMessage, const QString &aTitle = "" );
36         
37         void toggleCancellable( bool aEnable );
38
39 signals:
40         //! Signal. Emitted if user presses cancel button.
41         /*!
42          * Signal. Emitted if user presses cancel button.
43          */
44         void cancel();
45         void started();
46
47 private:
48         QProgressBar *iProgress;
49         QLabel *iLabel;
50         QPushButton *iButton;
51
52 };
53
54 #endif /*PROGRESSBAR_H_*/