diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-18 00:00:35 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-18 00:00:35 +0200 |
commit | b979d0ce5da515793a02802a6421ef607a498323 (patch) | |
tree | 1431d15e7a3e89e87708564a5be9fea05a5647ab /logic/tasks/ProgressProvider.h | |
parent | d38b90530b3ba3a49c4eb072eb344ae2b0836913 (diff) | |
download | MultiMC-b979d0ce5da515793a02802a6421ef607a498323.tar MultiMC-b979d0ce5da515793a02802a6421ef607a498323.tar.gz MultiMC-b979d0ce5da515793a02802a6421ef607a498323.tar.lz MultiMC-b979d0ce5da515793a02802a6421ef607a498323.tar.xz MultiMC-b979d0ce5da515793a02802a6421ef607a498323.zip |
Implement legacy forge button!
Many refactors of the task system.
Progress dialog now accepts generic ProgressProvider objects
Diffstat (limited to 'logic/tasks/ProgressProvider.h')
-rw-r--r-- | logic/tasks/ProgressProvider.h | 20 |
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 ¤t, qint64 &total) = 0; + virtual bool isRunning() const = 0; +public slots: + virtual void start() = 0; +}; |