Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r768259b3c00ee3fbc5ba04475763b43cfac76bfe -rec7f919fdb70ff29a8de627937e4ad7008e59c1c --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 768259b3c00ee3fbc5ba04475763b43cfac76bfe) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision ec7f919fdb70ff29a8de627937e4ad7008e59c1c) @@ -32,6 +32,7 @@ StackItem { id : _root objectName: "TreatmentStack" + onVisibleChanged: console.debug(" ~~~~~~~~~~ ", objectName) stackView.initialItem : null // ultrafiltration state information bar properties @@ -65,9 +66,6 @@ TreatmentBloodPrime { id: _treatmentBloodPrime } TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem } TreatmentHome { id: _treatmentHome - onVisibleChanged : { - vTreatmentVitals.enableDialog = visible - } onSectionFlowClicked : { _treatmentAdjustmentFlow.open() } @@ -87,9 +85,6 @@ } ScreenItem { id: _treatmentTrending - onVisibleChanged : { - vTreatmentVitals.enableDialog = visible - } /* ----- TEST: Under the test code, for the plotting of the items ----- Timer { id: _timer property real x1: 0 @@ -181,29 +176,39 @@ } titleText : qsTr("VITALS") - autoHide : true - autoHideDuration : vTreatmentVitals.timeout * 60000 // min => ms confirmEnabled : _bphrEntry.isValid onConfirmClicked : { + _vitalEntry.close() vTreatmentVitals.doConfirm( _bphrEntry.systolic , _bphrEntry.diastolic , _bphrEntry.heartRate ) - _vitalEntry.close() } - onCloseClicked : + onCloseClicked : { vTreatmentVitals.doSkip() // only for logging + } - onAutoHidden : - vTreatmentVitals.doTimeout() // only for logging - onOpened : _bphrEntry.setFocus() + onOpened : { + vTreatmentVitals.doTimerStop() // Can't be moved to C++, and has to be handled here because it can manually being opened by the user + _bphrEntry.setFocus() + } + onClosed : { + vTreatmentVitals.doTimerStart() + } + BPHREntry { id : _bphrEntry contentRectHeight : _vitalEntry.contentRect.height - onClicked : { - _vitalEntry.autoHideCancel = true + } + + Connections { target: vTreatmentVitals + onDidTrigger : { + if ( vTreatmentVitals.enableDialog ) { + _vitalEntry.update(vSystolic, vDiastolic, vHeartRate ) + _vitalEntry.open() + } } } } @@ -291,10 +296,4 @@ Connections { target: _mainHome onStartTreatment : { page( _treatmentHome )} } - - Connections { target: vTreatmentVitals - onDidTrigger : { - _vitalEntry.update(vSystolic, vDiastolic, vHeartRate ) - _vitalEntry.open() } - } }