From b6d455a02bd338e9dc0faa09d4d8177ecd8d569a Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sun, 10 Apr 2016 15:53:05 +0200 Subject: NOISSUE reorganize and document libraries --- api/logic/tasks/SequentialTask.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 api/logic/tasks/SequentialTask.h (limited to 'api/logic/tasks/SequentialTask.h') diff --git a/api/logic/tasks/SequentialTask.h b/api/logic/tasks/SequentialTask.h new file mode 100644 index 00000000..69031095 --- /dev/null +++ b/api/logic/tasks/SequentialTask.h @@ -0,0 +1,31 @@ +#pragma once + +#include "Task.h" + +#include +#include + +#include "multimc_logic_export.h" + +class MULTIMC_LOGIC_EXPORT SequentialTask : public Task +{ + Q_OBJECT +public: + explicit SequentialTask(QObject *parent = 0); + + void addTask(std::shared_ptr task); + +protected: + void executeTask(); + +private +slots: + void startNext(); + void subTaskFailed(const QString &msg); + void subTaskStatus(const QString &msg); + void subTaskProgress(qint64 current, qint64 total); + +private: + QQueue > m_queue; + int m_currentIndex; +}; -- cgit