summaryrefslogtreecommitdiffstats
path: root/logic/tasks/ProgressProvider.h
diff options
context:
space:
mode:
Diffstat (limited to 'logic/tasks/ProgressProvider.h')
-rw-r--r--logic/tasks/ProgressProvider.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/logic/tasks/ProgressProvider.h b/logic/tasks/ProgressProvider.h
new file mode 100644
index 00000000..e158eb54
--- /dev/null
+++ b/logic/tasks/ProgressProvider.h
@@ -0,0 +1,20 @@
+#pragma once
+#include <QObject>
+class ProgressProvider : public QObject
+{
+ Q_OBJECT
+protected:
+ explicit ProgressProvider(QObject* parent = 0): QObject(parent){}
+signals:
+ void started();
+ void progress(qint64 current, qint64 total);
+ void succeeded();
+ void failed(QString reason);
+ void status(QString status);
+public:
+ virtual QString getStatus() const = 0;
+ virtual void getProgress(qint64 &current, qint64 &total) = 0;
+ virtual bool isRunning() const = 0;
+public slots:
+ virtual void start() = 0;
+};