Index: sources/gui/qml/components/BaseComboBox.qml =================================================================== diff -u -rf7b92a45b2b7fa814fba3d080bcf91d465f279df -r9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f --- sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision f7b92a45b2b7fa814fba3d080bcf91d465f279df) +++ sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision 9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f) @@ -21,7 +21,7 @@ import "qrc:/globals" ComboBox { id: _root - property bool active : true // default leave as regular ComboBox behavior + property bool isActive : true // default leave as regular ComboBox behavior property alias iconSource : _icon.source property alias iconAnchors : _icon.anchors property alias backgroundColor : _background.color @@ -31,27 +31,27 @@ property int actualValue : 0 width : 300 - displayText : _root.active ? currentText : Variables.emptyEntry + displayText : _root.isActive ? currentText : Variables.emptyEntry currentIndex : 0 font.pixelSize : Fonts.fontPixelTextRectTitle leftPadding : 30 signal clear() - onActivated : _root.active = true + onActivated : _root.isActive = true onClear : { currentIndex = 0 - active = false + isActive = false } function refresh () { currentIndex = actualValue } contentItem: Text { id: _displayText text : parent.displayText color : Colors.offWhite - font.pixelSize : _root.active ? Fonts.fontPixelTextRectTitle : Fonts.fontPixelValueControl + font.pixelSize : _root.isActive ? Fonts.fontPixelTextRectTitle : Fonts.fontPixelValueControl verticalAlignment : Text.AlignVCenter - horizontalAlignment : _root.active ? undefined : Text.AlignHCenter + horizontalAlignment : _root.isActive ? undefined : Text.AlignHCenter } background: Rectangle { id: _background Index: sources/gui/qml/compounds/ValueAdjuster.qml =================================================================== diff -u -rf7b92a45b2b7fa814fba3d080bcf91d465f279df -r9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f --- sources/gui/qml/compounds/ValueAdjuster.qml (.../ValueAdjuster.qml) (revision f7b92a45b2b7fa814fba3d080bcf91d465f279df) +++ sources/gui/qml/compounds/ValueAdjuster.qml (.../ValueAdjuster.qml) (revision 9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f) @@ -27,49 +27,49 @@ property real defaultValue: 0 property real step : 0 property real actualValue : 0 - property bool active : false + property bool isActive : false property bool editable : true - property bool allowOff : false - property bool doRefresh : false + property bool canAllowOff : false + property bool canRefresh : false // fix floating-point precision issue readonly property real stepVal : Math.round(step * 100) / 100 readonly property real minVal : Math.round(minimum * 100) / 100 readonly property real val : Math.round(value * 100) / 100 - readonly property bool canIncrement : active ? value < maximum : true - readonly property bool canDecrement : active ? allowOff ? value > 0 : - value > minimum : true + readonly property bool canIncrement : isActive ? value < maximum : true + readonly property bool canDecrement : isActive ? canAllowOff ? value > 0 : + value > minimum : true - onActiveChanged : { - if ( doRefresh ) { doRefresh = false; return; } + onIsActiveChanged : { + if ( canRefresh ) { canRefresh = false; return; } - if ( active ) { _root.value = _root.defaultValue } + if ( isActive ) { _root.value = _root.defaultValue } } - function refresh () { value = actualValue; doRefresh = true } + function refresh () { value = actualValue; canRefresh = true } - function clear() { _root.active = false } + function clear() { _root.isActive = false } function increment() { - if ( ! active ) { active = true; return; } + if ( ! isActive ) { isActive = true; return; } - if ( allowOff ) { value = val < minVal ? minVal : val + stepVal } - else { value += stepVal } + if ( canAllowOff ) { value = val < minVal ? minVal : val + stepVal } + else { value += stepVal } } function decrement() { - if ( ! active ) { active = true; return; } + if ( ! isActive ) { isActive = true; return; } - if ( allowOff ) { value = val > minVal ? val - stepVal : 0 } - else { value -= stepVal } + if ( canAllowOff ) { value = val > minVal ? val - stepVal : 0 } + else { value -= stepVal } } Text { id: _text anchors.centerIn: parent - text : _root.active ? _root.allowOff ? _root.value === 0 ? - "OFF" : - _root.value.toFixed( _root.decimal ) : + text : _root.isActive ? _root.canAllowOff ? _root.value === 0 ? + "OFF" : + _root.value.toFixed( _root.decimal ) : _root.value.toFixed( _root.decimal ) : Variables.emptyEntry color : Colors.offWhite font.pixelSize : Fonts.fontPixelValueControl @@ -122,7 +122,7 @@ pressAndHoldInterval: 0 onClicked: { - if ( _root.editable ) { active = true; focus = true } + if ( _root.editable ) { isActive = true; focus = true } _slider.opacity = 0 } @@ -134,7 +134,7 @@ } onPressAndHold: { - if ( _root.editable ) { active = true; focus = true } + if ( _root.editable ) { isActive = true; focus = true } _sliderMouseArea.grabbed = true } Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml =================================================================== diff -u -r95f6f36face64c2afdabe1904df649738f554709 -r9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f --- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision 95f6f36face64c2afdabe1904df649738f554709) +++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision 9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f) @@ -118,7 +118,7 @@ width : 250 height : 75 pixelSize : 30 - enabled : _potassiumVolumeControl.active && _calciumVolumeControl.active + enabled : _potassiumVolumeControl.isActive && _calciumVolumeControl.isActive onClicked : { if ( vTreatmentCreate.acidConcentrateRejectReason ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason } Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u -r6992763b4202285e647a9aafbdf6752e5707bfe2 -r9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 6992763b4202285e647a9aafbdf6752e5707bfe2) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 9c818f9b2600fa0fb9375f5923bf01ffcbb17e0f) @@ -43,18 +43,18 @@ function activateAndRefresh() { refreshAll () // needs to be first - _bloodFlowRateControl .active = true - _dialysateFlowRateControl .active = true - _durationControl .active = true - _heparinDispensingRateControl .active = true - _heparinBolusVolumeControl .active = true - _heparinStopTimeControl .active = true - _acidConcentrateComboBox .active = true - _bicarbonateConcentrateComboBox .active = true - _dialyzerTypeComboBox .active = true - _dialysateTemperatureControl .active = true - _salineBolusVolumeControl .active = true - _bpMeasurementIntervalControl .active = true + _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 } function refreshAll () { @@ -106,18 +106,18 @@ } function confirmReady () { - return _bloodFlowRateControl .active && _bloodFlowRate .valid && - _dialysateFlowRateControl .active && _dialysateFlowRate .valid && - _durationControl .active && _duration .valid && - _heparinDispensingRateControl .active && _heparinDispensingRate .valid && - _heparinBolusVolumeControl .active && _heparinBolusVolume .valid && - _heparinStopTimeControl .active && _heparinStopTime .valid && - _acidConcentrateComboBox .active && - _bicarbonateConcentrateComboBox .active && - _dialyzerTypeComboBox .active && - _dialysateTemperatureControl .active && _dialysateTemperature .valid && - _salineBolusVolumeControl .active && _salineBolusVolume .valid && - _bpMeasurementIntervalControl .active && _bpMeasurementInterval .valid + return _bloodFlowRateControl .isActive && _bloodFlowRate .valid && + _dialysateFlowRateControl .isActive && _dialysateFlowRate .valid && + _durationControl .isActive && _duration .valid && + _heparinDispensingRateControl .isActive && _heparinDispensingRate .valid && + _heparinBolusVolumeControl .isActive && _heparinBolusVolume .valid && + _heparinStopTimeControl .isActive && _heparinStopTime .valid && + _acidConcentrateComboBox .isActive && + _bicarbonateConcentrateComboBox .isActive && + _dialyzerTypeComboBox .isActive && + _dialysateTemperatureControl .isActive && _dialysateTemperature .valid && + _salineBolusVolumeControl .isActive && _salineBolusVolume .valid && + _bpMeasurementIntervalControl .isActive && _bpMeasurementInterval .valid } function validate () { @@ -149,7 +149,7 @@ Connections { target: _acidConcentrateAdjustment function onAccepted () { _acidConcentrateComboBox.currentIndex = vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.find(_acidConcentrateAdjustment.adjustment) - _acidConcentrateComboBox.active = vTreatmentCreate.acidConcentrateSet = true + _acidConcentrateComboBox.isActive = vTreatmentCreate.acidConcentrateSet = true } } @@ -330,7 +330,7 @@ defaultValue : vTreatmentRanges.heparinBolusVolumeDef actualValue : vTreatmentCreate.heparinBolusVolume decimal : Variables.heparinPrecision - allowOff : true + canAllowOff : true onValueChanged : { if ( ! _heparinBolusVolume.valid ) { vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason } vTreatmentCreate.heparinBolusVolume = value @@ -351,7 +351,7 @@ defaultValue : vTreatmentRanges.heparinDispensingRateDef actualValue : vTreatmentCreate.heparinDispensingRate decimal : Variables.heparinPrecision - allowOff : true + canAllowOff : true onValueChanged : { if ( ! _heparinDispensingRate.valid ) { vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason } // set heparin time to clear when set OFF to value @@ -361,15 +361,15 @@ // if set to OFF set heparin stop time 0 if ( ! vTreatmentCreate.heparinDispensingRate ) { - _heparinStopTimeControl.active = true + _heparinStopTimeControl.isActive = true _heparinStopTimeControl.value = 0 } } - onActiveChanged: { - if ( ! vTreatmentCreate.heparinDispensingRate && active ) { - _heparinStopTimeControl.active = true - _heparinStopTimeControl.value = 0 + onIsActiveChanged: { + if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) { + _heparinStopTimeControl.isActive = true + _heparinStopTimeControl.value = 0 } } } @@ -388,7 +388,7 @@ defaultValue : _durationControl.value actualValue : vTreatmentCreate.heparinStopTime enabled : vTreatmentCreate.heparinDispensingRate - allowOff : true + canAllowOff : true onValueChanged : { if ( ! _heparinStopTime.valid ) { vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason } vTreatmentCreate.heparinStopTime = value @@ -432,7 +432,7 @@ anchors.leftMargin : anchors.rightMargin anchors.topMargin : Variables.defaultMargin / 2 anchors.bottomMargin: anchors.topMargin - active : false + isActive : false enabled : _root.editingEnabled currentIndex : vTreatmentCreate.acidConcentrate model : vTreatmentRanges.acidConcentrateOptions @@ -460,7 +460,7 @@ anchors.leftMargin : anchors.rightMargin anchors.topMargin : Variables.defaultMargin / 2 anchors.bottomMargin: anchors.topMargin - active : false + isActive : false enabled : _root.editingEnabled currentIndex : vTreatmentCreate.bicarbonateConcentrate model : vTreatmentRanges.bicarbonateConcentrateOptions @@ -484,7 +484,7 @@ anchors.leftMargin : anchors.rightMargin anchors.topMargin : Variables.defaultMargin / 2 anchors.bottomMargin: anchors.topMargin - active : false + isActive : false enabled : _root.editingEnabled currentIndex : vTreatmentCreate.dialyzerType model : vTreatmentRanges.dialyzerTypeOptions @@ -549,7 +549,7 @@ step : vTreatmentRanges.bloodPressureMeasureIntervalRes defaultValue : vTreatmentRanges.bloodPressureMeasureIntervalDef actualValue : vTreatmentCreate.bloodPressureMeasureInterval - allowOff : true + canAllowOff : true onValueChanged : { if ( ! _bpMeasurementInterval.valid ) { vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason } vTreatmentCreate.bloodPressureMeasureInterval = value