Index: en_US.udic =================================================================== diff -u -r1f2e7dbd08b00f8c56eedf29f083733570aa642e -r799431fc75a1fbe1b874f08344c009c6b511047d --- en_US.udic (.../en_US.udic) (revision 1f2e7dbd08b00f8c56eedf29f083733570aa642e) +++ en_US.udic (.../en_US.udic) (revision 799431fc75a1fbe1b874f08344c009c6b511047d) @@ -213,3 +213,4 @@ nd pre vcan +Gui Index: sources/gui/qml/components/EntryDialog.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r799431fc75a1fbe1b874f08344c009c6b511047d --- sources/gui/qml/components/EntryDialog.qml (.../EntryDialog.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/components/EntryDialog.qml (.../EntryDialog.qml) (revision 799431fc75a1fbe1b874f08344c009c6b511047d) @@ -34,7 +34,7 @@ signal closeClicked() signal confirmClicked() signal opened () - signal closed () + signal closed ( bool vQuit ) property bool closeVisible : true @@ -53,12 +53,11 @@ property alias notification : _notification property alias titleText : _titleText.text + function open ( ) { opacity = 1 + opened ( ) } + function close ( vQuit ) { opacity = 0 + closed ( vQuit ) } - function open () { opacity = 1 - opened () } - function close () { opacity = 0 - closed () } - width : Variables.applicationWidth height : Variables.applicationHeight opacity : 0 Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -raf8d98b36b427e2b5f4d6659fcf3b58ee79eab6a -r799431fc75a1fbe1b874f08344c009c6b511047d --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision af8d98b36b427e2b5f4d6659fcf3b58ee79eab6a) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 799431fc75a1fbe1b874f08344c009c6b511047d) @@ -34,7 +34,7 @@ onVisibleChanged : { // this should never happen by design, but in tests it can easily happen and will block the screen touch. _treatmentAdjustmentFlow .close() - _vitalEntry .close() + _vitalEntry .close( true ) // vQuit == true _treatmentAdjustmentPressuresLimits .close() _treatmentAdjustmentDuration .close() _treatmentUltrafiltrationItem .close() @@ -167,7 +167,8 @@ } onClosed : { - vTreatmentVitals.doTimerStart() + if ( ! vQuit ) + vTreatmentVitals.doTimerStart() } BPHREntry { id : _bphrEntry Index: sources/model/hd/alarm/MAlarmMapping.cpp =================================================================== diff -u -r30aa19476989c3eb6d88d327cc28b189d443d245 -r799431fc75a1fbe1b874f08344c009c6b511047d --- sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision 30aa19476989c3eb6d88d327cc28b189d443d245) +++ sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision 799431fc75a1fbe1b874f08344c009c6b511047d) @@ -7,7 +7,7 @@ * * \file MAlarmMapping.cpp * \author (last) Behrouz NematiPour - * \date (last) 21-Feb-2023 + * \date (last) 28-Feb-2023 * \author (original) Behrouz NematiPour * \date (original) 03-May-2021 * Index: sources/view/hd/adjustment/common/VCommonAdjustmentVitals.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r799431fc75a1fbe1b874f08344c009c6b511047d --- sources/view/hd/adjustment/common/VCommonAdjustmentVitals.cpp (.../VCommonAdjustmentVitals.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/hd/adjustment/common/VCommonAdjustmentVitals.cpp (.../VCommonAdjustmentVitals.cpp) (revision 799431fc75a1fbe1b874f08344c009c6b511047d) @@ -31,8 +31,8 @@ void View::VTreatmentVitals::initConnections() { ACTION_RECEIVE_BRIDGE_CONNECTION(_BluetoothInterface, UIBloodPressureData); - connect(this, SIGNAL( intervalChanged (const quint8 &)), - this, SLOT(onTimerChanged ( ))); + connect(this, SIGNAL( intervalChanged (const quint8 &)), + this, SLOT(onIntervalChanged ( ))); } /*! @@ -171,22 +171,23 @@ */ void View::VTreatmentVitals::timerEvent(QTimerEvent *) { + if ( ! _timerId ) return; // No timer started or failed starting if ( ! _interval ) return; // if interval is 0/OFF return - _secCounter++; - if ( _secCounter % 60 ) return; // only check every minute + _counter_sec++; + if ( _counter_sec % 60 ) return; // only check every minute - if ( ! _timerCounter ) { + if ( ! _counter_min ) { timerStop(); emit didTrigger(); } else { - _timerCounter--; - _secCounter = 0; + _counter_min--; + _counter_sec = 0; } } -void View::VTreatmentVitals::onTimerChanged() +void View::VTreatmentVitals::onIntervalChanged() { if ( _interval ) timerReset(); else timerStop (); // Timer stop is resetting timer too. @@ -199,6 +200,9 @@ */ void View::VTreatmentVitals::timerStart() { + if ( _timerId ) killTimer(_timerId); // this typically should not happen. + if ( ! _interval ) return; // if interval is 0/OFF return + timerReset(); _timerId = startTimer(1000); // 1 sec interval which will used as 1 min in timerEvent (easier to debug) } @@ -207,12 +211,12 @@ { if ( _interval ) { // ( -1 ) :the interval is 0 based but if as an example we set the counter to 5 then 5 itself gets a minute to pass which makes it 6 min. - _timerCounter = _interval - 1; + _counter_min = _interval - 1; } else { // if _interval == 0, counter should set to 0 too not to -1 - _timerCounter = 0; + _counter_min = 0; } - _secCounter = 0; + _counter_sec = 0; } /*! @@ -221,6 +225,7 @@ */ void View::VTreatmentVitals::timerStop() { + if ( ! _timerId ) return; // No timer started or failed starting killTimer(_timerId); _timerId = 0; timerReset(); Index: sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r799431fc75a1fbe1b874f08344c009c6b511047d --- sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h (.../VCommonAdjustmentVitals.h) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h (.../VCommonAdjustmentVitals.h) (revision 799431fc75a1fbe1b874f08344c009c6b511047d) @@ -36,9 +36,9 @@ // friends friend class ::tst_views; - int _timerId = 0; - int _timerCounter = 0; - int _secCounter = 0; + int _timerId = 0; // 0 means no timer started or failed to start. + int _counter_sec = 0; + int _counter_min = 0; // disabled coco begin validated: // The property adjustment_Triggered has to be always true @@ -89,7 +89,7 @@ void timerEvent(QTimerEvent *) override; private slots: - void onTimerChanged(); + void onIntervalChanged(); public slots: // vitals