Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r9c7a790376d07de7ddaa67e39d47102d68693c87 -r364084de84fda5151cc65fbcb7e94eff6542bd11 --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 9c7a790376d07de7ddaa67e39d47102d68693c87) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 364084de84fda5151cc65fbcb7e94eff6542bd11) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2025 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 MainStack.qml - * \author (last) Behrouz NematiPour - * \date (last) 14-Mar-2023 + * \author (last) Dara Navaei + * \date (last) 01-Apr-2025 * \author (original) Behrouz NematiPour * \date (original) 01-Mar-2021 * @@ -38,10 +38,14 @@ // DEBUG: this property can mostly be used for debugging to get pass the initial screen property var initialItem: _postModeScreen - property var _startupScreen: _GuiView.manufactSetup ? _settingsStack : _mainHome + property var _startupScreen: ( _GuiView.manufactSetup || _GuiView.updateSetup ) ? _settingsStack : _mainHome stackView.initialItem : _root.initialItem + function clearSbReason (vValue ) { + if (vValue) vTreatmentAdjustmentSaline.adjustment_Reason = 0 + } + // Standby / Disinfection DisinfectStack { id: _disinfectStack } // Pre Treatment @@ -145,18 +149,19 @@ function onIsSettingsChanged ( vValue ) { if( vValue ) _mainMenu.isSettings () } function onFaultChanged ( vValue ) { page( _startupScreen , vValue )} - function onServiceChanged ( vValue ) { } + function onServiceChanged ( vValue ) { page( _startupScreen , vValue )} function onInitChanged ( vValue ) { page( _postModeScreen , vValue && ! vSettings.noCANBus ) if( vValue ) vHDPOSTData.reset() // better to reset on vinit = true because the rest makes the screen animation to run } function onHomeChanged ( vValue ) { page( _startupScreen , vValue )} function onStandbyChanged ( vValue ) { /* It depends on the subModes of the standBy. Handled by onHome. */ } function onStandbyStartChanged ( vValue ) { /* It depends on the subModes of the standBy. Handled by onHome. */ } - function onStandbyWaitTreatmentChanged ( vValue ) { /* It depends on the subModes of the standBy. Handled by onHome. */ } + function onStandbyWaitTreatmentChanged ( vValue ) { if ( vValue ) vDisinfectAdjustDisinfect.hasCancel = false } function onStandbyWaitDisinfectChanged ( vValue ) { page( _disinfectStack , vValue )} - function onValidateParametersChanged ( vValue ) { page( _preTreatmentCreateStack , vValue )} + function onValidateParametersChanged ( vValue ) { _preTreatmentCreateStack.clear ( vValue ) // vValue == true if enterig the state ( clear only on entering). + page( _preTreatmentCreateStack , vValue )} function onPreTreatmentChanged ( vValue ) { page( _preTreatmentStack , vValue )} function onInTreatmentChanged ( vValue ) { page( _treatmentStack , vValue )} function onPostTreatmentChanged ( vValue ) { page( _postTreatmentStack , vValue )} @@ -172,18 +177,25 @@ function onBpRampChanged ( vValue ) { page( null , vValue )} // in-Treatmet - function onTxDialysisChanged ( vValue ) { page( _treatmentStack , vValue )} + function onTxDialysisChanged ( vValue ) { page( _treatmentStack , vValue ) + clearSbReason(vValue) } function onTxRinsebackChanged ( vValue ) { page( _endTreatmentRinsebackStack , vValue )} function onTxRecirculateChanged ( vValue ) { page( _endTreatmentRecirculateStack , vValue )} function onTxEndChanged ( vValue ) { page( _endTreatmentEndStack , vValue )} // Treatment Stop - function onTxStopChanged ( vValue ) { page( _treatmentStack , vValue )} + function onTxStopChanged ( vValue ) { page( _treatmentStack , vValue ) + clearSbReason(vValue) } function onTsRecirculateChanged ( vValue ) { page( null , vValue )} function onTsRecirculateDialysateChanged( vValue ) { page( null , vValue )} function onTsRecirculateBloodChanged ( vValue ) { page( null , vValue )} function onTsRecirculateNoChanged ( vValue ) { page( null , vValue )} + + // Saline bolus states + function onSbIdleChanged ( vValue ) { clearSbReason(vValue) } + function onSbWaitPumpChanged ( vValue ) { clearSbReason(vValue) } + function onSbRunningChanged ( vValue ) { clearSbReason(vValue) } } Connections { target: vPreTreatmentAdjustmentInitTreatment