Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml =================================================================== diff -u -r016578b44e879b89bd42dda7763ed50e67d7e64c -ra159e12630645a9a35fb0a5585cc7b639cfe6aa6 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml (.../TreatmentAdjustmentFlow.qml) (revision 016578b44e879b89bd42dda7763ed50e67d7e64c) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml (.../TreatmentAdjustmentFlow.qml) (revision a159e12630645a9a35fb0a5585cc7b639cfe6aa6) @@ -42,20 +42,35 @@ titleText: qsTr("FLOWS") + // Note : The slider values are not bound and will be set by user freely + // and will be used to be sent for adjustment + // if accepted will not changed and + // if rejected then will be reset to the values passed by adjustment response + + // reset the flow values to the current flow values + function currentFlows() { + _bloodFlowSlider .value = vTreatmentBloodFlow. bloodFlow_FlowSetPoint + _dialysateFlowSlider.value = vTreatmentDialysateFlow.dialysateFlow_FlowSetPoint + } + + // reset the flow values to the values of the adjustment response + function resetFlows() { + _bloodFlowSlider .value = vTreatmentAdjustmentFlows. bloodFlow_FlowSetPoint; + _dialysateFlowSlider.value = vTreatmentAdjustmentFlows.dialysateFlow_FlowSetPoint; + } + onAboutToShow: { // TODO : When Testing data on Setting screen is removed // This needs to be moved into the Treatment______.qml - bloodFlowRateValue = vTreatmentBloodFlow. bloodFlow_FlowSetPoint - dialysateFlowRateValue = vTreatmentDialysateFlow.dialysateFlow_FlowSetPoint + currentFlows() } Connections { target: vTreatmentAdjustmentFlows - onAdjustmentFlowTriggered: { + onAdjustmentTriggered: { if ( vTreatmentAdjustmentFlows.adjustment_Accepted ) { accept() } else { - _bloodFlowSlider .value = vTreatmentAdjustmentFlows. bloodFlow_FlowSetPoint; - _dialysateFlowSlider.value = vTreatmentAdjustmentFlows.dialysateFlow_FlowSetPoint; + resetFlows() notificationText = vTreatmentAdjustmentFlows.text(); } } @@ -80,8 +95,8 @@ anchors.verticalCenter: parent.verticalCenter width : 600 height : 5 - minimum : 100 - maximum : 500 + minimum : Variables.bloodFlowMin + maximum : Variables.bloodFlowMax unit : _root.unit step : Variables.bloodFlowResolution ticks : true @@ -108,8 +123,8 @@ anchors.verticalCenter: parent.verticalCenter width : 600 height : 5 - minimum : 100 - maximum : 600 + minimum : vTreatmentRanges.treatmentRanges_Dialysate_Flow_Min + maximum : vTreatmentRanges.treatmentRanges_Dialysate_Flow_Max unit : _root.unit step : Variables.dialysateFlowResolution ticks : true