Index: sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r9667ff80660933cb89207a510c4fb111148181d4 --- sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (.../EndTreatmentRecirculateStack.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (.../EndTreatmentRecirculateStack.qml) (revision 9667ff80660933cb89207a510c4fb111148181d4) @@ -25,88 +25,114 @@ * \brief the end treatment recirculate stack screen */ StackItem { id: _root - objectName: "_EndTreatmentRecirculateStack" + objectName: "_recirculateRecirculateStack" stackView.initialItem : null property int stackStepIndex : 0 signal reconnectClicked () - signal recirculateConfirmClicked() + signal confirmDisconnectClicked () + signal confirmReconnectClicked () signal recirculateBackClicked () signal treatmentEndClicked () - onReconnectClicked : vTreatmentAdjustmentRecirculate.doReconnect () //84.0 - onRecirculateConfirmClicked : vTreatmentAdjustmentRecirculate.doConfirm () //84.1 - onRecirculateBackClicked : vTreatmentAdjustmentRecirculate.doResume () //84.2 - onTreatmentEndClicked : vTreatmentAdjustmentRecirculate.doTreatmentEnd () //84.3 + onReconnectClicked : vTreatmentAdjustmentRecirculate.doReconnect () //84.0 + onConfirmReconnectClicked : vTreatmentAdjustmentRecirculate.doConfirmReconnect () //84.1 + onRecirculateBackClicked : vTreatmentAdjustmentRecirculate.doResume () //84.2 + onTreatmentEndClicked : vTreatmentAdjustmentRecirculate.doTreatmentEnd () //84.3 + onConfirmDisconnectClicked : vTreatmentAdjustmentRecirculate.doConfirmDisconnect () //84.4 - // Recirculate - EndTreatmentBase { id : _endTreatmentRecirculate - title.text : qsTr("Recirculate") - instructionBased : true - hasTimeout : vTreatmentRecirculate .timeoutTotal - timeoutValue : vTreatmentRecirculate .timeoutCountDown * 60 + readonly property bool timeoutTotal : vTreatmentRecirculate .timeoutTotal + readonly property int timeoutCountdown : vTreatmentRecirculate .timeoutCountDown * 60 + readonly property bool treatmentTimeLeft : true // vTreatmentTime .time_IsLeft // regarding the conversation with Sean (04/23/2023). - footer { - width : parent.width - height : Variables.touchRectHeight - } + component ButtonBackToRecirculate : TouchRect { + text.text : qsTr("BACK TO RECIRCULATE") + onClicked : recirculateBackClicked() + } - FooterStatic { - childrenWidth : 300 - anchors.fill : parent.footer - children : [ - Item { }, - TouchRect { - text.text : qsTr("RECONNECT") - isDefault : true - onClicked : reconnectClicked() - }, - TouchRect { - visible : vTreatmentTime .time_IsLeft - text.text : qsTr("END TREATMENT") - onClicked : treatmentEndClicked() - } - ] - } + component ButtonEndTreatment : TouchRect { + visible : treatmentTimeLeft + text.text : qsTr("END TREATMENT") + onClicked : treatmentEndClicked() } - EndTreatmentBase { id : _endTreatmentReconnect - title.text : qsTr("Reconnect") - instructionBased : true - header.confirmVisible : vTreatmentTime .time_IsLeft - hasTimeout : vTreatmentRecirculate .timeoutTotal - timeoutValue : vTreatmentRecirculate .timeoutCountDown * 60 - onConfirmClicked : recirculateConfirmClicked() + component ButtonReconnect : TouchRect { + text.text : qsTr("RECONNECT") + isDefault : true + onClicked : reconnectClicked() + } + component RecirculateBase : EndTreatmentBase { + property alias footerButtons : _footer.children + property bool confirmVisible : false + + header.confirmVisible : confirmVisible + instructionBased : true + hasTimeout : timeoutTotal + timeoutValue : timeoutCountdown + footer { - width : parent.width - height : Variables.touchRectHeight + width : parent.width + height : Variables.touchRectHeight } - FooterStatic { - childrenWidth : 300 - anchors.fill : parent.footer - children : [ - Item { }, - TouchRect { - visible : vTreatmentTime .time_IsLeft - text.text : qsTr("BACK TO RECIRCULATE") - onClicked : recirculateBackClicked() - }, - TouchRect { - visible : vTreatmentTime .time_IsLeft - text.text : qsTr("END TREATMENT") - onClicked : treatmentEndClicked() - } - ] + FooterStatic { id: _footer + childrenWidth : 300 + anchors.fill : parent.footer } } + // Disconnect + RecirculateBase { id: _recirculateDisconnect + title.text : qsTr("Recirculate Disconnect") + confirmVisible : true + onConfirmClicked : confirmDisconnectClicked() + footerButtons : [ + Item {}, // button placeholder to align the buttons + Item {}, // button placeholder to align the buttons + ButtonEndTreatment {} + ] + } + + // Recirculate + RecirculateBase { id: _recirculateRecirculate + title.text : qsTr("Recirculate") + footerButtons : [ + Item {}, // button placeholder to align the buttons + ButtonReconnect {}, + ButtonEndTreatment {} + ] + } + + // Stopped + RecirculateBase { id: _recirculateStopped + title.text : qsTr("Recirculate Stopped") + footerButtons : [ + Item {}, // button placeholder to align the buttons + ButtonBackToRecirculate {}, + ButtonEndTreatment {} + ] + } + + // Reconnect + RecirculateBase { id: _recirculateReconnect + title.text : qsTr("Recirculate Reconnect") + confirmVisible : true + onConfirmClicked : confirmReconnectClicked() + footerButtons : [ + Item {}, // button placeholder to align the buttons + ButtonBackToRecirculate {}, + ButtonEndTreatment {} + ] + } + Connections { target: vHDTreatmentStates - function onRcStartedChanged ( vValue ) { page( _endTreatmentRecirculate , vValue )} - function onRcStoppedChanged ( vValue ) { page( _endTreatmentReconnect , vValue )} + function onRcDisconnectChanged ( vValue ) { page( _recirculateDisconnect , vValue )} + function onRcStartedChanged ( vValue ) { page( _recirculateRecirculate , vValue )} + function onRcStoppedChanged ( vValue ) { page( _recirculateStopped , vValue )} + function onRcReconnectChanged ( vValue ) { page( _recirculateReconnect , vValue )} } Connections { target: vTreatmentAdjustmentRecirculate @@ -115,8 +141,10 @@ // since the rejection reason will be cleared by each trasition // so it's fine to set all at the same time // and let them cleared for their own message when each get visible. - _endTreatmentRecirculate .reasonText = vTreatmentAdjustmentRecirculate.text(); - _endTreatmentReconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateDisconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateRecirculate .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateStopped .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateReconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); } } }