Index: denali.pro.user =================================================================== diff -u -r6c5b5292ae3b3ebf979175dcb1256c88b1baf90c -re28183bddebf7383c1bd113e7b8ef4ea11f494fb --- denali.pro.user (.../denali.pro.user) (revision 6c5b5292ae3b3ebf979175dcb1256c88b1baf90c) +++ denali.pro.user (.../denali.pro.user) (revision e28183bddebf7383c1bd113e7b8ef4ea11f494fb) @@ -1,6 +1,6 @@ - + EnvironmentId Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r506a9e3db1a20bda1685e38c5e9041005c9a4a4f -re28183bddebf7383c1bd113e7b8ef4ea11f494fb --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 506a9e3db1a20bda1685e38c5e9041005c9a4a4f) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision e28183bddebf7383c1bd113e7b8ef4ea11f494fb) @@ -46,8 +46,11 @@ signal itemPressed(int vIndex) onItemPressed: { currentIndex = vIndex + _highlightRect.x = _repeater.itemAt(vIndex).x } + onCurrentIndexChanged: itemPressed(currentIndex) + /*! * this section olds somkind of the private sections of the object * this section is used as the calculation section whcih soppose not to be changed by user. @@ -104,7 +107,6 @@ text.text : modelData border.width: 0 onPressed: { - _highlightRect.x = _touchRect.x itemPressed(index) } } Index: sources/gui/qml/main.qml =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -re28183bddebf7383c1bd113e7b8ef4ea11f494fb --- sources/gui/qml/main.qml (.../main.qml) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/gui/qml/main.qml (.../main.qml) (revision e28183bddebf7383c1bd113e7b8ef4ea11f494fb) @@ -205,9 +205,9 @@ } onItemPressed: { - _mainStack .visible = vIndex == 0; - _managerStack .visible = vIndex == 1; - _settingsStack .visible = vIndex == 2; + _mainStack .visible = vIndex == 0 + _managerStack .visible = vIndex == 1 + _settingsStack.visible = vIndex == 2 } } Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r8f83b92860a33498ea7856e63afef0a10ee11923 -re28183bddebf7383c1bd113e7b8ef4ea11f494fb --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 8f83b92860a33498ea7856e63afef0a10ee11923) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision e28183bddebf7383c1bd113e7b8ef4ea11f494fb) @@ -36,6 +36,11 @@ StackItem { id : _root stackView.initialItem : _mainHome + function doSettingsDisinfect( vFlush, vHeat, vIsChemical ) { + _mainMenu.currentIndex = 0 + _disinfectStack.doSettingsDisinfect( vFlush, vHeat, vIsChemical ) + page( _disinfectStack ) + } // Standby / Disinfection DisinfectStack { id: _disinfectStack } @@ -79,7 +84,7 @@ } Connections { target: vHDOperationMode - // onFaultChanged : { page( _faultModeScreen , vfault )} // may needed later. + // onFaultChanged : { page( _faultModeScreen , vfault )} // may needed later. onServiceChanged : { page( _serviceModeScreen , vservice )} onInitChanged : { page( _initialModeScreen , vinit )} Index: sources/gui/qml/pages/disinfect/DisinfectStack.qml =================================================================== diff -u -r8a5dbf556a66524fbe4b60ac1573182a0bd27617 -re28183bddebf7383c1bd113e7b8ef4ea11f494fb --- sources/gui/qml/pages/disinfect/DisinfectStack.qml (.../DisinfectStack.qml) (revision 8a5dbf556a66524fbe4b60ac1573182a0bd27617) +++ sources/gui/qml/pages/disinfect/DisinfectStack.qml (.../DisinfectStack.qml) (revision e28183bddebf7383c1bd113e7b8ef4ea11f494fb) @@ -41,6 +41,17 @@ readonly property string heatTitle : qsTr("Heat Disinfect") readonly property string chemicalTitle : qsTr("Chemical Disinfect") + function doSettingsDisinfect( vFlush, vHeat, vIsChemical ) { + // since we do't know the order or timing of the FW message + // prefered to set the screens by UI. + // If HDOpMode says/has the same state nothing changes, but at least UI is not showing empty screen. + _mainMenu.hidden = true + stackView.clear() + if ( vFlush ) { page( _disinfectFlush ); return } + if ( vHeat ) { page( _disinfectHeat ); return } + if ( vIsChemical ) { page( _disinfectChemicalInstruction ); return } + } + DisinfectBase { id : _disinfect objectName : "_disinfect" property int stackStepIndex : 0 @@ -63,6 +74,17 @@ instructionBased : true } + DisinfectBase { id : _disinfectFlush + objectName : "_disinfectFlush" + header.stepNames : [ _root.disinfectTitle , _root.flushTitle ] + title.text : _root.flushTitle + hasTimeCircle : true + timeCircleMinimum : 0 + timeCircleMaximum : vDisinfectDGData.flushTimeTotal + timeCircleProgressValue : vDisinfectDGData.flushTimeElapsed + timeCircleTimeTextValue : vDisinfectDGData.flushTimeRemaining * 60 + } + DisinfectBase { id : _disinfectHeat objectName : "_disinfectHeat" header.stepNames : [ _root.disinfectTitle , _root.heatTitle ] @@ -112,17 +134,6 @@ ] } - DisinfectBase { id : _flush - objectName : "_flush" - header.stepNames : [ _root.disinfectTitle , _root.flushTitle ] - title.text : _root.flushTitle - hasTimeCircle : true - timeCircleMinimum : 0 - timeCircleMaximum : vDisinfectDGData.flushTimeTotal - timeCircleProgressValue : vDisinfectDGData.flushTimeElapsed - timeCircleTimeTextValue : vDisinfectDGData.flushTimeRemaining * 60 - } - // ----- Checkmarks Connections { target: vDisinfectStates onStartEntered : {} @@ -164,7 +175,7 @@ Connections { target: vHDOperationMode onStandbyWaitDisinfectChanged : { page( _disinfect , vstandbyWaitDisinfect )} // initialItem - onStandbyDGFlushChanged : { page( _flush , vstandbyDGFlush )} + onStandbyDGFlushChanged : { page( _disinfectFlush , vstandbyDGFlush )} onStandbyDGDisinfectHeatChanged : { page( _disinfectHeat , vstandbyDGDisinfectHeat )} onStandbyDGDisinfectChemicalChanged : { page( _disinfectChemicalProgress , vstandbyDGDisinfectChemical )} } Index: sources/gui/qml/pages/settings/SettingsDG.qml =================================================================== diff -u -r6c5b5292ae3b3ebf979175dcb1256c88b1baf90c -re28183bddebf7383c1bd113e7b8ef4ea11f494fb --- sources/gui/qml/pages/settings/SettingsDG.qml (.../SettingsDG.qml) (revision 6c5b5292ae3b3ebf979175dcb1256c88b1baf90c) +++ sources/gui/qml/pages/settings/SettingsDG.qml (.../SettingsDG.qml) (revision e28183bddebf7383c1bd113e7b8ef4ea11f494fb) @@ -125,15 +125,29 @@ Footer { childrenWidth: 300 children: [ - TouchRect { - text.text: qsTr("Water Flush") - }, - TouchRect { - text.text: qsTr("Heat Disinfection") - }, - TouchRect { - text.text: qsTr("Chemical Disinfection") - } + TouchRect { text.text: qsTr("Water Flush") + onClicked: vDisinfectAdjustDisinfect .doFlush ()}, + TouchRect { text.text: qsTr("Heat Disinfection") + onClicked: vDisinfectAdjustDisinfect .doDisinfectHeat ()}, + TouchRect { text.text: qsTr("Chemical Disinfection") + onClicked: vDisinfectAdjustDisinfect .doDisinfectChemical()} ] } + + // ----- Responses + Connections { target: vDisinfectAdjustDisinfect + onAdjustmentTriggered : { + if ( ! visible ) return + if ( vDisinfectAdjustDisinfect.adjustment_Accepted ) { + _root.notificationText = "" + _mainStack.doSettingsDisinfect( // go to disinfect stack + vDisinfectAdjustDisinfect.flush , + vDisinfectAdjustDisinfect.heat , + vDisinfectAdjustDisinfect.chemical ) + pop() // back to settings stack main menu + } else { + _root.notificationText = vDisinfectAdjustDisinfect.text() + } + } + } } Index: sources/view/hd/data/VHDOperationModeData.cpp =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re28183bddebf7383c1bd113e7b8ef4ea11f494fb --- sources/view/hd/data/VHDOperationModeData.cpp (.../VHDOperationModeData.cpp) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/view/hd/data/VHDOperationModeData.cpp (.../VHDOperationModeData.cpp) (revision e28183bddebf7383c1bd113e7b8ef4ea11f494fb) @@ -46,12 +46,12 @@ // Go to home is kind of tricky and needs to be managed here in the backend. // It seems we need more states. // It can be handled in the QML but two things will happen that none of which are good. - // Problem : The issue is for example FW may changed the opMode state to TPAR <=> INIT but during that subMode is not changing. - // and when it comes back to the opMode Init again only opMode is changing which is not enough, - // because we still need to know when we are in INIT what subMode of INIT we need to be in - // and because that doesn't change QML since FW change opMode INIT <=> TPAR then UI is doing nothing. + // Problem : The issue is for example FW may changed the opMode state to TPAR <=> STAN but during that, subMode is not changing. + // and when it comes back to the opMode STAN again only opMode is changing which is not enough, + // because we still need to know when we are in STAN what subMode of STAN we need to be in + // and because that doesn't change QML, since FW change opMode STAN <=> TPAR then UI is doing nothing. // The solutions on QML side are: - // 1 - On each standby change INIT <=> TPAR which is not good because if in INIT we need to the go to the anything other than Start/waitTreatment. + // 1 - On each standby change STAN <=> TPAR which is not good because if in STAN we need to go to the anything other than Start/waitTreatment. // Issue : But then the home screen would jump. // 2 - And we can also check that if subMode is Start/WaitTreatment go to home in QML. // 3 - Make the sub PROPERTY as TRIGGER and if standby is true trigger them.