Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -ra8f982318e444fb1f92ca2e6c1f3446fe9506c2e -rf68b226e67eb500758ee94fe015df48931240013 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision a8f982318e444fb1f92ca2e6c1f3446fe9506c2e) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision f68b226e67eb500758ee94fe015df48931240013) @@ -74,117 +74,32 @@ TreatmentBloodPrime { id: _treatmentBloodPrime } TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem } - TreatmentHome { id: _treatmentHome - onSectionFlowClicked : { + TreatmentHome { id: _treatmentHome } + + Connections { target: _treatmentHome + function onSectionFlowClicked ( vValue ) { _treatmentAdjustmentFlow.open() } - onSectionVitalsClicked : { + function onSectionVitalsClicked ( vValue ) { _vitalEntry.open() } - onSectionPressuresClicked: { + function onSectionPressuresClicked ( vValue ) { _treatmentAdjustmentPressuresLimits.open() } - onSectionTimeClicked : { + function onSectionTimeClicked ( vValue ) { _treatmentAdjustmentDuration.durationValue = vTreatmentTime.time_Total / 60 // minutes => hours _treatmentAdjustmentDuration.open() } - onSectionUltrafiltrationClicked: { + function onSectionUltrafiltrationClicked ( vValue ) { _treatmentUltrafiltrationItem.open() } } - ScreenItem { id: _treatmentTrending -/* ----- TEST: Under the test code, for the plotting of the items ----- - Timer { id: _timer - property real x1: 0 - property real x2: 0 - interval: 500 - running: _treatmentTrending.visible - repeat: true - onTriggered: { - x1 = x1 + 1 - x2 = x2 + 0.1 + ScreenItem { id: _treatmentTrending } - var r = Math.random() - _lineSerries1.append(x1, r * 10 ) - _lineSerries2.append(x2, r ) - } - } - Column { - anchors.fill: parent - anchors.topMargin: Variables.mainMenuHeight - Slider { id : _zoomSlider - width : parent.width - minimum : 0 - maximum : 2 - step : 0.1 - value : 0 - onValueChanged: _chartView.zoom(value) - } - TouchRect { - width : 50 - height : 50 - onClicked: _chartView.zoomReset() - } - - ChartView { id: _chartView - title: "Line" - width: parent.width - height: parent.height - _zoomSlider.height - antialiasing: true - backgroundColor: Colors.transparent - - legend.labelColor: Colors.white - - ValueAxis { id: xAxis1 - color: Colors.white - min: 0 - max: _timer.x1 - } - ValueAxis { id: yAxis1 - color: Colors.white - min: 0 - max: 10 - } - SplineSeries { id: _lineSerries1 - name: "LineSeries" - axisX: xAxis1 - axisY: yAxis1 - } - ValueAxis { id: xAxis2 - color: Colors.white - min: 0 - max: _timer.x2 - } - ValueAxis { id: yAxis2 - color: Colors.white - labelsColor: Colors.red - min: 0 - max: 10 - } - SplineSeries { id: _lineSerries2 - name: "LineSeries" - axisX: xAxis2 - axisY: yAxis2 - } - } - } -*/ - } - //// Treatment Adjustment Dialogs - TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow - onConfirmClicked : vTreatmentAdjustmentFlows.doAdjustment(bloodFlowRateValue, dialysateFlowRateValue) - } - - TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits - onConfirmClicked : vTreatmentAdjustmentPressuresLimits.doAdjustment( - arterialPressureLowerBound , - arterialPressureUpperBound , - venousPressureLowerBound , - venousPressureUpperBound - ) - + TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow } + TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits arterialPressureMinimum : vTreatmentRanges.arterialPressureMonitorMin arterialPressureMaximum : vTreatmentRanges.arterialPressureMonitorMax venousPressureMinimum : vTreatmentRanges.venousPressureMonitorMin @@ -202,10 +117,25 @@ venousPressureValue : vTreatmentPressureOcclusion.venousPressure } - TreatmentAdjustmentDuration { id: _treatmentAdjustmentDuration - onConfirmClicked : vTreatmentAdjustmentDuration.doAdjustment(durationValue) + Connections { target: _treatmentAdjustmentFlow + function onConfirmClicked ( vValue ) { vTreatmentAdjustmentFlows.doAdjustment(bloodFlowRateValue, dialysateFlowRateValue) } } + Connections { target: _treatmentAdjustmentPressuresLimits + function onConfirmClicked ( vValue ) { vTreatmentAdjustmentPressuresLimits.doAdjustment( + arterialPressureLowerBound , + arterialPressureUpperBound , + venousPressureLowerBound , + venousPressureUpperBound + ) + } + } + TreatmentAdjustmentDuration { id: _treatmentAdjustmentDuration } + Connections { target: _treatmentAdjustmentDuration + function onConfirmClicked ( vValue ) { vTreatmentAdjustmentDuration.doAdjustment( + _treatmentAdjustmentDuration.durationValue )} + } + EntryDialog { id: _vitalEntry function update(vSystolic, vDiastolic ,vHeartRate) { _bphrEntry.systolic = vSystolic ? vSystolic : "" @@ -242,7 +172,7 @@ } Connections { target: vTreatmentVitals - onDidTrigger : { + function onDidTrigger ( vSystolic, vDiastolic, vHeartRate ) { if ( vTreatmentVitals.enableDialog ) { _vitalEntry.update(vSystolic, vDiastolic, vHeartRate ) _vitalEntry.open() @@ -253,7 +183,7 @@ // ---------- Manages Responses ---------- Connections { target: vTreatmentAdjustmentDuration - onAdjustmentTriggered : { + function onAdjustmentTriggered ( vValue ) { if ( vTreatmentAdjustmentDuration.adjustment_Accepted ) { vTreatmentUltrafiltration.maximum = vTreatmentAdjustmentDuration.ultrafiltration _treatmentAdjustmentDuration.accept() @@ -265,7 +195,7 @@ } Connections { target: vTreatmentAdjustmentPressuresLimits - onAdjustmentTriggered : { + function onAdjustmentTriggered ( vValue ) { // values have to be update even when rejected HD is reverting back the values. // if accepted will be updated for later [may need refresh later] _treatmentAdjustmentPressuresLimits.arterialPressureLowerBound = vTreatmentAdjustmentPressuresLimits.arterialLimitLow @@ -285,11 +215,11 @@ Connections { target: vHDOperationMode // The initail screen should be the Blood Prime, since that one is the earlier state in the list. // also since it is being used in two stacks In-Treatment and also in End-Treatmet is has been defined in the MainStack. - onInTreatmentChanged : { page( _treatmentBloodPrime , vinTreatment )} + function onInTreatmentChanged ( vValue ) { page( _treatmentBloodPrime , vValue )} } Connections { target: _treatmentBloodPrime - onVisibleChanged: { + function onVisibleChanged ( vValue ) { if (_treatmentBloodPrime.visible) { _treatmentMenu.hidden = true } @@ -298,11 +228,11 @@ Connections { target: vHDTreatmentStates // in-Treatmet - onTxBloodPrimeChanged : { page( _treatmentBloodPrime , vtxBloodPrime )} - onTxDialysisChanged : { page( _treatmentHome , vtxDialysis )} + function onTxBloodPrimeChanged ( vValue ) { page( _treatmentBloodPrime , vValue )} + function onTxDialysisChanged ( vValue ) { page( _treatmentHome , vValue )} } Connections { target: _mainHome - onStartTreatment : { page( _treatmentHome )} + function onStartTreatment ( vValue ) { page( _treatmentHome )} } }