Handling programming mode enabled/disabled events in Insight

This commit is contained in:
Nav
2022-06-05 17:00:56 +01:00
parent f33d6062a4
commit ddf53ab0f8
8 changed files with 97 additions and 0 deletions

View File

@@ -45,6 +45,14 @@ namespace Bloom
std::bind(&InsightWorker::onTargetRegistersWrittenEvent, this, std::placeholders::_1)
);
this->eventListener->registerCallbackForEventType<Events::ProgrammingModeEnabled>(
std::bind(&InsightWorker::onProgrammingModeEnabledEvent, this, std::placeholders::_1)
);
this->eventListener->registerCallbackForEventType<Events::ProgrammingModeDisabled>(
std::bind(&InsightWorker::onProgrammingModeDisabledEvent, this, std::placeholders::_1)
);
this->eventDispatchTimer = new QTimer(this);
QObject::connect(this->eventDispatchTimer, &QTimer::timeout, this, &InsightWorker::dispatchEvents);
this->eventDispatchTimer->start(5);
@@ -161,6 +169,14 @@ namespace Bloom
}
}
void InsightWorker::onProgrammingModeEnabledEvent(const Events::ProgrammingModeEnabled& event) {
emit this->programmingModeEnabled();
}
void InsightWorker::onProgrammingModeDisabledEvent(const Events::ProgrammingModeDisabled& event) {
emit this->programmingModeDisabled();
}
void InsightWorker::executeTasks() {
auto task = std::optional<InsightWorkerTask*>();