2023-08-04 14:10:47 +02:00
|
|
|
#include "progress_event.h"
|
|
|
|
|
|
|
|
QEvent::Type ProgressEvent::customEventType = QEvent::None;
|
|
|
|
|
2023-08-06 20:44:26 +02:00
|
|
|
ProgressEvent::ProgressEvent(QObject const *sender, int progressPercent)
|
2023-08-04 14:10:47 +02:00
|
|
|
: QEvent(ProgressEvent::type())
|
2023-08-06 20:44:26 +02:00
|
|
|
, m_sender(sender)
|
2023-08-05 18:50:50 +02:00
|
|
|
, m_progressPercent(progressPercent) {
|
2023-08-04 14:10:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ProgressEvent::~ProgressEvent() {
|
|
|
|
}
|
|
|
|
|
|
|
|
QEvent::Type ProgressEvent::type() {
|
|
|
|
if (customEventType == QEvent::None) {
|
|
|
|
int generatedType = QEvent::registerEventType();
|
|
|
|
customEventType = static_cast<QEvent::Type>(generatedType);
|
|
|
|
}
|
|
|
|
return customEventType;
|
|
|
|
}
|