Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -rec7f919fdb70ff29a8de627937e4ad7008e59c1c -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision ec7f919fdb70ff29a8de627937e4ad7008e59c1c) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2022 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 PostTreatmentStack.qml * \author (last) Behrouz NematiPour - * \date (last) 28-Feb-2022 + * \date (last) 11-Aug-2023 * \author (original) Behrouz NematiPour * \date (original) 13-Apr-2021 * @@ -35,6 +35,21 @@ 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 @@ -76,24 +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 )} - onDisposablesRemovalConfirm : { vPostTreatmentAdjustmentDisposablesRemovalConfirm .doConfirm( )} - onDisposablesRemovalBack : { page( _treatmentReviewConfirm )} + Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm + function onAdjustmentTriggered ( vValue ) { + if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { + page( _disposablesRemovalConfirm ) + _treatmentReviewConfirm.reasonText = "" + } else { + _treatmentReviewConfirm.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() + } + } + } + Connections { target: vPostTreatmentAdjustmentDisposablesRemovalConfirm - onAdjustmentTriggered : { + function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentDisposablesRemovalConfirm.adjustment_Accepted ) { _disposablesRemovalConfirm.reasonText = "" } else { @@ -103,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 - } - } }