2021-08-30 22:17:59 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
#include "src/TargetController/TargetControllerConsole.hpp"
|
|
|
|
|
|
|
|
|
|
namespace Bloom
|
|
|
|
|
{
|
|
|
|
|
enum class InsightWorkerTaskState: std::uint8_t
|
|
|
|
|
{
|
|
|
|
|
CREATED,
|
|
|
|
|
STARTED,
|
|
|
|
|
FAILED,
|
|
|
|
|
COMPLETED,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class InsightWorkerTask: public QObject
|
|
|
|
|
{
|
2021-10-06 21:12:31 +01:00
|
|
|
Q_OBJECT
|
2021-08-30 22:17:59 +01:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
InsightWorkerTaskState state;
|
|
|
|
|
|
2021-09-02 21:19:46 +01:00
|
|
|
InsightWorkerTask(): QObject(nullptr) {};
|
2021-08-30 22:17:59 +01:00
|
|
|
|
|
|
|
|
void execute(TargetControllerConsole& targetControllerConsole);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void started();
|
|
|
|
|
void failed(QString errorMessage);
|
|
|
|
|
void completed();
|
2021-10-06 21:12:31 +01:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void run(TargetControllerConsole& targetControllerConsole) = 0;
|
2021-08-30 22:17:59 +01:00
|
|
|
};
|
|
|
|
|
}
|