Improved containment of target package widget functionality - it's now less tightly coupled.
This commit is contained in:
@@ -6,13 +6,16 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
#include "AboutWindow.hpp"
|
||||
#include "src/ApplicationConfig.hpp"
|
||||
#include "Widgets/TargetWidgets/TargetPackageWidget.hpp"
|
||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
||||
#include "src/Targets/TargetState.hpp"
|
||||
|
||||
#include "src/Targets/TargetDescriptor.hpp"
|
||||
#include "src/Targets/TargetVariant.hpp"
|
||||
|
||||
#include "Widgets/TargetWidgets/TargetPackageWidget.hpp"
|
||||
#include "AboutWindow.hpp"
|
||||
|
||||
namespace Bloom
|
||||
{
|
||||
class InsightWindow: public QObject
|
||||
@@ -23,6 +26,8 @@ namespace Bloom
|
||||
EnvironmentConfig environmentConfig;
|
||||
TargetConfig targetConfig;
|
||||
|
||||
InsightWorker& insightWorker;
|
||||
|
||||
bool activated = false;
|
||||
|
||||
Targets::TargetDescriptor targetDescriptor;
|
||||
@@ -57,7 +62,7 @@ namespace Bloom
|
||||
void deactivate();
|
||||
|
||||
public:
|
||||
InsightWindow() = default;
|
||||
InsightWindow(QApplication& application, InsightWorker& insightWorker);
|
||||
|
||||
void setEnvironmentConfig(const EnvironmentConfig& environmentConfig) {
|
||||
this->environmentConfig = environmentConfig;
|
||||
@@ -68,17 +73,13 @@ namespace Bloom
|
||||
this->insightConfig = insightConfig;
|
||||
}
|
||||
|
||||
void init(
|
||||
QApplication& application,
|
||||
Targets::TargetDescriptor targetDescriptor
|
||||
);
|
||||
void init(Targets::TargetDescriptor targetDescriptor);
|
||||
|
||||
void show();
|
||||
|
||||
public slots:
|
||||
void onTargetControllerSuspended();
|
||||
void onTargetControllerResumed(const Bloom::Targets::TargetDescriptor& targetDescriptor);
|
||||
void onTargetPinStatesUpdate(int variantId, Bloom::Targets::TargetPinStateMappingType pinStatesByNumber);
|
||||
void onTargetStateUpdate(Targets::TargetState newState);
|
||||
void onTargetProgramCounterUpdate(quint32 programCounter);
|
||||
void onTargetIoPortsUpdate();
|
||||
|
||||
Reference in New Issue
Block a user