UpdatePTUDevCtrl/update_dc_event.cpp
Gerhard Hoffmann e82742a609 Add helper class update_dc_event to dend customer messages from the worker-thread
to the gui-thread. The gui-thread will then perform bl_rebootDC, bl_startBL,
bl_checkBL(), bl_isUp() and bl_stopBL().
2023-09-09 14:27:50 +02:00

26 lines
724 B
C++

#include "update_dc_event.h"
QEvent::Type UpdateDcEvent::customEventType = QEvent::None;
UpdateDcEvent::UpdateDcEvent(QObject const *sender,
UpdateStep updateStep,
int count,
QDateTime const &sendDateTime)
: QEvent(UpdateDcEvent::type())
, m_sender(sender)
, m_updateStep(updateStep)
, m_count(count)
, m_sendDateTime(sendDateTime) {
}
UpdateDcEvent::~UpdateDcEvent() {
}
QEvent::Type UpdateDcEvent::type() {
if (customEventType == QEvent::None) {
int generatedType = QEvent::registerEventType();
customEventType = static_cast<QEvent::Type>(generatedType);
}
return customEventType;
}