Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -rab7ffd27ecea1277d8645a8b62ff48c0cb3f6ff4 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision ab7ffd27ecea1277d8645a8b62ff48c0cb3f6ff4) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2024 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 + * \file PostTreatmentStack.qml * \author (last) Behrouz NematiPour - * \date (last) 12-Apr-2021 + * \date (last) 11-Aug-2023 * \author (original) Behrouz NematiPour - * \date (original) 12-Apr-2021 + * \date (original) 13-Apr-2021 * */ @@ -35,7 +35,23 @@ signal disposablesRemovalConfirm () signal disposablesRemovalBack () + onPatientDisconnectionConfirm : { vPostTreatmentAdjustmentPatientDisconnectionConfirm .doNotify ( ) + /* No wait for Rsp, so navigates => */ page( _treatmentReviewConfirm ) + /* After navigation ask for Tx data */ vPostTreatmentAdjustmentTreatmentLog .doRequest( )} + onTreatmentReviewConfirm : { vPostTreatmentAdjustmentPatientDisconnectionConfirm .doConfirm( )} + onDisposablesRemovalConfirm : vPostTreatmentAdjustmentDisposablesRemovalConfirm .doConfirm( ) + onDisposablesRemovalBack : page( _treatmentReviewConfirm ) + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = true + } + else { + stackView.initialItem = null + } + } + PostTreatmentBase { id: _patientDisconnectionConfirm + objectName :"_patientDisconnectionConfirm" property int stackStepIndex : 0 header.confirmVisible : true title.text : qsTr("Patient Disconnection") @@ -44,6 +60,7 @@ } PostTreatmentReview { id: _treatmentReviewConfirm + objectName :"_treatmentReviewConfirm" property int stackStepIndex : 1 header.confirmVisible : true title.text : qsTr("Treatment Review") @@ -56,13 +73,15 @@ } PostTreatmentBase { id: _detailTest + objectName :"_detailTest" property int stackStepIndex : 1 onBackClicked : pop() header.backVisible : true header.confirmVisible : false } PostTreatmentBase { id: _disposablesRemovalConfirm + objectName :"_disposablesRemovalConfirm" property int stackStepIndex : 2 header. backVisible : true header.confirmVisible : true @@ -72,26 +91,31 @@ onBackClicked : _root.disposablesRemovalBack () } + // connections Connections { target: vPostTreatmentStates - onPatientDisconnectionChanged : { console.debug("patientDisconnection", vpatientDisconnection )} - onDrainReservoirsChanged : { console.debug("drainReservoirs ", vdrainReservoirs )} - onVerifyChanged : { console.debug("verify ", vverify )} + function onDrainReservoirsChanged ( vValue ) { console.debug("drainReservoirs ", vValue )} + function onPatientDisconnectionChanged ( vValue ) { console.debug("patientDisconnection", vValue )} + function onDisposableRemovalChanged ( vValue ) { console.debug("disposableRemoval ", vValue )} + function onVerifyChanged ( vValue ) { console.debug("verify ", vValue )} } Connections { target: vHDOperationMode - onPostTreatmentChanged : { page( _patientDisconnectionConfirm , vpostTreatment )} + function onPostTreatmentChanged ( vValue ) { page( _patientDisconnectionConfirm , vValue )} } - onPatientDisconnectionConfirm : { vPostTreatmentAdjustmentPatientDisconnectionConfirm .doConfirm( ) - /* No wait for Rsp, so navigates => */ page( _treatmentReviewConfirm ) - /* After navigate ask for Tx data */ vPostTreatmentAdjustmentTreatmentLog .doRequest( )} - onTreatmentReviewConfirm : { page( _disposablesRemovalConfirm ) - vTreatmentVitals.doReset() + + Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm + function onAdjustmentTriggered ( vValue ) { + if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { + page( _disposablesRemovalConfirm ) + _treatmentReviewConfirm.reasonText = "" + } else { + _treatmentReviewConfirm.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() + } + } } - onDisposablesRemovalConfirm : { vPostTreatmentAdjustmentDisposablesRemovalConfirm .doConfirm( )} - onDisposablesRemovalBack : { page( _treatmentReviewConfirm )} Connections { target: vPostTreatmentAdjustmentDisposablesRemovalConfirm - onAdjustmentTriggered : { + function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentDisposablesRemovalConfirm.adjustment_Accepted ) { _disposablesRemovalConfirm.reasonText = "" } else { @@ -101,21 +125,12 @@ } Connections { target: vPostTreatmentAdjustmentTreatmentLog - onAdjustmentTriggered : { + function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentTreatmentLog.adjustment_Accepted ) { _treatmentReviewConfirm.reasonText = "" } else { _treatmentReviewConfirm.reasonText = vPostTreatmentAdjustmentTreatmentLog.text() } } } - - onVisibleChanged: { - if (visible) { - _mainMenu.hidden = true - } - else { - stackView.initialItem = null - } - } }