Index: sources/gui/qml/AlarmItem.qml =================================================================== diff -u -rf68b226e67eb500758ee94fe015df48931240013 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision f68b226e67eb500758ee94fe015df48931240013) +++ sources/gui/qml/AlarmItem.qml (.../AlarmItem.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 AlarmItem.qml * \author (last) Behrouz NematiPour - * \date (last) 03-Nov-2022 + * \date (last) 24-Jan-2024 * \author (original) Behrouz NematiPour * \date (original) 01-Mar-2021 * @@ -46,6 +46,7 @@ readonly property alias isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced readonly property alias timeout : vAlarmStatus.alarm_MuteTimeout readonly property alias alarm_AlarmID : vAlarmStatus.alarm_AlarmID + readonly property alias hasAlarm : vAlarmStatus.hasAlarm function clearAlarm() { vAlarmStatus.doClearCondition() @@ -63,11 +64,18 @@ _alarmBar .visible = true } function alarmMaximize() { + // checks if a confirmation is open won't close it by default + // keep it up until user closes it. + if ( _powerItem.isOpen ) return + // The has alarm check has been added here to let other components call this function, // without worrying about the alarmDialog popoing up without an alarm present. // Look at the PowerItem as an example. if ( ! vAlarmStatus.hasAlarm ) return + // close the user confirmation dialog if the alarm dialog is going to be dispalyed + _confirmDialog.close() + if ( _root._DEBUG_DISABLE_MAXIMIZE_ ) { alarmMinimize() } else { @@ -129,7 +137,13 @@ minVisible : ! vAlarmStatus.alarm_Flag_noMinimize titleFading : vHDOperationMode.fault countDown : vTreatmentStop.countDown - countDownVisible : vHDOperationMode.inTreatment && (vHDTreatmentStates.txStop || vHDTreatmentStates.txRinseback) && vTreatmentStop.total + countDownVisible : vHDOperationMode.inTreatment + && ( + vHDTreatmentStates.txStop + || vHDTreatmentStates.txRinseback + || vHDTreatmentStates.txEnd + ) + && vTreatmentStop.total onMuteClicked : vAlarmStatus.doSilence () onResumeClicked : vAlarmStatus.doUserActionResume ()