diff options
Diffstat (limited to 'src/progress.h')
-rw-r--r-- | src/progress.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/progress.h b/src/progress.h new file mode 100644 index 0000000..23b54ee --- /dev/null +++ b/src/progress.h @@ -0,0 +1,29 @@ +#ifndef _PROGRESS_H_ +#define _PROGRESS_H_ + +#include <QWidget> + +class QProgressBar; +class QResizeEvent; +class QLabel; + +class Progress : public QWidget +{ + Q_OBJECT +public: + explicit Progress(QString text, QWidget *parent = nullptr); + ~Progress(); + + void setProgress(int percent); + void setCaption(const QString& caption); + +protected: + virtual void resizeEvent(QResizeEvent *event) override; + +private: + QLabel *_label; + QProgressBar *_progress; + bool _hidden; +}; + +#endif |