24 lines
484 B
C++
24 lines
484 B
C++
#ifndef SUBTHREAD_H
|
|
#define SUBTHREAD_H
|
|
|
|
#include <QThread>
|
|
#include <GlobalDefinitions/Variable.h>
|
|
class SubThread : public QThread
|
|
{
|
|
|
|
public:
|
|
SubThread();
|
|
void ReStart();
|
|
void PauseThread();
|
|
void KillThread();
|
|
private:
|
|
void executeThreadLogic(); // 执行线程逻辑的函数
|
|
protected:
|
|
void run() override; // 重写run函数不再需要
|
|
private:
|
|
bool isLoop;
|
|
bool isPause;
|
|
};
|
|
|
|
#endif // SUBTHREAD_H
|