Tidied structure of all classes within the entire code base
Also some other small bits of tidying
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "InsightWorkerTask.hpp"
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
using namespace Bloom;
|
||||
|
||||
void InsightWorkerTask::execute(TargetControllerConsole& targetControllerConsole) {
|
||||
|
||||
@@ -17,9 +17,7 @@ namespace Bloom
|
||||
|
||||
class InsightWorkerTask: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
virtual void run(TargetControllerConsole& targetControllerConsole) = 0;
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InsightWorkerTaskState state;
|
||||
@@ -32,5 +30,8 @@ namespace Bloom
|
||||
void started();
|
||||
void failed(QString errorMessage);
|
||||
void completed();
|
||||
|
||||
protected:
|
||||
virtual void run(TargetControllerConsole& targetControllerConsole) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,12 +7,7 @@ namespace Bloom
|
||||
{
|
||||
class ReadTargetRegisters: public InsightWorkerTask
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
Targets::TargetRegisterDescriptors descriptors;
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ReadTargetRegisters(const Targets::TargetRegisterDescriptors& descriptors):
|
||||
@@ -20,5 +15,11 @@ namespace Bloom
|
||||
|
||||
signals:
|
||||
void targetRegistersRead(Targets::TargetRegisters registers);
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
|
||||
private:
|
||||
Targets::TargetRegisterDescriptors descriptors;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,17 +8,18 @@ namespace Bloom
|
||||
{
|
||||
class RefreshTargetPinStates: public InsightWorkerTask
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
int variantId;
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RefreshTargetPinStates(int variantId): InsightWorkerTask(), variantId(variantId) {}
|
||||
|
||||
signals:
|
||||
void targetPinStatesRetrieved(Bloom::Targets::TargetPinStateMappingType pinStatesByNumber);
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
|
||||
private:
|
||||
int variantId;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,16 +7,17 @@ namespace Bloom
|
||||
{
|
||||
class SetTargetPinState: public InsightWorkerTask
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
Targets::TargetPinDescriptor pinDescriptor;
|
||||
Targets::TargetPinState pinState;
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SetTargetPinState(const Targets::TargetPinDescriptor& pinDescriptor, const Targets::TargetPinState& pinState):
|
||||
InsightWorkerTask(), pinDescriptor(pinDescriptor), pinState(pinState) {}
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
|
||||
private:
|
||||
Targets::TargetPinDescriptor pinDescriptor;
|
||||
Targets::TargetPinState pinState;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,15 +7,16 @@ namespace Bloom
|
||||
{
|
||||
class WriteTargetRegister: public InsightWorkerTask
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
Targets::TargetRegister targetRegister;
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
WriteTargetRegister(const Targets::TargetRegister& targetRegister):
|
||||
InsightWorkerTask(), targetRegister(targetRegister) {}
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
|
||||
private:
|
||||
Targets::TargetRegister targetRegister;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user