Handling programming mode enabled/disabled events in Insight
This commit is contained in:
@@ -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*>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user