Index: sources/gui/guiglobals.h =================================================================== diff -u -r074b32b5cc08f41f2d9ce0d021f2151b76bba5ad -r846a9ebc350e33be4affab3cc4c136248900015d --- sources/gui/guiglobals.h (.../guiglobals.h) (revision 074b32b5cc08f41f2d9ce0d021f2151b76bba5ad) +++ sources/gui/guiglobals.h (.../guiglobals.h) (revision 846a9ebc350e33be4affab3cc4c136248900015d) @@ -6,8 +6,8 @@ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file guiglobals.h - * \author (last) Peter Lucia - * \date (last) 25-Jun-2020 + * \author (last) Behrouz NematiPour + * \date (last) 25-Aug-2020 * \author (original) Behrouz NematiPour * \date (original) 28-Oct-2019 * @@ -20,7 +20,19 @@ // Project namespace Gui { - extern QQuickView *_viewer; + class MainView : public QQuickView { + Q_OBJECT + + bool event(QEvent* vEvent) override + { + emit eventSpy(vEvent); + return QQuickView::event(vEvent); + } + signals: + void eventSpy(QEvent* vEvent); + }; + extern MainView *_viewer; + class GuiActions { Q_GADGET @@ -35,7 +47,7 @@ * *** So it has to be converted, each time it is referenced. ***\n * *** Since an enum is a constant value, ***\n * *** There is no point in calculating it on each reference. ***\n - * *** Therefore it is preffered to keep them as constant values ***\n + * *** Therefore it is preferred to keep them as constant values ***\n * *** Exactly as it is going to be shown/used in denali messages ***\n * *** then it can be compared exactly the way it is with no conversion.***\n */ @@ -64,12 +76,11 @@ ID_TreatmentRanges = 0x1A00, // 26 ID_PressureOcclusion = 0x0900, ID_TreatmentStates = 0x0F00, // 15 + ID_Saline = 0x2F00, // 47 ID_AlarmStatus = 0x0200, ID_AlarmTriggered = 0x0300, ID_AlarmCleared = 0x0400, - ID_AlarmSilenceReq = 0x2F00, // 47 - Not implemented yet on FW side - ID_AlarmSilenceRsp = 0x3000, // 48 - TODO: As per conversation with Sean this can be deleted. ID_CreateTreatmentReq = 0x3500, // 53 ID_CreateTreatmentRsp = 0x3600, // 54 @@ -80,6 +91,7 @@ ID_EndTreatmentRsp = 0x3C00, // 60 ID_PrimingData = 0x3700, // 55 + ID_AlarmSilenceReq = 0x3200, // 50 - Not implemented yet on FW side ID_HDOperationModeData = 0x2500, // 37 @@ -107,6 +119,10 @@ ID_AdjustDurationReq = 0x1600, // 22 ID_AdjustDurationRsp = 0x1B00, // 27 + + ID_AdjustSalineReq = 0x1200, // 18 + ID_AdjustSalineRsp = 0x1400, // 20 + }; enum class GuiActionsData_Enum /*: quint8 QML doesn't support*/ { @@ -123,6 +139,12 @@ Timeout = 0x01, }; + enum Saline_States { // FW currently doesn't have enum for Saline Bolus when provided better to be replaced. + SALINE_STOP_STATE = 0, ///< Saline is not delivered + SALINE_START_STATE , ///< Saline being Delivered + SALINE_DISABLE_STATE , ///< Saline cumulative volume delivery has reached the maximum + }; + Q_ENUM(GuiActionsType_Enum) Q_ENUM(GuiActionsData_Enum) @@ -136,6 +158,9 @@ #include "HDDefs.h" Q_ENUM(HD_Op_Modes) Q_ENUM(UF_Adjustments) + Q_ENUM(Treatment_States) + Q_ENUM(UF_States) + Q_ENUM(Saline_States) #include "DGDefs.h" Q_ENUM(DG_Op_Modes) @@ -154,8 +179,10 @@ typedef GuiActions::DG_Op_Modes GuiDGOpModes; typedef GuiActions::UF_Adjustments GuiUFAdjustment; + typedef GuiActions::Treatment_States GuiTreatment_States; + typedef GuiActions::UF_States GuiUFStates; + typedef GuiActions::Saline_States GuiSalineStates; - void registerTypes(); void registerQmlTypes();