#ifndef ATBMACHINECONDITIONEVENT_H #define ATBMACHINECONDITIONEVENT_H #include #include enum class EVENT_CLASS : quint8; const QEvent::Type ATB_MACHINE_EVENT = static_cast(QEvent::User + 2); class ATBMachineEvent : public QEvent { public: explicit ATBMachineEvent(const QString & id, const QString & deviceName, // PTU/PRINTER/DC/... EVENT_CLASS eventClass, // reason of event: Error/Warning/Alarm const QString & name, // 'Event': "E001", "W003" const int state, const QString & parameter, const QString & secondLevelInfo ); QString eventId; QString deviceName; EVENT_CLASS machineEventClass; QString eventName; int eventState; QString timestamString; QString parameterString; QString secondLevelInfoString; static QString getEventClassString(EVENT_CLASS eventClass); }; enum class EVENT_CLASS : quint8 { WARNING, ERROR, ALARM, DEBUG, STATE, NOT_DEFINED }; #endif // ATBMACHINEEVENT_H