Index: leahi.qrc =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- leahi.qrc (.../leahi.qrc) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ leahi.qrc (.../leahi.qrc) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -99,7 +99,6 @@ resources/images/Information.png resources/images/Storage.png resources/images/help.png - resources/images/Popup_gradient.png resources/images/Menu_Dot.png resources/images/ArrowLeftDisabled.png resources/images/ArrowRightDisabled.png @@ -163,7 +162,6 @@ sources/gui/qml/components/HeaderBar.qml sources/gui/qml/components/HeaderBarPopup.qml sources/gui/qml/components/AlarmButtonRow.qml - sources/gui/qml/components/ValueControl.qml sources/gui/qml/components/BaseComboBox.qml @@ -174,6 +172,8 @@ sources/gui/qml/compounds/TouchGrid.qml sources/gui/qml/compounds/BPHREntry.qml sources/gui/qml/compounds/PreTreatmentCreateItem.qml + sources/gui/qml/compounds/ValueAdjuster.qml + qtquickcontrols2.conf Index: sources/gui/qml/components/BaseComboBox.qml =================================================================== diff -u -r56c2adbc6e724c09d5ca9d61cb0a1581d46daf02 -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision 56c2adbc6e724c09d5ca9d61cb0a1581d46daf02) +++ sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -30,12 +30,12 @@ property int delegateHeight : height width : 300 - displayText : _root.active ? currentText : "-- --" + displayText : _root.active ? currentText : Variables.emptyEntry currentIndex : 0 font.pixelSize : Fonts.fontPixelTextRectTitle leftPadding : 30 - signal clear + signal clear() onActivated : _root.active = true onClear : { Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -37,7 +37,6 @@ property alias notificationText : _notification.text property alias notification : _notification property bool showDropShadow : false - property bool showGradient : false width : Variables.dialogWidth height : Variables.dialogHeight @@ -64,13 +63,6 @@ color : Colors.backgroundDialog radius: Variables.dialogRadius - Image { id: _backgroundImage - anchors.fill: parent - source : "qrc:/images/iPopupGradient" - fillMode : Image.Stretch - visible : _root.showGradient - } - layer.enabled: showDropShadow layer.effect: DropShadow { id: _dropShadow Fisheye: Tag da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a refers to a dead (removed) revision in file `sources/gui/qml/components/ValueControl.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/compounds/PreTreatmentCreateItem.qml =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/compounds/PreTreatmentCreateItem.qml (.../PreTreatmentCreateItem.qml) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/gui/qml/compounds/PreTreatmentCreateItem.qml (.../PreTreatmentCreateItem.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -41,7 +41,7 @@ color: valid ? Colors.panelBorderColor : Colors.panelInvalidBorderColor } - signal editClicked + signal editClicked() Row { id: _titleRow anchors { Index: sources/gui/qml/compounds/ValueAdjuster.qml =================================================================== diff -u --- sources/gui/qml/compounds/ValueAdjuster.qml (revision 0) +++ sources/gui/qml/compounds/ValueAdjuster.qml (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -0,0 +1,196 @@ +/*! + * + * Copyright (c) 2021-2025 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file ValueAdjuster.qml + * \author (last) Nico Ramirez + * \date (last) 21-Aug-2025 + * \author (original) Nico Ramirez + * \date (original) 21-Aug-2025 + * + */ + +import "qrc:/globals" +import "qrc:/components" + +import QtQuick 2.12 +import QtQuick.Controls 2.2 + +Item { id: _root + property real decimal : 0 + property real minimum : 0 + property real maximum : 0 + property real value : 0 + property real defaultValue : 0 + property real step : 0 + + property bool active : false + property bool editable : true + + property bool canIncrement : active ? value < maximum : true + property bool canDecrement : active ? allowOff ? value > 0 : + value > minimum : true + + property bool allowOff : false + + onActiveChanged : if ( active ) { _root.value = _root.defaultValue } + + function clear() { _root.active = false } + + function increment() { + if ( ! active ) { active = true } + else { + if ( allowOff ) { _root.value = value < minimum ? minimum : _root.value + _root.step} + else { _root.value += _root.step } + } + } + + function decrement() { + if ( ! active ) { active = true } + else { + if ( allowOff ) { _root.value = value > minimum ? _root.value - _root.step : 0 } + else { _root.value -= _root.step } + } + } + + Text { id: _text + anchors.centerIn: parent + text : _root.active ? _root.allowOff ? _root.value === 0 ? + "OFF" : + _root.value.toFixed( _root.decimal ) : + _root.value.toFixed( _root.decimal ) : Variables.emptyEntry + color : Colors.offWhite + font.pixelSize : Fonts.fontPixelValueControl + } + + Slider { id: _slider + property real pos : 0 + + anchors.fill : parent + anchors.rightMargin : Variables.defaultMargin * 3 + anchors.leftMargin : Variables.defaultMargin * 2 + anchors.topMargin : 5 + enabled : _root.editable + visible : enabled + opacity : 0 + stepSize : _root.step + from : _root.minimum .toFixed ( _root.decimal ) + to : _root.maximum .toFixed ( _root.decimal ) + value : _root.value .toFixed ( _root.decimal ) + snapMode : Slider.SnapOnRelease + + background: Rectangle { + color: "transparent" + Rectangle { + anchors{ + top : parent.top + topMargin : 1.5 + left : parent.left + right : parent.right + rightMargin : Variables.defaultMargin * -1 + } + height : 1 + width : parent.width + color : Colors.panelBorderColor + } + } + + handle: Rectangle { id: _knob + width : 20 + height : 4 + radius : height + color : Colors.borderButton + x : _slider.pos * _slider.width + } + + MouseArea { id: _sliderMouseArea + property bool grabbed: false + + anchors.fill : parent + pressAndHoldInterval: 0 + + onClicked: { + if ( _root.editable ) { + active = true + focus = true + } + + _slider.opacity = 0 + } + + onReleased: { + _sliderMouseArea.grabbed = true +. grabbed = false + _slider.opacity = 0 + } + + onPressAndHold: { + if ( _root.editable ) { + active = true + focus = true + } + + _sliderMouseArea.grabbed = true + } + + onPositionChanged: { + if (grabbed) { + if ( _slider.opacity === 0 ) { _animator.start() } + + _slider.pos = Math.max(0, Math.min(1, mouse.x / parent.width)) + let raw = _slider.from + _slider.pos * (_slider.to - _slider.from) + let stepped = Math.round((raw - _slider.from) / _root.step) * _root.step + _slider.from + _root.value = stepped + } + } + + onExited: { + if ( ! _sliderMouseArea.grabbed ) { + _animator.stop() + _slider.opacity = 0 + } + } + } + + OpacityAnimator { id: _animator + target : _slider + from : 0 + to : 1 + duration: 350 + running : _sliderMouseArea.grabbed + } + + Behavior on opacity { NumberAnimation { duration: 200 } } + } + + IconButton { id: _leftArrow + anchors { + verticalCenter : _root.verticalCenter + left : _root.left + leftMargin : Variables.defaultMargin + } + iconSize : Variables.circleButtonDefaultDiameter + enabled : _root.canDecrement + visible : _root.editable + iconImageSource : enabled ? "qrc:/images/iArrowLeft" : + "qrc:/images/iArrowLeftDisabled" + onClicked : decrement() + } + + IconButton { id: _rightArrow + anchors { + verticalCenter : _root.verticalCenter + right : _root.right + rightMargin : Variables.defaultMargin + } + iconSize : Variables.circleButtonDefaultDiameter + enabled : _root.canIncrement + visible : _root.editable + iconImageSource : enabled ? "qrc:/images/iArrowRight" : + "qrc:/images/iArrowRightDisabled" + onClicked : increment() + } +} Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -35,10 +35,10 @@ width : 1000 height : 600 padding : Variables.defaultMargin - showGradient : true + onVisibleChanged: notificationText = "" - contentItem: Item { id : _contentItem - width: _root.width + Item { id : _contentItem + anchors.fill: parent TitleText { id: _titleText anchors { @@ -76,7 +76,7 @@ width : _root.controlWidth height : _root.controlHeight - contentItem : ValueControl { id: _potassiumVolumeControl + contentItem : ValueAdjuster{ id: _potassiumVolumeControl minimum : Variables.potassiumMin // TODO: NR - Update to .conf values when available maximum : Variables.potassiumMax // LEAHI-PRS-660 , LEAHI-PRS-241 step : Variables.potassiumResolution @@ -97,7 +97,7 @@ width : _root.controlWidth height : _root.controlHeight - contentItem : ValueControl { id: _calciumVolumeControl + contentItem : ValueAdjuster { id: _calciumVolumeControl minimum : Variables.calciumMin // TODO: NR - Update to .conf values when available maximum : Variables.calciumMax // LEAHI-PRS-660 , LEAHI-PRS-241 step : Variables.calciumResolution @@ -109,7 +109,7 @@ TouchRect { id : _saveButton anchors { bottom : parent.bottom - bottomMargin : Variables.defaultMargin * 2 + bottomMargin : notification.visible ? Variables.defaultMargin * 5 : Variables.defaultMargin * 2 horizontalCenter: parent.horizontalCenter } text.text : qsTr("Save") @@ -120,11 +120,24 @@ enabled : _potassiumVolumeControl.active && _calciumVolumeControl.active onClicked : { + if ( vTreatmentCreate.acidConcentrateRejectReason ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason } vTreatmentRanges.doSaveAcidConcentrate(_root.adjustment) - _potassiumVolumeControl.clear() - _calciumVolumeControl.clear() - _root.accept() } + + Behavior on anchors.bottomMargin { NumberAnimation { duration: 300} } } + + Connections { target: vTreatmentRanges + function onAcidConcentrateAcceptedChanged ( vAccepted ) { + if ( vAccepted ) { + _potassiumVolumeControl.clear() + _calciumVolumeControl.clear() + _root.accept() + } + else { + notificationText = qsTr("Duplicate Acid Concentrate Entry") + } + } + } } } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -114,7 +114,7 @@ readonly property int arrowIconDiameter : 35 readonly property int muteIconDiameter : 38 readonly property int headerIconDiameter : 40 - readonly property int topBarMenuHeight : 80 //// ----- @LEAHIZED + readonly property int topBarMenuHeight : 100 //// ----- @LEAHIZED readonly property int sliderCircleDiameter : 30 readonly property int pressuresProgressbarWidth : 725 @@ -257,6 +257,8 @@ readonly property var regExp_PatientID: /[A-Za-z0-9_\-\.]{1,64}/ + readonly property string emptyEntry : "-- --" + readonly property string preTreatmentStepLabelCreate : qsTr("CREATE" ) readonly property string preTreatmentStepLabelConfirm : qsTr("CONFIRM" ) readonly property string preTreatmentStepLabelPriming : qsTr("PRIME" ) Index: sources/gui/qml/pages/TreatmentFlowBase.qml =================================================================== diff -u -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) +++ sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -94,7 +94,7 @@ anchors { top : _root.top topMargin : titleTopMargin - left : parent.horizontalCenter + horizontalCenter: parent.horizontalCenter } text : qsTr("TreatmentFlowBase") color : Colors.textMain Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -186,10 +186,11 @@ width : cellWidth PreTreatmentCreateItem { id: _patientID - anchors.verticalCenter : parent.verticalCenter - text : qsTr("Patient ID") - showUnit : false - height : cellHeight - Variables.defaultMargin + anchors.verticalCenter : parent.verticalCenter + text : qsTr("Patient ID") + showUnit : false + height : cellHeight - Variables.defaultMargin + contentArea.anchors.leftMargin : 120 contentItem : TextEntry { id: _pretreatmentPatientIDEntry clip : true @@ -205,8 +206,10 @@ onEditingFinished : vTreatmentCreate.patientID = text Text { id: _patientIDPlaceHolderText - text : "-- --" - anchors.centerIn : parent + text : Variables.emptyEntry + anchors.fill : parent + rightPadding : 115 + horizontalAlignment : Text.AlignRight font.pixelSize : Fonts.fontPixelValueControl color : Colors.offWhite visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 && @@ -221,13 +224,16 @@ unitText : Variables.unitTextFlowRate valid : ! vTreatmentCreate.bloodFlowRateRejectReason - contentItem : ValueControl { id: _bloodFlowRateControl + contentItem : ValueAdjuster { id: _bloodFlowRateControl editable : _root.editingEnabled minimum : vTreatmentRanges.bloodFlowRateMin maximum : vTreatmentRanges.bloodFlowRateMax step : vTreatmentRanges.bloodFlowRateRes defaultValue : vTreatmentRanges.bloodFlowRateDef - onValueChanged : vTreatmentCreate.bloodFlowRate = value + onValueChanged : { + if ( ! _bloodFlowRate.valid ) { vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason } + vTreatmentCreate.bloodFlowRate = value + } } } @@ -236,7 +242,7 @@ unitText : Variables.unitTextFlowRate valid : ! vTreatmentCreate.dialysateFlowRateRejectReason - contentItem : ValueControl { id: _dialysateFlowRateControl + contentItem : ValueAdjuster { id: _dialysateFlowRateControl editable : _root.editingEnabled minimum : vTreatmentRanges.dialysateFlowRateMin maximum : vTreatmentRanges.dialysateFlowRateMax @@ -251,15 +257,20 @@ unitText : Variables.unitTextDuration valid : ! vTreatmentCreate.treatmentDurationRejectReason - contentItem : ValueControl { id: _durationControl + contentItem : ValueAdjuster { id: _durationControl editable : _root.editingEnabled minimum : vTreatmentRanges.treatmentDurationMin maximum : vTreatmentRanges.treatmentDurationMax step : vTreatmentRanges.treatmentDurationRes defaultValue : vTreatmentRanges.treatmentDurationDef onValueChanged : { + if ( ! _duration.valid ) { vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason } vTreatmentCreate.treatmentDuration = value - if (_heparinStopTimeControl.value > value) { _heparinStopTimeControl.value = value } + + // set heparin time to clear when duration is changed + if ( _heparinStopTimeControl.enabled ) { + _heparinStopTimeControl.clear() + } } } } @@ -269,14 +280,31 @@ unitText : Variables.unitTextDispensingRate valid : ! vTreatmentCreate.heparinDispensingRateRejectReason - contentItem : ValueControl { id: _heparinDispensingRateControl + contentItem : ValueAdjuster { id: _heparinDispensingRateControl editable : _root.editingEnabled minimum : vTreatmentRanges.heparinDispensingRateMin maximum : vTreatmentRanges.heparinDispensingRateMax step : vTreatmentRanges.heparinDispensingRateRes defaultValue : vTreatmentRanges.heparinDispensingRateDef decimal : Variables.heparinPrecision - onValueChanged : vTreatmentCreate.heparinDispensingRate = value + allowOff : true + onValueChanged : { + if ( ! _heparinDispensingRate.valid ) { vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason } + vTreatmentCreate.heparinDispensingRate = value + + // if set to OFF set heparin stop time 0 + if ( ! vTreatmentCreate.heparinDispensingRate ) { + _heparinStopTimeControl.active = true + _heparinStopTimeControl.value = 0 + } + } + + onActiveChanged: { + if ( ! vTreatmentCreate.heparinDispensingRate && active ) { + _heparinStopTimeControl.active = true + _heparinStopTimeControl.value = 0 + } + } } } @@ -285,14 +313,18 @@ unitText : Variables.unitTextFluid valid : ! vTreatmentCreate.heparinBolusVolumeRejectReason - contentItem : ValueControl { id: _heparinBolusVolumeControl + contentItem : ValueAdjuster { id: _heparinBolusVolumeControl editable : _root.editingEnabled minimum : vTreatmentRanges.heparinBolusVolumeMin maximum : vTreatmentRanges.heparinBolusVolumeMax step : vTreatmentRanges.heparinBolusVolumeRes defaultValue : vTreatmentRanges.heparinBolusVolumeDef decimal : Variables.heparinPrecision - onValueChanged : vTreatmentCreate.heparinBolusVolume = value + allowOff : true + onValueChanged : { + if ( ! _heparinBolusVolume.valid ) { vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason } + vTreatmentCreate.heparinBolusVolume = value + } } } @@ -301,13 +333,17 @@ unitText : Variables.unitTextDuration valid : ! vTreatmentCreate.heparinStopTimeRejectReason - contentItem : ValueControl { id: _heparinStopTimeControl + contentItem : ValueAdjuster { id: _heparinStopTimeControl editable : _root.editingEnabled minimum : vTreatmentRanges.heparinStopTimeMin maximum : _durationControl.value step : _durationControl.step defaultValue : _durationControl.value - onValueChanged : vTreatmentCreate.heparinStopTime = value + enabled : vTreatmentCreate.heparinDispensingRate + onValueChanged : { + if ( ! _heparinStopTime.valid ) { vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason } + vTreatmentCreate.heparinStopTime = value + } } } } @@ -329,7 +365,7 @@ Text { id: _txCode anchors.bottom : _qrCode.bottom - text : vTreatmentCreate.txCode ? qsTr("TX Code: ") + vTreatmentCreate.txCode : " " + text : vTreatmentCreate.txCode ? qsTr("Tx Code: ") + vTreatmentCreate.txCode : " " color : "#DBE9FA" font.pixelSize : Fonts.fontPixelButton } @@ -357,6 +393,7 @@ } onActivated : { + if ( ! _acidConcentrate.valid ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason } vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.currentIndex vTreatmentCreate.acidConcentrateSet = true } @@ -379,6 +416,7 @@ model : vTreatmentRanges.bicarbonateConcentrateOptions onClear : vTreatmentCreate.bicarbonateConcentrateSet = false onActivated : { + if ( ! _bicarbonateConcentrate.valid ) { vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason } vTreatmentCreate.bicarbonateConcentrate = _bicarbonateConcentrateComboBox.currentIndex vTreatmentCreate.bicarbonateConcentrateSet = true } @@ -401,6 +439,7 @@ model : vTreatmentRanges.dialyzerTypeOptions onClear : vTreatmentCreate.dialyzerTypeSet = false onActivated : { + if ( ! _dialyzerType.valid ) { vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason } vTreatmentCreate.dialyzerType = _dialyzerTypeComboBox.currentIndex vTreatmentCreate.dialyzerTypeSet = true } @@ -412,14 +451,17 @@ unitText : Variables.unitTextTemperature valid : ! vTreatmentCreate.dialysateTempRejectReason - contentItem : ValueControl { id: _dialysateTemperatureControl + contentItem : ValueAdjuster { id: _dialysateTemperatureControl editable : _root.editingEnabled minimum : vTreatmentRanges.dialysateTempMin maximum : vTreatmentRanges.dialysateTempMax step : vTreatmentRanges.dialysateTempRes defaultValue : vTreatmentRanges.dialysateTempDef decimal : Variables.dialysateTempPrecision - onValueChanged : vTreatmentCreate.dialysateTemp = value + onValueChanged : { + if ( ! _dialysateTemperature.valid ) { vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason } + vTreatmentCreate.dialysateTemp = value + } } } @@ -428,13 +470,16 @@ unitText : Variables.unitTextFluid valid : ! vTreatmentCreate.salineBolusVolumeRejectReason - contentItem : ValueControl { id: _salineBolusVolumeControl + contentItem : ValueAdjuster { id: _salineBolusVolumeControl editable : _root.editingEnabled minimum : vTreatmentRanges.salineBolusVolumeMin maximum : vTreatmentRanges.salineBolusVolumeMax step : vTreatmentRanges.salineBolusVolumeRes defaultValue : vTreatmentRanges.salineBolusVolumeDef - onValueChanged : vTreatmentCreate.salineBolusVolume = value + onValueChanged : { + if ( ! _salineBolusVolume.valid ) { vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason } + vTreatmentCreate.salineBolusVolume = value + } } } @@ -443,13 +488,17 @@ unitText : Variables.unitTextDuration valid : ! vTreatmentCreate.bloodPressureMeasureIntervalRejectReason - contentItem : ValueControl { id: _bpMeasurementIntervalControl + contentItem : ValueAdjuster { id: _bpMeasurementIntervalControl editable : _root.editingEnabled minimum : vTreatmentRanges.bloodPressureMeasureIntervalMin maximum : vTreatmentRanges.bloodPressureMeasureIntervalMax step : vTreatmentRanges.bloodPressureMeasureIntervalRes defaultValue : vTreatmentRanges.bloodPressureMeasureIntervalDef - onValueChanged : vTreatmentCreate.bloodPressureMeasureInterval = value + allowOff : true + onValueChanged : { + if ( ! _bpMeasurementInterval.valid ) { vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason } + vTreatmentCreate.bloodPressureMeasureInterval = value + } } } } Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -28,7 +28,7 @@ StackItem { id: _root objectName: "_PreTreatmentCreateStack" - stackView.initialItem : _pretreatmentCreate + stackView.initialItem : null property int stackStepIndex : 0 @@ -47,4 +47,8 @@ stackView.initialItem = null } } + + Connections { target: vTDOpMode + function onValidateParametersChanged ( vValue ) { page( _pretreatmentCreate )} + } } Index: sources/view/hd/data/VTreatmentRanges.cpp =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -55,15 +55,16 @@ void View::VTreatmentRanges::doSaveAcidConcentrate (const QString &vOption) { // check if unique - if ( _acidConcentrateOptions.contains(vOption) ) { return; } + if ( _acidConcentrateOptions.contains(vOption) ) { acidConcentrateAccepted(false); return; } - if ( ! _acidConcentrate.isEmpty() ) { _acidConcentrateOptions.removeLast(); } + if ( ! _acidConcentrate.isEmpty() ) { _acidConcentrateOptions.removeOne(_acidConcentrate); } _acidConcentrateOptions.append(vOption); acidConcentrate(vOption); // update emit acidConcentrateOptionsChanged(_acidConcentrateOptions); + acidConcentrateAccepted(true); } /** @@ -75,7 +76,7 @@ { if ( ! vSet ) { return; } - if ( ! _acidConcentrate.isEmpty() ) { _acidConcentrateOptions.removeLast(); } + if ( ! _acidConcentrate.isEmpty() ) { _acidConcentrateOptions.removeOne(_acidConcentrate); } acidConcentrate(""); // update Index: sources/view/hd/data/VTreatmentRanges.h =================================================================== diff -u -r7d2122a9a4330ebc2ff4c22be36f32e9a82417ec -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a --- sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision 7d2122a9a4330ebc2ff4c22be36f32e9a82417ec) +++ sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) @@ -59,6 +59,7 @@ READONLY( QStringList , dialyzerTypeOptions ,{}) PROPERTY( QString , acidConcentrate ,"") + TRIGGER ( bool , acidConcentrateAccepted , false) RANGESET( float , dialysateTemp , 0) RANGESET( qint32 , trancembrncPressureLimitWindow , 0)