diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-07-26 17:55:29 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-07-26 17:55:29 +0200 |
commit | d8caab515aa641ec901592d40b5d30c6dfd282f5 (patch) | |
tree | 612b322374083309027204b656d4dc0a78780de8 /logic/tasks/Task.h | |
parent | 6310f6569c2630f27ad72dc0a5fef9f9fec5a88c (diff) | |
download | PrismLauncher-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.gz PrismLauncher-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.bz2 PrismLauncher-d8caab515aa641ec901592d40b5d30c6dfd282f5.zip |
GH-1053 add back update progress dialog
Diffstat (limited to 'logic/tasks/Task.h')
-rw-r--r-- | logic/tasks/Task.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/logic/tasks/Task.h b/logic/tasks/Task.h index 9362348a..04899c69 100644 --- a/logic/tasks/Task.h +++ b/logic/tasks/Task.h @@ -27,6 +27,8 @@ public: virtual bool isRunning() const; + virtual bool isFinished() const; + /*! * True if this task was successful. * If the task failed or is still running, returns false. @@ -41,6 +43,21 @@ public: virtual bool canAbort() const { return false; } + QString getStatus() + { + return m_status; + } + + qint64 getProgress() + { + return m_progress; + } + + qint64 getTotalProgress() + { + return m_progressTotal; + } + signals: void started(); void progress(qint64 current, qint64 total); @@ -61,14 +78,17 @@ protected slots: virtual void emitSucceeded(); virtual void emitFailed(QString reason); -protected -slots: +public slots: void setStatus(const QString &status); - void setProgress(int progress); + void setProgress(qint64 current, qint64 total); protected: bool m_running = false; + bool m_finished = false; bool m_succeeded = false; QString m_failReason = ""; + QString m_status; + int m_progress = 0; + int m_progressTotal = 100; }; |