Index: denali.pro.user =================================================================== diff -u -rf7392d985121b21e9f9814e444b0810cd1d00b18 -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- denali.pro.user (.../denali.pro.user) (revision f7392d985121b21e9f9814e444b0810cd1d00b18) +++ denali.pro.user (.../denali.pro.user) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -r506a9e3db1a20bda1685e38c5e9041005c9a4a4f -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- denali.qrc (.../denali.qrc) (revision 506a9e3db1a20bda1685e38c5e9041005c9a4a4f) +++ denali.qrc (.../denali.qrc) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -129,6 +129,10 @@ sources/gui/qml/globals/qmldir sources/gui/qml/globals/Fonts.qml + + sources/gui/qml/pages/disinfect/DisinfectBase.qml + sources/gui/qml/pages/disinfect/DisinfectStack.qml + sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml sources/gui/qml/pages/pretreatment/PreTreatmentMainStack.qml Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r506a9e3db1a20bda1685e38c5e9041005c9a4a4f -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 506a9e3db1a20bda1685e38c5e9041005c9a4a4f) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -63,7 +63,7 @@ // ---- - {Gui::GuiActionType::ID_HDOperationModeData , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_HDOperationModeData , 2 * 4 }, // 2 parameter each 4bytes {Gui::GuiActionType::ID_PreTreatmentStates , 9 * 4 }, // 9 parameters each 4bytes {Gui::GuiActionType::ID_TreatmentStates , 9 * 4 }, // 9 parameters each 4bytes {Gui::GuiActionType::ID_TreatmentStates , 1 * 4 }, // 1 parameter each 4bytes Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r506a9e3db1a20bda1685e38c5e9041005c9a4a4f -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 506a9e3db1a20bda1685e38c5e9041005c9a4a4f) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -248,6 +248,7 @@ #include "HDDefs.h" Q_ENUM(HD_Op_Modes) + Q_ENUM(HD_Standby_States) // Treatment Q_ENUM(Treatment_States) // Ultrafiltration @@ -304,6 +305,7 @@ // operation mode typedef GuiActions::HD_Op_Modes GuiHDOpModes; typedef GuiActions::DG_Op_Modes GuiDGOpModes; + typedef GuiActions::HD_Standby_States GuiHDStandbyStates; // Treatment States typedef GuiActions::Treatment_States GuiTreatmentStates; // Ultrafiltration Index: sources/gui/qml/components/Footer.qml =================================================================== diff -u -r98581b325c24eb5ef0ce0ce475ad15320d659140 -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/gui/qml/components/Footer.qml (.../Footer.qml) (revision 98581b325c24eb5ef0ce0ce475ad15320d659140) +++ sources/gui/qml/components/Footer.qml (.../Footer.qml) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -35,7 +35,7 @@ // that's becuase the available property to add children is the children property // and that property can only change by assigning a list to it. // so it happens once with no performance issue of multiple redundant call. - onChildrenCountChanged: { + onVisibleChanged: { // check there is a child let count = childrenCount if ( ! count ) return Index: sources/gui/qml/compounds/StepNavigationTitleBar.qml =================================================================== diff -u -r98581b325c24eb5ef0ce0ce475ad15320d659140 -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/gui/qml/compounds/StepNavigationTitleBar.qml (.../StepNavigationTitleBar.qml) (revision 98581b325c24eb5ef0ce0ce475ad15320d659140) +++ sources/gui/qml/compounds/StepNavigationTitleBar.qml (.../StepNavigationTitleBar.qml) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -25,14 +25,14 @@ * \brief StepNavigationTitleBar */ Rectangle { id: _root - property alias stepIndex : _stepIndicator.currentStepIndex - property alias stepLineLength : _stepIndicator.spacerLineLength + property int stepIndex : 0 + property int stepLineLength : 75 + property var stepNames : [] property alias backVisible : _backButton .visible property alias backEnabled : _backButton .enabled property alias confirmVisible : _confirmButton.visible property alias confirmEnabled : _confirmButton.enabled property alias confirmText : _confirmButton.text - property alias stepNames : _stepIndicator.stepNames height : Variables.topBarMenuHeight color : Colors.backgroundMain @@ -63,7 +63,13 @@ onClicked: _root.confirmClicked() } - StepIndicator { id: _stepIndicator + Loader { id: _stepIndicatorLoader + active: stepNames.length anchors.centerIn: parent + sourceComponent: StepIndicator { id: _stepIndicator + currentStepIndex: _root.stepIndex + spacerLineLength: _root.stepLineLength + stepNames : _root.stepNames + } } } Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r98581b325c24eb5ef0ce0ce475ad15320d659140 -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 98581b325c24eb5ef0ce0ce475ad15320d659140) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -20,6 +20,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/disinfect" import "qrc:/pages/pretreatment" import "qrc:/pages/pretreatment/create" import "qrc:/pages/treatment" @@ -36,6 +37,8 @@ stackView.initialItem : _mainHome + // Standby / Disinfection + DisinfectStack { id: _disinfectStack } // Pre Treatment PreTreatmentCreateStack { id: _preTreatmentCreateStack } PreTreatmentMainStack { id: _preTreatmentMainStack } @@ -70,21 +73,26 @@ onVisibleChanged: if (visible) _mainMenu.hidden = true } - MainHome { id: _mainHome - onStartTreatment : { page( _treatmentStack )} - onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate() } + MainHome { id: _mainHome + onStartTreatment : { page( _treatmentStack )} + onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate() } } Connections { target: vHDOperationMode - onFaultChanged : { page( _faultModeScreen , vfault )} - onServiceChanged : { page( _serviceModeScreen , vservice )} - onInitChanged : { page( _initialModeScreen , vinit )} - onStandbyChanged : { page( _mainHome , vstandby )} - onValidateParametersChanged : { page( _preTreatmentCreateStack , vvalidateParameters )} - onPreTreatmentChanged : { page( _preTreatmentMainStack , vpreTreatment )} - onInTreatmentChanged : { page( _treatmentStack , vinTreatment )} - onPostTreatmentChanged : { page( _postTreatmentStack , vpostTreatment )} - onInvalidModeChanged : { page( null , vinvalidMode )} + onFaultChanged : { page( _faultModeScreen , vfault )} + onServiceChanged : { page( _serviceModeScreen , vservice )} + onInitChanged : { page( _initialModeScreen , vinit )} + + onStandbyChanged : { /* It depends on the subModes of the standBy. Nothing to be done */ } + onStandbyStartChanged : { page( _mainHome , vstandbyStart )} + onStandbyWaitTreatmentChanged : { page( _mainHome , vstandbyWaitTreatment )} + onStandbyWaitDisinfectChanged : { page( _disinfectStack , vstandbyWaitDisinfect )} + + onValidateParametersChanged : { page( _preTreatmentCreateStack , vvalidateParameters )} + onPreTreatmentChanged : { page( _preTreatmentMainStack , vpreTreatment )} + onInTreatmentChanged : { page( _treatmentStack , vinTreatment )} + onPostTreatmentChanged : { page( _postTreatmentStack , vpostTreatment )} + onInvalidModeChanged : { page( null , vinvalidMode )} } // the page function is more flixible regarding our current design Index: sources/gui/qml/pages/disinfect/DisinfectBase.qml =================================================================== diff -u --- sources/gui/qml/pages/disinfect/DisinfectBase.qml (revision 0) +++ sources/gui/qml/pages/disinfect/DisinfectBase.qml (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -0,0 +1,177 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file PostTreatmentBase.qml + * \author (last) Behrouz NematiPour + * \date (last) 12-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 12-Apr-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" + +/*! + * \brief the parent page of the post-treatment screens + */ +ScreenItem { id: _root + objectName: "_DisinfectBase" + + property alias reasonText : _notification.text + property alias header : _titleBar + property alias title : _titleText + property alias footer : _footer + + property bool instructionBased : false + readonly property alias instruction : _instructionLoader.item + property string instructionlocation : "" + property var instructionStepNames : [] + property var instructionStepImages : [] + + property bool hasTimeCircle : false + readonly property alias timeCircle : _timeCircleLoader.item + property bool timeCircleIsChecked : false + property int timeCircleMinimum : 0 + property int timeCircleMaximum : 0 + property int timeCircleProgressValue : 0 + property int timeCircleTimeTextValue : 0 + + property bool hasCheckList : false + readonly property alias checkList : _checkListLoader.item + property var checkListStepNames : [] + property int checkListCompleteMargin : 50 + property string completeText : "" + + property bool isComplete : false + + readonly property int titleTopMargin: 110 + + signal backClicked() + signal confirmClicked() + + // vvvvvvvvvvvvvvvvvvvvvvvvv HEADER vvvvvvvvvvvvvvvvvvvvvvvvv // + StepNavigationTitleBar { id: _titleBar + stepIndex : stackStepIndex // shall have a definition in the parent stack + anchors.top : _root.top + anchors.horizontalCenter : parent.horizontalCenter + width : _root.width + confirmEnabled : instruction ? instruction.lastStep : true + stepNames: [] + onBackClicked : _root.backClicked() + onConfirmClicked: _root.confirmClicked() + } + + Text { id: _titleText + anchors { + top : _root.top + topMargin : titleTopMargin + horizontalCenter: parent.horizontalCenter + } + text : qsTr("PostTreatmentBase") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTitle + } + + // ^^^^^^^^^^^^^^^^^^^^^^^^^ HEADER ^^^^^^^^^^^^^^^^^^^^^^^^^ // + + // vvvvvvvvvvvvvvvvvvvv Optional Components vvvvvvvvvvvvvvvvvvvv // + Loader { id: _instructionLoader + readonly property int outerHMargin : 30 + readonly property int outerVMargin : 15 + active : _root.instructionBased + anchors { + top : title.bottom + bottom : footer.top + left : parent.left + right : parent.right + leftMargin : outerHMargin + rightMargin : outerHMargin + topMargin : outerVMargin + bottomMargin : outerVMargin + } + sourceComponent : InstructionView { id: _instructionView + location : _root.instructionlocation + stepNames : _root.instructionStepNames + stepImages : _root.instructionStepImages + } + } + + Loader { id : _timeCircleLoader + active : _root.hasTimeCircle + + anchors.top : _root.hasCheckList ? title.bottom : undefined + anchors.topMargin : _root.hasCheckList ? 25 : 0 + anchors.horizontalCenter: _root.horizontalCenter + anchors.centerIn : ! _root.hasCheckList ? parent : undefined + sourceComponent : TimeCircle { id: _timeCircle + isChecked : _root.isComplete + minimum : _root.timeCircleMinimum + maximum : _root.timeCircleMaximum + progressValue : _root.timeCircleProgressValue + timeTextValue : _root.timeCircleTimeTextValue + thickness : _root.hasCheckList ? 1 : 2 + diameter : _root.hasCheckList ? Variables.progressCircleDiameterSmall : Variables.progressCircleDiameterNormal + timeTextPixelSize : _root.hasCheckList ? Fonts.fontPixelCirclProgressTimeSmall : Fonts.fontPixelCirclProgressTimeNormal + } + } + + Loader { id: _checkListLoader + active : _root.hasCheckList + anchors.top : _root.hasTimeCircle ? _timeCircleLoader.bottom : undefined + anchors.topMargin : _root.hasTimeCircle ? 25 : 0 + anchors.horizontalCenter: _root.horizontalCenter + anchors.centerIn : ! _root.hasTimeCircle ? parent : undefined + width : Variables.checkListViewItemWidth + height : Variables.checkListViewItemHeight * _root.checkListStepNames.length + sourceComponent : CheckListView { id: _checkListView + completeVisible : _root.isComplete + completeText : _root.completeText + stepNames : _root.checkListStepNames + completeMargin : _root.checkListCompleteMargin + } + } + + // ^^^^^^^^^^^^^^^^^^^^ Optional Components ^^^^^^^^^^^^^^^^^^^^ // + + Footer { id: _footer } + + NotificationBar { id: _notification + iconVisible: false + } + + Connections { target: vSettings + onSettingsChanged : { + if ( instructionBased ) { + var group = vSettings.groupFormat.arg(header.stepNames[stackStepIndex]).arg(title.text) + // DEBUG : console.debug(" 00000 ", group) + if ( vSettings.settings[group] !== undefined ) { + _root.instructionlocation = vSettings.settings[group].location + _root.instructionStepNames = vSettings.settings[group].keys + _root.instructionStepImages = vSettings.settings[group].values + } + } + } + } + + onVisibleChanged: { + if (checkList) + checkList.resetItems() + if (instruction) + instruction.currentStepIndex = 0 + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/disinfect/DisinfectStack.qml =================================================================== diff -u --- sources/gui/qml/pages/disinfect/DisinfectStack.qml (revision 0) +++ sources/gui/qml/pages/disinfect/DisinfectStack.qml (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -0,0 +1,114 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file PostTreatmentMainStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 12-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 12-Apr-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/disinfect" +/*! + * \brief the post treatment prime stack screen + */ +StackItem { id: _root + objectName: "_DisinfectStack" + + stackView.initialItem : null + + signal disinfectionSkip () + signal disinfectionHeatClicked () + signal disinfectionChemicalClicked () + signal disinfectionChemicalTest () + + DisinfectBase { id: _disinfection + objectName: "_disinfection" + property int stackStepIndex : 3 + header.confirmVisible : true + header.confirmText.text : qsTr("SKIP") + title.text : qsTr("Disinfection") + footer.childrenWidth : 350 + footer.children: [ + TouchRect { + text.text: qsTr("Heat Disinfection") + onClicked: _root.disinfectionHeatClicked() + }, + TouchRect { + text.text: qsTr("Chemical Disinfection") + onClicked: _root.disinfectionChemicalClicked() + } + ] + onConfirmClicked : _root.disinfectionSkip() + } + + DisinfectBase { id: _disinfectionHeat + objectName: "_disinfectionHeat" + property int stackStepIndex : 3 + title.text : qsTr("Heat Disinfection") + hasTimeCircle : true + } + + DisinfectBase { id: _disinfectionChemicalInstruction + objectName: "_disinfectionChemicalInstruction" + property int stackStepIndex : 3 + header.confirmVisible : true + title.text : qsTr("Chemical Disinfection") + instructionBased : true + onConfirmClicked : _root.disinfectionChemicalTest() + } + + DisinfectBase { id: _disinfectionChemicalProgress + objectName: "_disinfectionChemicalProgress" + property int stackStepIndex : 3 + title.text : qsTr("Chemical Disinfection") + hasTimeCircle : true + } + + DisinfectBase { id: _flush + objectName: "_flush" + property int stackStepIndex : 3 + title.text : qsTr("Flush") + hasTimeCircle : true + } + + Connections { target: vPostTreatmentStates + onPatientDisconnectionChanged : { console.debug("patientDisconnection", vpatientDisconnection )} + onDrainReservoirsChanged : { console.debug("drainReservoirs ", vdrainReservoirs )} + onVerifyChanged : { console.debug("verify ", vverify )} + } + + Connections { target: vHDOperationMode + onStandbyWaitDisinfectChanged : { console.debug("A"); page( _disinfection , vstandbyWaitDisinfect )} // initialItem + onStandbyDGFlushChanged : { page( _flush , vstandbyDGFlush )} + onStandbyDGDisinfectHeatChanged : { page( _disinfectionHeat , vstandbyDGDisinfectHeat )} + onStandbyDGDisinfectChemicalChanged : { page( _disinfectionChemicalProgress , vstandbyDGDisinfectChemical )} + } + + onDisinfectionHeatClicked : { /* shall send a command and wait for the state change */ } + onDisinfectionChemicalClicked : { /* shall send a command and wait for the state change */ + /* TODO-TEST: Needs an accepted response */ page( _disinfectionChemicalInstruction )} + onDisinfectionChemicalTest : { /* shall send a command and wait for the state change */ } + onDisinfectionSkip : { /* shall send a command and wait for the state change */ } + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = true + } + else { + stackView.initialItem = null + } + } +} Index: sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml =================================================================== diff -u -r98581b325c24eb5ef0ce0ce475ad15320d659140 -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 98581b325c24eb5ef0ce0ce475ad15320d659140) +++ sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -41,7 +41,7 @@ property bool hasTimeCircle : false readonly property alias timeCircle : _timeCircleLoader.item - property bool timeCircleisChecked : false + property bool timeCircleIsChecked : false property int timeCircleMinimum : 0 property int timeCircleMaximum : 0 property int timeCircleProgressValue : 0 Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -r066258b65a1c41afe3828c92d2606d2642505d72 -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 066258b65a1c41afe3828c92d2606d2642505d72) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -32,10 +32,6 @@ signal patientDisconnectionConfirm () signal treatmentReviewConfirm () signal disposablesRemovalConfirm () - signal disinfectionSkip () - signal disinfectionHeatClicked () - signal disinfectionChemicalClicked () - signal disinfectionChemicalTest () PostTreatmentBase { id: _patientDisconnectionConfirm property int stackStepIndex : 0 @@ -61,68 +57,20 @@ onConfirmClicked : _root.disposablesRemovalConfirm() } - PostTreatmentBase { id: _disinfection - property int stackStepIndex : 3 - header.confirmVisible : true - header.confirmText.text : qsTr("SKIP") - title.text : qsTr("Disinfection") - footer.childrenWidth : 350 - footer.children: [ - TouchRect { - text.text: qsTr("Heat Disinfection") - onClicked: _root.disinfectionHeatClicked() - }, - TouchRect { - text.text: qsTr("Chemical Disinfection") - onClicked: _root.disinfectionChemicalClicked() - } - ] - onConfirmClicked : _root.disinfectionSkip() - } - - PostTreatmentBase { id: _disinfectionHeat - property int stackStepIndex : 3 - title.text : qsTr("Heat Disinfection") - hasTimeCircle : true - } - - PostTreatmentBase { id: _disinfectionChemicalInstruction - property int stackStepIndex : 3 - header.confirmVisible : true - title.text : qsTr("Chemical Disinfection") - instructionBased : true - onConfirmClicked : _root.disinfectionChemicalTest() - } - - PostTreatmentBase { id: _disinfectionChemicalProgress - property int stackStepIndex : 3 - title.text : qsTr("Chemical Disinfection") - hasTimeCircle : true - } - - PostTreatmentBase { id: _flush - property int stackStepIndex : 3 - title.text : qsTr("Flush") - hasTimeCircle : true - } - Connections { target: vPostTreatmentStates - onPatientDisconnectionChanged : { console.debug("patientDisconnection", vpatientDisconnection )} - onDrainReservoirsChanged : { console.debug("drainReservoirs ", vdrainReservoirs )} - onVerifyChanged : { console.debug("verify ", vverify )} + onPatientDisconnectionChanged : { console.debug("patientDisconnection", vpatientDisconnection )} + onDrainReservoirsChanged : { console.debug("drainReservoirs ", vdrainReservoirs )} + onVerifyChanged : { console.debug("verify ", vverify )} } Connections { target: vHDOperationMode - onPostTreatmentChanged : { page( _patientDisconnectionConfirm , vpostTreatment )} + onPostTreatmentChanged : { page( _patientDisconnectionConfirm , vpostTreatment )} } - onPatientDisconnectionConfirm : { page( _treatmentReviewConfirm )} - onTreatmentReviewConfirm : { page( _disposablesRemovalConfirm )} - onDisposablesRemovalConfirm : { page( _disinfection )} - onDisinfectionHeatClicked : { page( _disinfectionHeat )} - onDisinfectionChemicalClicked : { page( _disinfectionChemicalInstruction )} - onDisinfectionChemicalTest : { page( _disinfectionChemicalProgress )} - onDisinfectionSkip : { page( _flush )} + onPatientDisconnectionConfirm : { vPostTreatmentAdjustmentPatientDisconnectionConfirm .doConfirm( ) + /* No wait for Rsp, so navigates => */ page( _treatmentReviewConfirm )} + onTreatmentReviewConfirm : { page( _disposablesRemovalConfirm )} + onDisposablesRemovalConfirm : { vPostTreatmentAdjustmentDisposablesRemovalConfirm .doConfirm( )} onVisibleChanged: { if (visible) { Index: sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml =================================================================== diff -u -r99a56ec30f1ca4f401e744766bde4f6fac291752 -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision 99a56ec30f1ca4f401e744766bde4f6fac291752) +++ sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -41,7 +41,7 @@ property bool hasTimeCircle : false readonly property alias timeCircle : _timeCircleLoader.item - property bool timeCircleisChecked : false + property bool timeCircleIsChecked : false property int timeCircleMinimum : 0 property int timeCircleMaximum : 0 property int timeCircleProgressValue : 0 Index: sources/model/MModel.h =================================================================== diff -u -r506a9e3db1a20bda1685e38c5e9041005c9a4a4f -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/model/MModel.h (.../MModel.h) (revision 506a9e3db1a20bda1685e38c5e9041005c9a4a4f) +++ sources/model/MModel.h (.../MModel.h) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -154,7 +154,7 @@ * * 02 - MessageGlobals.h : add len * \code{.cpp} - * {Gui::GuiActionType::ID_HDOperationModeData , 1 * 4 }, // 1 parameter each 4bytes + * {Gui::GuiActionType::ID_HDOperationModeData , 2 * 4 }, // 2 parameter each 4bytes * \endcode * * 03 - Implement the model by copy/paste of the closest model, fit to your need. Index: sources/model/hd/data/MHDOperationModeData.cpp =================================================================== diff -u -r96854524927f212c24b9e4a253baeff2e672228f -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/model/hd/data/MHDOperationModeData.cpp (.../MHDOperationModeData.cpp) (revision 96854524927f212c24b9e4a253baeff2e672228f) +++ sources/model/hd/data/MHDOperationModeData.cpp (.../MHDOperationModeData.cpp) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -18,15 +18,18 @@ QVariantList MHDOperationMode::parameters() const { return { - _data.mOpMode.value + _data.mOpMode .value, + _data.mSubMode .value, }; } bool MHDOperationMode::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; // message data start position - if (GetValue(vByteArray, index, _data.mOpMode )) - return true ; + if (GetValue(vByteArray, index, _data.mOpMode )) + if (GetValue(vByteArray, index, _data.mSubMode )) + return true ; else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } } /*! @@ -36,6 +39,7 @@ */ MHDOperationMode::Data MHDOperationMode::data() const { Data data; - data.mOpMode = _data.mOpMode.value; + data.mOpMode = _data.mOpMode .value; + data.mSubMode = _data.mSubMode .value; return data; } Index: sources/model/hd/data/MHDOperationModeData.h =================================================================== diff -u -r6cad9b004e904200b71de7431c745795256080df -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/model/hd/data/MHDOperationModeData.h (.../MHDOperationModeData.h) (revision 6cad9b004e904200b71de7431c745795256080df) +++ sources/model/hd/data/MHDOperationModeData.h (.../MHDOperationModeData.h) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -37,6 +37,7 @@ * | Payload || * | || * | #1:(U32) | \ref Data::mOpMode | + * | #2:(U32) | \ref Data::mSubMode | * * \sa Data * @@ -53,11 +54,11 @@ // friends friend class ::tst_models; - // HD Operation Mode (U32) HD Op Mode QVariantList parameters() const override; struct { - Types::U32 mOpMode ; + Types::U32 mOpMode ; + Types::U32 mSubMode ; } _data; public: @@ -67,7 +68,8 @@ QString infoText () const override { return QString("OpMode"); } struct Data { - quint32 mOpMode = 0; ///< HD operation mode + quint32 mOpMode = 0; ///< HD operation mode + quint32 mSubMode = 0; ///< HD operation sub mode. In each OpMode sub mode has different meaning regarding the OpMode. }; MHDOperationMode () {} Index: sources/view/hd/data/VHDOperationModeData.cpp =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/view/hd/data/VHDOperationModeData.cpp (.../VHDOperationModeData.cpp) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/view/hd/data/VHDOperationModeData.cpp (.../VHDOperationModeData.cpp) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -21,17 +21,28 @@ void VHDOperationMode::onActionReceive(const HDOperationModeData &vData) { - opMode ( vData.mOpMode ); + opMode ( vData.mOpMode ); + subMode( vData.mSubMode ); - fault ( vData.mOpMode == GuiHDOpModes::MODE_FAUL ); - service ( vData.mOpMode == GuiHDOpModes::MODE_SERV ); - init ( vData.mOpMode == GuiHDOpModes::MODE_INIT ); - standby ( vData.mOpMode == GuiHDOpModes::MODE_STAN ); - validateParameters ( vData.mOpMode == GuiHDOpModes::MODE_TPAR ); - preTreatment ( vData.mOpMode == GuiHDOpModes::MODE_PRET ); - inTreatment ( vData.mOpMode == GuiHDOpModes::MODE_TREA ); - postTreatment ( vData.mOpMode == GuiHDOpModes::MODE_POST ); - invalidMode ( vData.mOpMode == GuiHDOpModes::MODE_NLEG ); + fault ( vData.mOpMode == GuiHDOpModes ::MODE_FAUL ); + service ( vData.mOpMode == GuiHDOpModes ::MODE_SERV ); + init ( vData.mOpMode == GuiHDOpModes ::MODE_INIT ); + standby ( vData.mOpMode == GuiHDOpModes ::MODE_STAN ); + validateParameters ( vData.mOpMode == GuiHDOpModes ::MODE_TPAR ); + preTreatment ( vData.mOpMode == GuiHDOpModes ::MODE_PRET ); + inTreatment ( vData.mOpMode == GuiHDOpModes ::MODE_TREA ); + postTreatment ( vData.mOpMode == GuiHDOpModes ::MODE_POST ); + invalidMode ( vData.mOpMode == GuiHDOpModes ::MODE_NLEG ); + + + if ( _standby ) { + standbyStart ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_START_STATE ); + standbyWaitTreatment ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_WAIT_FOR_TREATMENT_STATE ); + standbyWaitDisinfect ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_WAIT_FOR_DISINFECT_STATE ); + standbyDGFlush ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_DG_FLUSH_IN_PROGRESS_STATE ); + standbyDGDisinfectHeat ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_DG_HEAT_DISINFECT_IN_PROGRESS_STATE ); + standbyDGDisinfectChemical ( vData.mSubMode == GuiHDStandbyStates ::STANDBY_DG_CHEM_DISINFECT_IN_PROGRESS_STATE ); + } } QString View::VHDOperationMode::text() Index: sources/view/hd/data/VHDOperationModeData.h =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r4afc91856c00e01dfb5d84bc54d2d92faefec0db --- sources/view/hd/data/VHDOperationModeData.h (.../VHDOperationModeData.h) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/view/hd/data/VHDOperationModeData.h (.../VHDOperationModeData.h) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) @@ -38,18 +38,25 @@ { Q_OBJECT - PROPERTY( quint32 , opMode , 0 ) + PROPERTY( quint32 , opMode , 0 ) + PROPERTY( quint32 , subMode , 0 ) - PROPERTY( bool , fault , false ) ///< Fault mode - PROPERTY( bool , service , false ) ///< Service mode - PROPERTY( bool , init , false ) ///< Initialization & POST mode - PROPERTY( bool , standby , false ) ///< Standby mode - PROPERTY( bool , validateParameters , false ) ///< Treatment Parameters mode - PROPERTY( bool , preTreatment , false ) ///< Pre-Treatment mode - PROPERTY( bool , inTreatment , false ) ///< Treatment mode - PROPERTY( bool , postTreatment , false ) ///< Post-Treatment mode - PROPERTY( bool , invalidMode , false ) ///< Not legal - an illegal mode transition occurred + PROPERTY( bool , fault , false ) ///< Fault mode + PROPERTY( bool , service , false ) ///< Service mode + PROPERTY( bool , init , false ) ///< Initialization & POST mode + PROPERTY( bool , standby , false ) ///< Standby mode + PROPERTY( bool , validateParameters , false ) ///< Treatment Parameters mode + PROPERTY( bool , preTreatment , false ) ///< Pre-Treatment mode + PROPERTY( bool , inTreatment , false ) ///< Treatment mode + PROPERTY( bool , postTreatment , false ) ///< Post-Treatment mode + PROPERTY( bool , invalidMode , false ) ///< Not legal - an illegal mode transition occurred + PROPERTY( bool , standbyStart , false ) ///< Start standby , STANDBY_START_STATE = 0 + PROPERTY( bool , standbyWaitTreatment , false ) ///< Wait for treatment , STANDBY_WAIT_FOR_TREATMENT_STATE + PROPERTY( bool , standbyWaitDisinfect , false ) ///< Wait for disinfect , STANDBY_WAIT_FOR_DISINFECT_STATE + PROPERTY( bool , standbyDGFlush , false ) ///< DG flush operation is in progress , STANDBY_DG_FLUSH_IN_PROGRESS_STATE + PROPERTY( bool , standbyDGDisinfectHeat , false ) ///< DG heat disinfection operation is in progress , STANDBY_DG_HEAT_DISINFECT_IN_PROGRESS_STATE + PROPERTY( bool , standbyDGDisinfectChemical , false ) ///< DG chemical disinfection operation is in progress , STANDBY_DG_CHEM_DISINFECT_IN_PROGRESS_STATE Q_PROPERTY(QString text READ text NOTIFY opModeChanged)