#ifndef INTERACTIVEWORK_H #define INTERACTIVEWORK_H #include #include #include #include #include "InteractiveTask.h" #include "template_singleton.h" class InteractiveWork : public QThread { SINGLETON_DEFINE(InteractiveWork) Q_OBJECT private: explicit InteractiveWork(QObject *parent = nullptr); ~InteractiveWork(); public: void appendTask(InteractiveTask *task); protected: void run(); signals: void signal_completed(InteractiveTask *task); void signal_failstart(InteractiveTask *task); private: bool m_bThread; QMutex m_mutex; QList m_listTask; }; #endif // INTERACTIVEWORK_H