summaryrefslogtreecommitdiffstats
path: root/src/progress.h
diff options
context:
space:
mode:
authorSimon Rettberg2024-04-29 15:46:12 +0200
committerSimon Rettberg2024-04-29 15:46:12 +0200
commitefa4b67ced6d4e0a5c850640e615724782637d50 (patch)
treea50d63b1867206fb72af4a69567c3848c47da68d /src/progress.h
downloadcowgui-efa4b67ced6d4e0a5c850640e615724782637d50.tar.gz
cowgui-efa4b67ced6d4e0a5c850640e615724782637d50.tar.xz
cowgui-efa4b67ced6d4e0a5c850640e615724782637d50.zip
Inischl commit
Diffstat (limited to 'src/progress.h')
-rw-r--r--src/progress.h29
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