Index: sources/gui/guiglobals.h =================================================================== diff -u -r9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d -rc933552983a659ca4cc351ff4d43d07319adab1e --- sources/gui/guiglobals.h (.../guiglobals.h) (revision 9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d) +++ sources/gui/guiglobals.h (.../guiglobals.h) (revision c933552983a659ca4cc351ff4d43d07319adab1e) @@ -22,6 +22,65 @@ namespace Gui { extern QQuickView *_viewer; + class GuiActions + { + Q_GADGET + explicit GuiActions(); + public: + enum /*class*/ GuiActionsType_Enum /*: quint16 QML doesn't support*/ { + Unknown = 0x0000, + PowerOff = 0x0100, + KeepAlive = 0x0700, + BloodFlow = 0x0500, + + AlarmStatus = 0x0200, + AlarmTriggered = 0x0300, + AlarmCleared = 0x0400, + + String = 0xFFFF, + }; + + enum class GuiActionsIndx_Enum { + PowerOff_ShowHide = 0, + PowerOff_Response = 0, + + BloodFlow_FlowSetPoint = 0, + BloodFlow_MeasuredFlow , + BloodFlow_RotorSpeed , + BloodFlow_MotorSpeed , + BloodFlow_MotorCtlSpeed , + BloodFlow_MotorCtlCurrent , + BloodFlow_PWMDtCycle , + + }; + + enum class GuiActionsData_Enum /*: quint8 QML doesn't support*/ { + NoData = 0x00, + + Command = 0x00, // HD=>UI : should be handled in receive + Request = 0x00, // UI=>HD : should be handled in transmit + + // Power-Off Data // UI=>HD : should be handled in transmit + Accepted = 0x01, + Rejected = 0x02, + + // Power-Off Data // HD=>UI : should be handled in receive + Timeout = 0x01, + }; + + Q_ENUM(GuiActionsType_Enum) + Q_ENUM(GuiActionsData_Enum) + Q_ENUM(GuiActionsIndx_Enum) + + }; + + // to be able to use the enum as signal/slot parameter + typedef GuiActions::GuiActionsType_Enum GuiActionType; + typedef GuiActions::GuiActionsData_Enum GuiActionData; + typedef GuiActions::GuiActionsIndx_Enum GuiActionIndx; + void registerTypes(); + void registerQmlTypes(); + void startGui(); }