41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#ifndef UPDATE_DC_EVENT_H_INCLUDED
|
|
#define UPDATE_DC_EVENT_H_INCLUDED
|
|
|
|
#include <QEvent>
|
|
#include <QDateTime>
|
|
|
|
class UpdateDcEvent : public QEvent {
|
|
public:
|
|
enum UpdateStep { NONE, DC_REBOOT, BL_START, BL_CHECK, BL_CHECK_AFTER_STOP, BL_IS_UP, BL_IS_DOWN, BL_STOP};
|
|
|
|
private:
|
|
QObject const *m_sender;
|
|
UpdateStep m_updateStep;
|
|
int m_count;
|
|
QDateTime m_sendDateTime;
|
|
|
|
public:
|
|
explicit UpdateDcEvent(QObject const *sender, UpdateStep updateStep,
|
|
int count,
|
|
QDateTime const &sendDateTime = QDateTime::currentDateTime());
|
|
virtual ~UpdateDcEvent();
|
|
static QEvent::Type type();
|
|
|
|
QObject const *sender() { return m_sender; }
|
|
QObject const *sender() const { return m_sender; }
|
|
|
|
void setUpdateStep(UpdateStep updateStep) { m_updateStep = updateStep; }
|
|
UpdateStep updateStep() { return m_updateStep; }
|
|
UpdateStep updateStep() const { return m_updateStep; }
|
|
int count() const { return m_count; }
|
|
void setCount(int count) { m_count = count; }
|
|
QDateTime &sendDateTime() { return m_sendDateTime; }
|
|
QDateTime const &sendDateTime() const { return m_sendDateTime; }
|
|
|
|
private:
|
|
static QEvent::Type customEventType;
|
|
};
|
|
|
|
|
|
#endif // PROGRESS_EVENT_H_INCLUDED
|