Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u -r5d7e02ed6481cc6ae1c944a5ba1687766f7f8375 -r10d95daf091fedda008906727088648f66ae5bac --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 5d7e02ed6481cc6ae1c944a5ba1687766f7f8375) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 10d95daf091fedda008906727088648f66ae5bac) @@ -43,18 +43,18 @@ function activateAndRefresh() { refreshAll () // needs to be first - _bloodFlowRateControl .isActive = true - _dialysateFlowRateControl .isActive = true - _durationControl .isActive = true - _heparinDispensingRateControl .isActive = true - _heparinBolusVolumeControl .isActive = true - _heparinStopTimeControl .isActive = true - _acidConcentrateComboBox .isActive = true - _bicarbonateConcentrateComboBox .isActive = true - _dialyzerTypeComboBox .isActive = true - _dialysateTemperatureControl .isActive = true - _salineBolusVolumeControl .isActive = true - _bpMeasurementIntervalControl .isActive = true + vTreatmentCreate.bloodFlowRateSet = true + vTreatmentCreate.dialysateFlowRateSet = true + vTreatmentCreate.treatmentDurationSet = true + vTreatmentCreate.heparinDispensingRateSet = true + vTreatmentCreate.heparinBolusVolumeSet = true + vTreatmentCreate.heparinStopTimeSet = true + vTreatmentCreate.dialysateTempSet = true + vTreatmentCreate.salineBolusVolumeSet = true + vTreatmentCreate.bloodPressureMeasureIntervalSet = true + vTreatmentCreate.acidConcentrateSet = true + vTreatmentCreate.bicarbonateConcentrateSet = true + vTreatmentCreate.dialyzerTypeSet = true } function refreshAll () { @@ -146,8 +146,7 @@ Connections { target: _acidConcentrateAdjustment function onAccepted () { - _acidConcentrateComboBox.currentIndex = vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.find(_acidConcentrateAdjustment.adjustment) - _acidConcentrateComboBox.isActive = vTreatmentCreate.acidConcentrateSet = true + vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.find(_acidConcentrateAdjustment.adjustment) } } @@ -266,10 +265,12 @@ maximum : vTreatmentRanges.bloodFlowRateMax step : vTreatmentRanges.bloodFlowRateRes defaultValue : vTreatmentRanges.bloodFlowRateDef - actualValue : vTreatmentCreate.bloodFlowRate - onValueChanged : { + value : vTreatmentCreate.bloodFlowRate + isActive : vTreatmentCreate.bloodFlowRateSet + onDidActiveChange: function(vState) { vTreatmentCreate.bloodFlowRateSet = vState } + onDidChange : function(vValue) { if ( ! _bloodFlowRate.valid ) { vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason } - vTreatmentCreate.bloodFlowRate = value + vTreatmentCreate.bloodFlowRate = vValue } } } @@ -285,10 +286,12 @@ maximum : vTreatmentRanges.dialysateFlowRateMax step : vTreatmentRanges.dialysateFlowRateRes defaultValue : vTreatmentRanges.dialysateFlowRateDef - actualValue : vTreatmentCreate.dialysateFlowRate - onValueChanged : { + value : vTreatmentCreate.dialysateFlowRate + isActive : vTreatmentCreate.dialysateFlowRateSet + onDidActiveChange: function(vState) { vTreatmentCreate.dialysateFlowRateSet = vState } + onDidChange : function(vValue) { if ( ! _dialysateFlowRate.valid ) { vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason } - vTreatmentCreate.dialysateFlowRate = value + vTreatmentCreate.dialysateFlowRate = vValue } } } @@ -304,10 +307,12 @@ maximum : vTreatmentRanges.treatmentDurationMax step : vTreatmentRanges.treatmentDurationRes defaultValue : vTreatmentRanges.treatmentDurationDef - actualValue : vTreatmentCreate.treatmentDuration - onValueChanged : { + value : vTreatmentCreate.treatmentDuration + isActive : vTreatmentCreate.treatmentDurationSet + onDidActiveChange: function(vState) { vTreatmentCreate.treatmentDurationSet = vState } + onDidChange : function(vValue) { if ( ! _duration.valid ) { vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason } - vTreatmentCreate.treatmentDuration = value + vTreatmentCreate.treatmentDuration = vValue // set heparin time to clear when set if ( _heparinStopTimeControl.enabled ) { _heparinStopTimeControl.clear() } @@ -326,12 +331,14 @@ maximum : vTreatmentRanges.heparinBolusVolumeMax step : vTreatmentRanges.heparinBolusVolumeRes defaultValue : vTreatmentRanges.heparinBolusVolumeDef - actualValue : vTreatmentCreate.heparinBolusVolume + value : vTreatmentCreate.heparinBolusVolume decimal : Variables.heparinPrecision canOff : true - onValueChanged : { + isActive : vTreatmentCreate.heparinBolusVolumeSet + onDidActiveChange: function(vState) { vTreatmentCreate.heparinBolusVolumeSet = vState } + onDidChange : function(vValue) { if ( ! _heparinBolusVolume.valid ) { vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason } - vTreatmentCreate.heparinBolusVolume = value + vTreatmentCreate.heparinBolusVolume = vValue } } } @@ -347,27 +354,29 @@ maximum : vTreatmentRanges.heparinDispensingRateMax step : vTreatmentRanges.heparinDispensingRateRes defaultValue : vTreatmentRanges.heparinDispensingRateDef - actualValue : vTreatmentCreate.heparinDispensingRate + value : vTreatmentCreate.heparinDispensingRate decimal : Variables.heparinPrecision canOff : true - onValueChanged : { + isActive : vTreatmentCreate.heparinDispensingRateSet + onDidActiveChange: function(vState) { vTreatmentCreate.heparinDispensingRateSet = vState } + onDidChange : function(vValue) { if ( ! _heparinDispensingRate.valid ) { vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason } // set heparin time to clear when set OFF to value - if ( ! vTreatmentCreate.heparinDispensingRate && value ) { _heparinStopTimeControl.clear() } + if ( ! vTreatmentCreate.heparinDispensingRate && vValue ) { _heparinStopTimeControl.clear() } - vTreatmentCreate.heparinDispensingRate = value + vTreatmentCreate.heparinDispensingRate = vValue // if set to OFF set heparin stop time 0 if ( ! vTreatmentCreate.heparinDispensingRate ) { - _heparinStopTimeControl.isActive = true - _heparinStopTimeControl.value = 0 + vTreatmentCreate.heparinStopTimeSet = true + vTreatmentCreate.heparinStopTime = 0 } } onIsActiveChanged: { if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) { - _heparinStopTimeControl.isActive = true - _heparinStopTimeControl.value = 0 + vTreatmentCreate.heparinStopTimeSet = true + vTreatmentCreate.heparinStopTime = 0 } } } @@ -384,12 +393,14 @@ maximum : _durationControl.value step : _durationControl.step defaultValue : _durationControl.value - actualValue : vTreatmentCreate.heparinStopTime + value : vTreatmentCreate.heparinStopTime enabled : vTreatmentCreate.heparinDispensingRate canOff : true - onValueChanged : { + isActive : vTreatmentCreate.heparinStopTimeSet + onDidActiveChange: function(vState) { vTreatmentCreate.heparinStopTimeSet = vState } + onDidChange : function(vValue) { if ( ! _heparinStopTime.valid ) { vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason } - vTreatmentCreate.heparinStopTime = value + vTreatmentCreate.heparinStopTime = vValue } } } @@ -430,11 +441,10 @@ anchors.leftMargin : anchors.rightMargin anchors.topMargin : Variables.defaultMargin / 2 anchors.bottomMargin: anchors.topMargin - isActive : false + isActive : vTreatmentCreate.acidConcentrateSet enabled : _root.editingEnabled currentIndex : vTreatmentCreate.acidConcentrate model : vTreatmentRanges.acidConcentrateOptions - actualValue : vTreatmentCreate.acidConcentrate onClear : { vTreatmentRanges.doClearAcidConcentrate(vTreatmentCreate.acidConcentrateSet) vTreatmentCreate.acidConcentrateSet = false @@ -458,11 +468,10 @@ anchors.leftMargin : anchors.rightMargin anchors.topMargin : Variables.defaultMargin / 2 anchors.bottomMargin: anchors.topMargin - isActive : false + isActive : vTreatmentCreate.bicarbonateConcentrateSet enabled : _root.editingEnabled currentIndex : vTreatmentCreate.bicarbonateConcentrate model : vTreatmentRanges.bicarbonateConcentrateOptions - actualValue : vTreatmentCreate.bicarbonateConcentrate onClear : vTreatmentCreate.bicarbonateConcentrateSet = false onActivated : { if ( ! _bicarbonateConcentrate.valid ) { vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason } @@ -482,11 +491,10 @@ anchors.leftMargin : anchors.rightMargin anchors.topMargin : Variables.defaultMargin / 2 anchors.bottomMargin: anchors.topMargin - isActive : false + isActive : vTreatmentCreate.dialyzerTypeSet enabled : _root.editingEnabled currentIndex : vTreatmentCreate.dialyzerType model : vTreatmentRanges.dialyzerTypeOptions - actualValue : vTreatmentCreate.dialyzerType onClear : vTreatmentCreate.dialyzerTypeSet = false onActivated : { if ( ! _dialyzerType.valid ) { vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason } @@ -507,11 +515,13 @@ maximum : vTreatmentRanges.dialysateTempMax step : vTreatmentRanges.dialysateTempRes defaultValue : vTreatmentRanges.dialysateTempDef - actualValue : vTreatmentCreate.dialysateTemp + value : vTreatmentCreate.dialysateTemp decimal : Variables.dialysateTempPrecision - onValueChanged : { + isActive : vTreatmentCreate.dialysateTempSet + onDidActiveChange: function(vState) { vTreatmentCreate.dialysateTempSet = vState } + onDidChange : function(vValue) { if ( ! _dialysateTemperature.valid ) { vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason } - vTreatmentCreate.dialysateTemp = value + vTreatmentCreate.dialysateTemp = vValue } } } @@ -527,10 +537,12 @@ maximum : vTreatmentRanges.salineBolusVolumeMax step : vTreatmentRanges.salineBolusVolumeRes defaultValue : vTreatmentRanges.salineBolusVolumeDef - actualValue : vTreatmentCreate.salineBolusVolume - onValueChanged : { + value : vTreatmentCreate.salineBolusVolume + isActive : vTreatmentCreate.salineBolusVolumeSet + onDidActiveChange: function(vState) { vTreatmentCreate.salineBolusVolumeSet = vState } + onDidChange : function(vValue) { if ( ! _salineBolusVolume.valid ) { vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason } - vTreatmentCreate.salineBolusVolume = value + vTreatmentCreate.salineBolusVolume = vValue } } } @@ -546,11 +558,13 @@ maximum : vTreatmentRanges.bloodPressureMeasureIntervalMax step : vTreatmentRanges.bloodPressureMeasureIntervalRes defaultValue : vTreatmentRanges.bloodPressureMeasureIntervalDef - actualValue : vTreatmentCreate.bloodPressureMeasureInterval + value : vTreatmentCreate.bloodPressureMeasureInterval canOff : true - onValueChanged : { + isActive : vTreatmentCreate.bloodPressureMeasureIntervalSet + onDidActiveChange: function(vState) { vTreatmentCreate.bloodPressureMeasureIntervalSet = vState } + onDidChange : function(vValue) { if ( ! _bpMeasurementInterval.valid ) { vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason } - vTreatmentCreate.bloodPressureMeasureInterval = value + vTreatmentCreate.bloodPressureMeasureInterval = vValue } } }