summaryrefslogtreecommitdiffstats
path: root/logic/tasks/ThreadTask.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-01 19:21:58 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-01 19:21:58 +0100
commit0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6 (patch)
tree93a26eb1fa534984230e871253faaf3ec142f373 /logic/tasks/ThreadTask.h
parentcf7335186d1aa3d99a32adb04a55c066161760c3 (diff)
downloadMultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar
MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar.gz
MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar.lz
MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar.xz
MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.zip
ThreadTask for all your ThreadNeeds
Use only when absolutely required.
Diffstat (limited to 'logic/tasks/ThreadTask.h')
-rw-r--r--logic/tasks/ThreadTask.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/logic/tasks/ThreadTask.h b/logic/tasks/ThreadTask.h
new file mode 100644
index 00000000..718dbc91
--- /dev/null
+++ b/logic/tasks/ThreadTask.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "Task.h"
+
+class ThreadTask : public Task
+{
+ Q_OBJECT
+public:
+ explicit ThreadTask(Task * internal, QObject * parent = nullptr);
+
+protected:
+ void executeTask() {};
+
+public slots:
+ virtual void start();
+
+private slots:
+ void iternal_started();
+ void iternal_progress(qint64 current, qint64 total);
+ void iternal_succeeded();
+ void iternal_failed(QString reason);
+ void iternal_status(QString status);
+private:
+ Task * m_internal;
+}; \ No newline at end of file