Replaced nasty onInsightStateChangedEvent event handler in TargetController with new GetTargetState command

This commit is contained in:
Nav
2022-04-28 21:06:57 +01:00
parent 5a8aa3d657
commit fa037a81b1
11 changed files with 40 additions and 27 deletions

View File

@@ -347,6 +347,7 @@ namespace Bloom
this->setUiDisabled(this->targetState != TargetState::STOPPED);
this->activated = true;
emit this->activatedSignal();
}
void InsightWindow::populateVariantMenu() {

View File

@@ -50,6 +50,9 @@ namespace Bloom
void init(Targets::TargetDescriptor targetDescriptor);
signals:
void activatedSignal();
protected:
void resizeEvent(QResizeEvent* event) override;
void showEvent(QShowEvent* event) override;

View File

@@ -243,6 +243,10 @@ void TargetMemoryInspectionPane::sanitiseSettings() {
}
void TargetMemoryInspectionPane::onTargetStateChanged(Targets::TargetState newState) {
if (this->targetState == newState) {
return;
}
using Targets::TargetState;
this->targetState = newState;

View File

@@ -261,6 +261,10 @@ namespace Bloom::Widgets
}
void TargetRegisterInspectorWindow::onTargetStateChanged(TargetState newState) {
if (this->targetState == newState) {
return;
}
if (newState != TargetState::STOPPED) {
this->registerValueTextInput->setDisabled(true);
this->registerValueBitsetWidgetContainer->setDisabled(true);

View File

@@ -231,6 +231,10 @@ namespace Bloom::Widgets
}
void TargetRegistersPaneWidget::onTargetStateChanged(Targets::TargetState newState) {
if (this->targetState == newState) {
return;
}
using Targets::TargetState;
this->targetState = newState;

View File

@@ -63,6 +63,10 @@ namespace Bloom::Widgets::InsightTargetWidgets
}
void TargetPackageWidget::onTargetStateChanged(TargetState newState) {
if (this->targetState == newState) {
return;
}
this->targetState = newState;
if (newState == TargetState::RUNNING) {