Index: leahi.qrc =================================================================== diff -u -rb04fa0fce565a52305f2153f2cb6c5858453ab15 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- leahi.qrc (.../leahi.qrc) (revision b04fa0fce565a52305f2153f2cb6c5858453ab15) +++ leahi.qrc (.../leahi.qrc) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -34,6 +34,7 @@ sources/gui/qml/dialogs/NotificationDialog.qml sources/gui/qml/dialogs/AlarmListDialog.qml sources/gui/qml/dialogs/LockDialog.qml + sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml @@ -98,6 +99,10 @@ 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 sources/gui/qml/components/MainMenu.qml @@ -127,10 +132,6 @@ sources/gui/qml/components/TimeText.qml sources/gui/qml/components/ProgressCircle.qml sources/gui/qml/components/Slider.qml - sources/gui/qml/components/SliderCreateTreatment.qml - sources/gui/qml/components/ConfirmTreatmentTable.qml - sources/gui/qml/components/ConfirmTreatmentSubTable.qml - sources/gui/qml/components/GridSelection.qml sources/gui/qml/components/ProgressBarEx.qml sources/gui/qml/components/CloseButton.qml sources/gui/qml/components/ConfirmButton.qml @@ -141,7 +142,6 @@ sources/gui/qml/components/ImageWave.qml sources/gui/qml/components/ImageClock.qml sources/gui/qml/components/ImageLogoDDarkTransparent.qml - sources/gui/qml/components/ConfirmTreatmentTableEntry.qml sources/gui/qml/components/DebugDataColumn.qml sources/gui/qml/components/RangeSlider.qml sources/gui/qml/components/MuteButton.qml @@ -163,6 +163,8 @@ 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 sources/gui/qml/compounds/PressureRangeSlider.qml @@ -233,9 +235,9 @@ sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml - sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml - sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml + sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml + sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateItem.qml sources/gui/qml/pages/pretreatment/connection/PreTreatmentUltrafiltration.qml Index: sources/gui/qml/components/BaseComboBox.qml =================================================================== diff -u --- sources/gui/qml/components/BaseComboBox.qml (revision 0) +++ sources/gui/qml/components/BaseComboBox.qml (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -0,0 +1,108 @@ +/*! + * + * 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 BaseComboBox.qml + * \author (last) Nico Ramirez + * \date (last) 21-Aug-2025 + * \author (original) Nico Ramirez + * \date (original) 21-Aug-2025 + * + */ + +// Qt +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +// Qml imports +import "qrc:/globals" + +ComboBox { id: _root + property bool active : true // default leave as regular ComboBox behavior + property alias iconSource : _icon.source + property alias iconAnchors : _icon.anchors + property alias backgroundColor : _background.color + property alias dropDownWidth : _popup.width + property int delegateWidth : dropDownWidth + property int delegateHeight : height + + width : 300 + displayText : _root.active ? currentText : "-- --" + currentIndex : 0 + font.pixelSize : Fonts.fontPixelTextRectTitle + leftPadding : 30 + + signal clear + + onActivated : _root.active = true + onClear : { + currentIndex = 0 + active = false + } + + contentItem: Text { id: _displayText + text : parent.displayText + color : Colors.offWhite + font.pixelSize : _root.active ? Fonts.fontPixelTextRectTitle : Fonts.fontPixelValueControl + verticalAlignment : Text.AlignVCenter + horizontalAlignment : _root.active ? undefined : Text.AlignHCenter + } + + background: Rectangle { id: _background + color : Colors.highlightMedProgressBar + radius : Variables.dialogRadius + } + + delegate: ItemDelegate { id: _delegate + width : _root.delegateWidth + height : _root.delegateHeight + highlighted : _root.highlightedIndex === index + + contentItem: Text { + text : modelData + color : Colors.offWhite + font : _root.font + verticalAlignment : Text.AlignVCenter + leftPadding : 30 + } + + background: Rectangle { + anchors.fill : parent + visible : _delegate.down || _delegate.highlighted || _delegate.visualFocus + color : _delegate.down ? Colors.backgroundButtonSelect : + Colors.backgroundButtonSelectDark + radius : Variables.dialogRadius + } + } + + popup: Popup { id: _popup + y : _root.height + x : 0 + width : _root.width + implicitHeight : contentItem.implicitHeight + + contentItem: ListView { + clip : true + implicitHeight : contentHeight + currentIndex : _root.highlightedIndex + model : _root.popup.visible ? _root.delegateModel : null + } + + background: Rectangle { + color : Colors.treatmentSectionHeader + radius : Variables.dialogRadius + } + } + + indicator: Image { id: _icon + source : enabled ? "qrc:/images/iChevronDown" : "" + anchors.verticalCenter : parent.verticalCenter + anchors.right : parent.right + anchors.rightMargin : Variables.defaultMargin + width : Variables.iconButtonSize + height : width + } +} Index: sources/gui/qml/components/CloseButton.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/components/CloseButton.qml (.../CloseButton.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/CloseButton.qml (.../CloseButton.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -24,7 +24,7 @@ width : 50 height : 50 - color: "transparent" + color : "transparent" opacity : 1 anchors { Fisheye: Tag 16a8f25568b4636ebc31e76c86a8031940cc4ad7 refers to a dead (removed) revision in file `sources/gui/qml/components/ConfirmTreatmentSubTable.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 16a8f25568b4636ebc31e76c86a8031940cc4ad7 refers to a dead (removed) revision in file `sources/gui/qml/components/ConfirmTreatmentTable.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 16a8f25568b4636ebc31e76c86a8031940cc4ad7 refers to a dead (removed) revision in file `sources/gui/qml/components/ConfirmTreatmentTableEntry.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/components/ContentArea.qml =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/components/ContentArea.qml (.../ContentArea.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ sources/gui/qml/components/ContentArea.qml (.../ContentArea.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -2,12 +2,9 @@ Item { id: _contentArea - height: contentItem ? contentItem.height : - 0 property Item contentItem: Item { id: defaultContentItem parent : _contentArea - height : 10 } onContentItemChanged: { Fisheye: Tag 16a8f25568b4636ebc31e76c86a8031940cc4ad7 refers to a dead (removed) revision in file `sources/gui/qml/components/GridSelection.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/components/HeaderBarPopup.qml =================================================================== diff -u -rfe27956b26aabc3a40ece13a3f8f1723223f737f -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/components/HeaderBarPopup.qml (.../HeaderBarPopup.qml) (revision fe27956b26aabc3a40ece13a3f8f1723223f737f) +++ sources/gui/qml/components/HeaderBarPopup.qml (.../HeaderBarPopup.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -31,7 +31,7 @@ modal : false closePolicy : Dialog.CloseOnPressOutside y : Variables.headerHeight + 5 - backgroundColor : "#FEFEFE" + backgroundColor : Colors.offWhite showDropShadow : true onImplicitWidthChanged: Qt.callLater(function() { if (button) { adjustPosition(_root.button) } }) Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -rdeaef8b5bdfe9be7293e63fb6ac256a9ce3cd3f4 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision deaef8b5bdfe9be7293e63fb6ac256a9ce3cd3f4) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -37,6 +37,7 @@ property alias notificationText : _notification.text property alias notification : _notification property bool showDropShadow : false + property bool showGradient : false width : Variables.dialogWidth height : Variables.dialogHeight @@ -63,6 +64,13 @@ 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 16a8f25568b4636ebc31e76c86a8031940cc4ad7 refers to a dead (removed) revision in file `sources/gui/qml/components/SliderCreateTreatment.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/components/TextEntry.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -41,6 +41,7 @@ signal enterPressed () signal clicked (var vMouse) + signal editingFinished() width : _label.width + _input.width height : TextEntry.EntryHeight @@ -64,6 +65,9 @@ } _keyboard.setVisible(true) } + else { + editingFinished() + } } Text { id : _label Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -rddd2197b24223c540a016e3256f97082f817c088 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision ddd2197b24223c540a016e3256f97082f817c088) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -135,7 +135,7 @@ enabled : _root.touchable anchors.fill : parent anchors.margins : touchExpanding * -1 - onClicked : { if ( ! _private.clickDebouncing ) { onMouseEventLog("Clicked ") ; _root.clicked (); clickDebounceTimer.start(); } } + onClicked : { if ( ! _private.clickDebouncing ) { onMouseEventLog("Clicked ") ; _root.clicked (); clickDebounceTimer.start(); } focus = true; } onPressed : { if ( ! _private.pressDebouncing ) { onMouseEventLog("Pressed ") ; _private.pressed = true ; _root.pressed (); pressDebounceTimer.start(); } } onReleased : { if ( _private.pressed ) { onMouseEventLog("Released ") ; _private.pressed = false; _root.released (); pressDebounceTimer.start(); } } onPressAndHold : { onMouseEventLog("PressAndHold ") ; _root.pressAndHold(); } Index: sources/gui/qml/components/ValueControl.qml =================================================================== diff -u --- sources/gui/qml/components/ValueControl.qml (revision 0) +++ sources/gui/qml/components/ValueControl.qml (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -0,0 +1,91 @@ +/*! + * + * 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 ValueControl.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 + +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 > minimum : true + property bool canDecrement : active ? value < maximum : true + + onActiveChanged : if ( active ) { _root.value = _root.defaultValue } + + function clear() { _root.active = false } + + function increment() { + if ( ! active ) { active = true } + else { _root.value += _root.step } + } + + function decrement() { + if ( ! active ) { active = true } + else { _root.value -= _root.step } + } + + MouseArea { + anchors.fill : parent + propagateComposedEvents : true + onClicked: { + if ( _root.editable ) { active = focus = true } + } + } + + Text { id: _text + anchors.centerIn: parent + text : _root.active ? _root.value.toFixed( _root.decimal ) : "-- --" + color : Colors.offWhite + font.pixelSize : Fonts.fontPixelValueControl + } + + IconButton { id: _leftArrow + anchors { + verticalCenter : _root.verticalCenter + left : _root.left + leftMargin : Variables.defaultMargin + } + iconSize : Variables.circleButtonDefaultDiameter + enabled : _root.canIncrement + 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.canDecrement + visible : _root.editable + iconImageSource : enabled ? "qrc:/images/iArrowRight" : + "qrc:/images/iArrowRightDisabled" + onClicked : increment() + } +} Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml =================================================================== diff -u --- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (revision 0) +++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -0,0 +1,127 @@ +/*! + * + * Copyright (c) 2020-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 AcidConcentrateAdjustment.qml + * \author (last) Nico Ramirez + * \date (last) 25-Aug-2025 + * \author (original) Nico Ramirez + * \date (original) 25-Aug-2025 + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment/create" + +ModalDialog { id : _root + property int controlWidth : 770 + property int controlHeight : 86 + readonly property string adjustment: ("%1 K, %2 Ca, 1 Mg") .arg(_potassiumVolumeControl.value.toFixed(1)) + .arg(_calciumVolumeControl.value.toFixed(1)) + + width : 1000 + height : 600 + padding : Variables.defaultMargin + showGradient : true + + contentItem: Item { id : _contentItem + width: _root.width + + TitleText { id: _titleText + anchors { + top : parent.top + topMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + text : qsTr("Acid Concentrate") + font.pixelSize : Fonts.fontPixelTitle + } + + CloseButton { id: _closeButton + anchors { + top : parent.top + right : parent.right + left : undefined + margins : 0 + } + onClicked: { + _potassiumVolumeControl.clear() + _calciumVolumeControl.clear() + _root.close() + } + } + + PreTreatmentCreateItem { id: _potassium + anchors { + verticalCenter: parent.verticalCenter + verticalCenterOffset: -100 + horizontalCenter: parent.horizontalCenter + } + + text : qsTr("Potassium") + unitText : Variables.unitTextPotassium + width : _root.controlWidth + height : _root.controlHeight + + contentItem : ValueControl { id: _potassiumVolumeControl + minimum : 0 // TODO: NR - Update to .conf values when available + maximum : 5 + step : 0.2 + defaultValue : 2.0 + decimal : 1 + } + } + + PreTreatmentCreateItem { id: _calcium + anchors { + top : _potassium.bottom + topMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + + text : qsTr("Calcium") + unitText : Variables.unitTextCalcium + width : _root.controlWidth + height : _root.controlHeight + + contentItem : ValueControl { id: _calciumVolumeControl + minimum : 0 // TODO: NR - Update to .conf values when available + maximum : 3 + step : 0.1 + defaultValue : 2.5 + decimal : 1 + } + } + + TouchRect { id : _saveButton + anchors { + bottom : parent.bottom + bottomMargin : Variables.defaultMargin * 2 + horizontalCenter: parent.horizontalCenter + } + text.text : qsTr("Save") + isDefault : true + width : 250 + height : 75 + pixelSize : 30 + enabled : _potassiumVolumeControl.active && _calciumVolumeControl.active + + onClicked : { + vTreatmentRanges.doSaveAcidConcentrate(_root.adjustment) + _potassiumVolumeControl.clear() + _calciumVolumeControl.clear() + _root.accept() + } + } + } +} Index: sources/gui/qml/dialogs/AlarmListDialog.qml =================================================================== diff -u -rf7d7e8b10c7626f3c6b8450876721a452ebd730f -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision f7d7e8b10c7626f3c6b8450876721a452ebd730f) +++ sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -36,7 +36,7 @@ property int alarmID : -1 property bool minVisible : true - property color contentbackgroundColor : Colors.alarmDialog + property color contentbackgroundColor : Colors.offWhite property int headerOverlap : 30 backgroundColor : contentbackgroundColor Index: sources/gui/qml/dialogs/NotificationDialog.qml =================================================================== diff -u -rf06b3645936db64dff09721cf625a6a8530e3f0a -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision f06b3645936db64dff09721cf625a6a8530e3f0a) +++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -110,7 +110,7 @@ } Rectangle { id: _descriptionRect - color : Colors.alarmDialog + color : Colors.offWhite clip : true anchors { Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml =================================================================== diff -u -r3c07dc803109f716937b692cb4a67a5324bb9ca3 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml (.../DiagnosticsDialog.qml) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml (.../DiagnosticsDialog.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -26,8 +26,9 @@ */ ModalDialog { id: _root - width : Variables.applicationWidth - height : Variables.applicationHeight - 60 + width : Variables.applicationWidth + height : Variables.applicationHeight - 60 + showGradient : true DiagnosticsSwipe { id: _diagnosticsSwipe anchors.fill: parent Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -rb04fa0fce565a52305f2153f2cb6c5858453ab15 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision b04fa0fce565a52305f2153f2cb6c5858453ab15) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -30,6 +30,7 @@ readonly property color red : "#c53b33" // red readonly property color white : "white" // white readonly property color transparent : "Transparent" // No Color + readonly property color offWhite : "#FEFEFE" readonly property color separatorLine : "#5f809d" readonly property color backgroundMain : "#1A344D" //// ----- @LEAHIZED @@ -57,7 +58,6 @@ readonly property color dialogText : "#343434" readonly property color alarmDialogText : "#343434" readonly property color alarmDialogGreyText : "#838080" - readonly property color alarmDialog : "#FEFEFE" readonly property color dialogShadowColor : "#334E759C" readonly property color dialogValueColor : "#3D8EEF" Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -rf7d7e8b10c7626f3c6b8450876721a452ebd730f -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision f7d7e8b10c7626f3c6b8450876721a452ebd730f) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -49,6 +49,7 @@ readonly property int fontPixelPresseuresText : 22 readonly property int fontPixelPresseuresLabel : 28 + readonly property int fontPixelValueControl : 35 readonly property int fontPixelFluidText : 22 readonly property int fontPixelFluidValue : 32 @@ -82,7 +83,6 @@ readonly property int fontPixelRinsebackAdjustmentButton : 26 readonly property int fontPixelCreateTreatment : 30 - readonly property int fontPixelCreateTreatmentTable : 24 readonly property int fontPixelCircleButtonLabel: 50 Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rf7d7e8b10c7626f3c6b8450876721a452ebd730f -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision f7d7e8b10c7626f3c6b8450876721a452ebd730f) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -119,22 +119,6 @@ readonly property int pressuresProgressbarWidth : 725 - readonly property int gridSelectionButtonHeight : 100 - readonly property int gridSelectionButtonWidth : 375 - - readonly property int createTreatmentFlickableDeceleration : 4500 - readonly property int createTreatmentTableHeight : 800 - readonly property int createTreatmentTableWidth : applicationWidth - 50 - readonly property int createTreatmentMargin : 45 - readonly property int createTreatmentHeaderHeight : 130 - readonly property int createTreatmentTableMargin : 20 - readonly property int createTreatmentSubTableHeight : 50 - readonly property int createTreatmentSubTableWidth : 500 - readonly property int createTreatmentSliderMargin : sliderDefaultBodyHeight - readonly property int createTreatmentSliderHeight : 65 - readonly property int createTreatmentSliderWidth : 750 - readonly property int createTreatmentSwitchYDisplacement : 15 - readonly property int treatmentFlowsComponentWidth : 150 readonly property int treatmentPressureTitleWidth : 125 readonly property int treatmentPressureValueWidth : 140 @@ -265,6 +249,8 @@ readonly property string preTreatmentStepLabelUltrafiltration : qsTr("BEGIN" ) // Units + readonly property string unitTextPotassium : qsTr("K") + readonly property string unitTextCalcium : qsTr("Ca") // - Ultrafiltration readonly property string unitTextUltrafiltrationRate : unitTextFlowRate readonly property string unitTextUltrafiltrationVolume : unitTextVolume Index: sources/gui/qml/main.qml =================================================================== diff -u -rb04fa0fce565a52305f2153f2cb6c5858453ab15 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/main.qml (.../main.qml) (revision b04fa0fce565a52305f2153f2cb6c5858453ab15) +++ sources/gui/qml/main.qml (.../main.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -325,16 +325,18 @@ } // keyboard should always be before AlarmItem to not to covet it. - KeyboardItem { id: _keyboard } + KeyboardItem { id: _keyboard } - WiFiDialog { id: _wifiDialog } - StorageDialog { id: _storageDialog } - SettingsDialog { id: _settingsDialog } - LockDialog { id: _lockDialog } - AlarmItem { id: _alarmItem ; z: 996 } - PowerItem { id: _powerItem ; z: 997 } - ConfirmDialog { id: _confirmDialog ; z: 998 } - DiagnosticsDialog { id: _diagnosticsDialog; z: 999 } + // Dialogs + AcidConcentrateAdjustment { id: _acidConcentrateAdjustment } + HeaderbarWiFi { id: _headerbarWifi } + HeaderbarStorage { id: _headerbarStorage } + HeaderbarSettings { id: _headerbarSettings } + LockDialog { id: _lockDialog } + AlarmItem { id: _alarmItem ; z: 996 } + PowerItem { id: _powerItem ; z: 997 } + ConfirmDialog { id: _confirmDialog ; z: 998 } + DiagnosticsDialog { id: _diagnosticsDialog; z: 999 } // Note: NotificationBar has to be anchored to the main menu and if it is moved into the AlarmItem // then cannot be anchored. Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r204d5f7514be78430a667297ced829bd104880d5 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 204d5f7514be78430a667297ced829bd104880d5) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -46,7 +46,7 @@ // Standby / Disinfection DisinfectStack { id: _disinfectStack } // Pre Treatment - PreTreatmentCreateStack { id: _preTreatmentCreateStack } + PreTreatmentCreate { id: _preTreatmentCreate } PreTreatmentStack { id: _preTreatmentStack } // In TreatmentStack TreatmentStack { id: _treatmentStack } @@ -139,8 +139,8 @@ function onStandbyWaitTreatmentChanged ( vValue ) { if ( vValue ) vDisinfectAdjustDisinfect.hasCancel = false } function onStandbyWaitDisinfectChanged ( vValue ) { page( _disinfectStack , vValue )} - function onValidateParametersChanged ( vValue ) { _preTreatmentCreateStack.clear ( vValue ) // vValue == true if enterig the state ( clear only on entering). - page( _preTreatmentCreateStack , vValue )} + function onValidateParametersChanged ( vValue ) { _preTreatmentCreate.clear ( vValue ) // vValue == true if enterig the state ( clear only on entering). + page( _preTreatmentCreate , vValue )} function onPreTreatmentChanged ( vValue ) { page( _preTreatmentStack , vValue )} function onInTreatmentChanged ( vValue ) { page( _treatmentStack , vValue )} function onPostTreatmentChanged ( vValue ) { page( _postTreatmentStack , vValue )} Index: sources/gui/qml/pages/TreatmentFlowBase.qml =================================================================== diff -u -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5) +++ sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -94,7 +94,7 @@ anchors { top : _root.top topMargin : titleTopMargin - horizontalCenter: parent.horizontalCenter + left : parent.horizontalCenter } text : qsTr("TreatmentFlowBase") color : Colors.textMain Fisheye: Tag 16a8f25568b4636ebc31e76c86a8031940cc4ad7 refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r036d378b4b89db03c812584c1d0f682494d81568 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 036d378b4b89db03c812584c1d0f682494d81568) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -15,7 +15,6 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // ScrollBar // Project // Qml imports @@ -29,848 +28,28 @@ */ PreTreatmentBase { id: _root objectName: "_PreTreatmentCreate" // SquishQt testability + property int stackStepIndex : 0 - header.confirmEnabled: - _bloodFlowRate .active && _bloodFlowRate . valid && - _dialysateFlowRate .active && _dialysateFlowRate . valid && - _duration .active && _duration . valid && - _heparinDispensingRate .active && _heparinDispensingRate . valid && - _heparinBolusVolume .active && _heparinBolusVolume . valid && - _heparinStopTime .active && _heparinStopTime . valid && - _salineBolus .active && _salineBolus . valid && - _heparinType._heparinTypeActive && - _acidConcentrate .active && - _bicarbonateConcentrate .active && - _dialyzerType .active && - _dialysateTemperature .active && _dialysateTemperature . valid && - _bloodPressureInterval .active && _bloodPressureInterval . valid + header.backVisible : false + header.confirmVisible : true + title.visible : false + header.confirmEnabled : _preTreatmentCreateContent.confirmReady() + onConfirmClicked : _preTreatmentCreateContent.confirm() - Connections{ target:vTreatmentCreate - // Update flicker location to show the invalid parameter - function onDidValidationFail() { - if ( vTreatmentCreate. bloodFlowRateRejectReason ) { scrollTo( _bloodFlowRate ); return } - if ( vTreatmentCreate. dialysateFlowRateRejectReason ) { scrollTo( _dialysateFlowRate ); return } - if ( vTreatmentCreate. treatmentDurationRejectReason ) { scrollTo( _duration ); return } - if ( vTreatmentCreate. heparinDispensingRateRejectReason ) { scrollTo( _heparinDispensingRate ); return } - if ( vTreatmentCreate. heparinBolusVolumeRejectReason ) { scrollTo( _heparinBolusVolume ); return } - if ( vTreatmentCreate. heparinStopTimeRejectReason ) { scrollTo( _heparinStopTime ); return } - if ( vTreatmentCreate. salineBolusVolumeRejectReason ) { scrollTo( _salineBolus ); return } - - if ( vTreatmentCreate. heparinTypeRejectReason ) { scrollTo( _heparinType ); return } - if ( vTreatmentCreate. acidConcentrateRejectReason ) { scrollTo( _acidConcentrate ); return } - if ( vTreatmentCreate. bicarbonateConcentrateRejectReason ) { scrollTo( _bicarbonateConcentrate ); return } - if ( vTreatmentCreate. dialyzerTypeRejectReason ) { scrollTo( _dialyzerType ); return } - - if ( vTreatmentCreate. dialysateTempRejectReason ) { scrollTo( _dialysateTemperature ); return } - if ( vTreatmentCreate.bloodPressureMeasureIntervalRejectReason ) { scrollTo( _bloodPressureInterval ); return } - } + function clear( vValue ) { + if ( ! vValue ) return + _preTreatmentCreateContent.clear() } - function setInteractive(vInteractive) { - _flickable.interactive = vInteractive - } - - function scrollTo(vItem) { - _flickable.contentY = vItem.mapToItem(_flickable.contentItem, 0, 0).y - } - - function clear() { - _flickable.contentY = 0 - _bloodFlowRate .clear() - _dialysateFlowRate .clear() - _duration .clear() - _heparinDispensingRate .clear() - _heparinBolusVolume .clear() - _heparinStopTime .clear() - _salineBolus .clear() - _heparinType .clear() - _acidConcentrate .clear() - _bicarbonateConcentrate .clear() - _dialyzerType .clear() - _dialysateTemperature .clear() - _bloodPressureInterval .clear() - } - - property bool prepopulated: false - function prepopulate() { - // not complete yet and not part of the current DNBUG - // the issue is the On/Off switches whcih has not been stored in the view to restore/prepopulate it, - // which is needed for three sliders to be set properly. - _bloodFlowRate .reset(vTreatmentCreate.bloodFlowRate ) - _dialysateFlowRate .reset(vTreatmentCreate.dialysateFlowRate ) - _duration .reset(vTreatmentCreate.treatmentDuration ) - _heparinDispensingRate .reset(vTreatmentCreate.heparinDispensingRate ) - _heparinBolusVolume .reset(vTreatmentCreate.heparinBolusVolume ) - _heparinStopTime .reset(vTreatmentCreate.heparinStopTime ) - _salineBolus .reset(vTreatmentCreate.salineBolusVolume ) - _heparinType .reset(vTreatmentCreate.heparinType ) - _acidConcentrate .reset(vTreatmentCreate.acidConcentrate ) - _bicarbonateConcentrate .reset(vTreatmentCreate.bicarbonateConcentrate ) - _dialyzerType .reset(vTreatmentCreate.heparinType ) - _dialysateTemperature .reset(vTreatmentCreate.dialysateTemp ) - _bloodPressureInterval .reset(vTreatmentCreate.bloodPressureMeasureInterval ) - } - - ConfirmButton { id : _prepopulateButton - objectName : "_prepopulateButton" - text.text : prepopulated ? qsTr("RESET") : qsTr("PREPOPULATE") - anchors.top : title.top - anchors.topMargin : 0 - visible : false // true // not readu yet and has been hidded. - onClicked : { - if ( prepopulated ) { - clear() - } - else { - prepopulate() - } - prepopulated = ! prepopulated - } - } - - ScrollBar { - flickable : _flickable - anchors.fill: _flickable - anchors.rightMargin : Variables.minVGap - } - - Flickable { id: _flickable - objectName: "TreatmentCreateFlickable" - clip: true + PreTreatmentCreateContent { id: _preTreatmentCreateContent anchors { - top : _root.title.bottom - topMargin : Variables.minVGap - bottom : _root.bottom - bottomMargin : Variables.notificationHeight + Variables.minVGap - horizontalCenter: parent.horizontalCenter + top : _root.header.bottom + left : parent.left + leftMargin : Variables.defaultMargin * 8 + right : parent.right + rightMargin : anchors.leftMargin + bottom : parent.bottom + bottomMargin: Variables.notificationHeight + Variables.defaultMargin } - width: parent.width - contentWidth: parent.width - contentHeight: _column.implicitHeight - flickDeceleration: Variables.createTreatmentFlickableDeceleration - - Column { id: _column - spacing: Variables.treatmentSpacing - anchors.horizontalCenter: parent.horizontalCenter - anchors.fill: parent - - Text { id: _titleTextPrescription - anchors.horizontalCenter: parent.horizontalCenter - text: qsTr("PRESCRIPTION") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - font.bold: true - } - - SliderCreateTreatment { id: _bloodFlowRate - objectName : "_bloodFlowRate" - label : qsTr("Blood Flow Rate") - flickable : _flickable - unit : Variables.unitTextFlowRate - minimum : vTreatmentRanges.bloodFlowRateMin - maximum : vTreatmentRanges.bloodFlowRateMax - step : vTreatmentRanges.bloodFlowRateRes - defaultValue: vTreatmentRanges.bloodFlowRateDef - valid : ! vTreatmentCreate.bloodFlowRateRejectReason - onValueChanged : { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason - } - vTreatmentCreate.bloodFlowRate = value - } - } - - SliderCreateTreatment { id: _dialysateFlowRate - objectName : "_dialysateFlowRate" - label : qsTr("Dialysate Flow Rate") - flickable : _flickable - unit : Variables.unitTextFlowRate - minimum : vTreatmentRanges.dialysateFlowRateMin - maximum : vTreatmentRanges.dialysateFlowRateMax - step : vTreatmentRanges.dialysateFlowRateRes - defaultValue: vTreatmentRanges.dialysateFlowRateDef - valid : ! vTreatmentCreate.dialysateFlowRateRejectReason - onValueChanged : { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason - } - vTreatmentCreate.dialysateFlowRate = value - } - } - - SliderCreateTreatment { id: _duration - objectName : "_duration" - label : qsTr("Duration") - flickable : _flickable - unit : Variables.unitTextDuration - minimum : vTreatmentRanges.treatmentDurationMin - maximum : vTreatmentRanges.treatmentDurationMax - step : vTreatmentRanges.treatmentDurationRes - defaultValue: vTreatmentRanges.treatmentDurationDef - valid : !vTreatmentCreate.treatmentDurationRejectReason - onValueChanged: { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason - } - vTreatmentCreate.treatmentDuration = value - } - } - Connections { target: _duration - function onValueChanged ( ) { - if ( _heparinDispensingRateSwitch.checked ) { - _heparinStopTime.active = false - _heparinStopTime.reset( _duration.value ) - } - } - } - - Connections { target : _heparinDispensingRateSwitch - function onActiveChanged ( ) { - let mActive = _heparinDispensingRateSwitch.active - let mObject = _heparinStopTime - - if ( ! mActive ) { - mObject.enabled = false - mObject.active = false - mObject.adjustable = false - } - } - - function onCheckedChanged ( ) { - let mActive = _heparinDispensingRateSwitch.active - let mChecked = _heparinDispensingRateSwitch.checked - let mObject = _heparinStopTime - - mObject.enabled = mActive && mChecked - mObject.active = false - mObject.adjustable = mChecked - - mObject.reset ( _duration.value ) - } - } - - SliderCreateTreatment { id: _heparinDispensingRate - objectName : "_heparinDispensingRate" - label : qsTr("Heparin Dispensing Rate") - zeroLabel : qsTr("OFF") - flickable : _flickable - unit : Variables.unitTextDispensingRate - decimal : Variables.heparinPrecision - minimum : vTreatmentRanges.heparinDispensingRateMin - maximum : vTreatmentRanges.heparinDispensingRateMax - step : vTreatmentRanges.heparinDispensingRateRes - defaultValue: vTreatmentRanges.heparinDispensingRateDef - valid : !vTreatmentCreate.heparinDispensingRateRejectReason - adjustable : _heparinDispensingRateSwitch.checked - inActiveZero : true - enableAdjustButtons: _heparinDispensingRateSwitch.checked - onValueChanged: { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason - } - vTreatmentCreate.heparinDispensingRate = _heparinDispensingRateSwitch.checked ? value : 0 - } - // ToDo: create a component for Switch, - // ToDo: Consider putting the new CheckBox component into the SliderCreateTreatment component and set via boolean property - // This is a full implementation of a Switch - toggleSwich: _heparinDispensingRateSwitch - Switch { id: _heparinDispensingRateSwitch - property bool active: false - onCheckedChanged: { - if ( ! active ) { - active = true - checked = ! checked - } - vTreatmentCreate.heparinDispensingRate = 0 - vTreatmentCreate.heparinDispensingRateOff = ! checked - _heparinDispensingRate.reset ( 0 ) - _heparinDispensingRate.active = ! checked - } - - x : width * -1.5 - y : Variables.createTreatmentSwitchYDisplacement // these values are set to align the switch with slider - width : 75 // these values are set to align the switch with slider - height : 85 // these values are set to align the switch with slider - // DEBUG: background : Rectangle { color : "white" } - - indicator: Rectangle { - implicitWidth : Variables.sliderCircleDiameter * 1.7 - implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) - radius : implicitHeight - anchors.centerIn: parent - color : _heparinDispensingRateSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive - border.color : _heparinDispensingRateSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive - Rectangle { - property real diameter : Variables.sliderCircleDiameter - - x: _heparinDispensingRateSwitch.checked ? parent.width - width : 0 - anchors.verticalCenter: parent.verticalCenter - width : diameter - height : diameter - radius : diameter - color : _heparinDispensingRateSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive - border { - width: Variables.progressbarHandlerBorderWidth - color: Colors.textMain - } - } - } - - contentItem: Text { - text : _heparinDispensingRateSwitch.checked ? qsTr("ON") : qsTr("OFF") - font : _heparinDispensingRateSwitch.font - color : _heparinDispensingRateSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignTop - horizontalAlignment: Text.AlignHCenter - anchors.centerIn: parent - } - } - } - - SliderCreateTreatment { id: _heparinBolusVolume - objectName : "_heparinBolusVolume" - label : qsTr("Heparin Bolus Volume") - zeroLabel : qsTr("OFF") - flickable : _flickable - unit : Variables.unitTextFluid - decimal : Variables.heparinPrecision - minimum : vTreatmentRanges.heparinBolusVolumeMin - maximum : vTreatmentRanges.heparinBolusVolumeMax - step : vTreatmentRanges.heparinBolusVolumeRes - defaultValue: vTreatmentRanges.heparinBolusVolumeDef - valid : !vTreatmentCreate.heparinBolusVolumeRejectReason - adjustable : _heparinBolusVolumeSwitch.checked - inActiveZero : true - enableAdjustButtons: _heparinBolusVolumeSwitch.checked - onValueChanged : { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason - } - vTreatmentCreate.heparinBolusVolume = _heparinBolusVolumeSwitch.checked ? value : 0 - } - - // ToDo: create a component for this, - // ToDo: Consider putting the new CheckBox component into the SliderCreateTreatment component and set via boolean property - // This is a full implementation of a CheckBox - toggleSwich: _heparinBolusVolumeSwitch - Switch { id: _heparinBolusVolumeSwitch - property bool active: false - onCheckedChanged: { - if ( ! active ) { - active = true - checked = ! checked - } - vTreatmentCreate.heparinBolusVolume = 0 - vTreatmentCreate.heparinBolusVolumeOff = ! checked - _heparinBolusVolume.reset ( 0 ) - _heparinBolusVolume.active = ! checked - } - - x : width * -1.5 - y : Variables.createTreatmentSwitchYDisplacement // these values are set to align the switch with slider - width : 75 // these values are set to align the switch with slider - height : 85 // these values are set to align the switch with slider - // DEBUG: background : Rectangle { color : "white" } - - indicator: Rectangle { - implicitWidth : Variables.sliderCircleDiameter * 1.7 - implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) - radius : implicitHeight - anchors.centerIn: parent - color : _heparinBolusVolumeSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive - border.color : _heparinBolusVolumeSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive - Rectangle { - property real diameter : Variables.sliderCircleDiameter - - x: _heparinBolusVolumeSwitch.checked ? parent.width - width : 0 - anchors.verticalCenter: parent.verticalCenter - width : diameter - height : diameter - radius : diameter - color : _heparinBolusVolumeSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive - border { - width: Variables.progressbarHandlerBorderWidth - color: Colors.textMain - } - } - } - - contentItem: Text { - text : _heparinBolusVolumeSwitch.checked ? qsTr("ON") : qsTr("OFF") - font : _heparinBolusVolumeSwitch.font - color : _heparinBolusVolumeSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignTop - horizontalAlignment: Text.AlignHCenter - anchors.centerIn: parent - } - } - } - - SliderCreateTreatment { id: _heparinStopTime - objectName : "_heparinStopTime" - label : qsTr("Heparin Stop Time") - flickable : _flickable - unit : Variables.unitTextDuration - minimum : vTreatmentRanges.heparinStopTimeMin - maximum : _duration.value // LEAHI-SRS-300 - step : _duration.step // LEAHI-SRS-300 - defaultValue: _duration.value // LEAHI-SRS-300 - inActiveZero: false - valid : !vTreatmentCreate.heparinStopTimeRejectReason - enabled : false // this switch depends on the heparin dispencing - adjustable : false // this switch depends on the heparin dispencing - enableAdjustButtons: _heparinDispensingRateSwitch.checked - onValueChanged: { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason - } - vTreatmentCreate.heparinStopTime = value - } - } - - SliderCreateTreatment { id: _salineBolus - objectName : "_salineBolus" - label : qsTr("Saline Bolus") - flickable : _flickable - unit : Variables.unitTextFluid - minimum : vTreatmentRanges.salineBolusVolumeMin - maximum : vTreatmentRanges.salineBolusVolumeMax - step : vTreatmentRanges.salineBolusVolumeRes - defaultValue: vTreatmentRanges.salineBolusVolumeDef - valid : !vTreatmentCreate.salineBolusVolumeRejectReason - onValueChanged: { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason - } - vTreatmentCreate.salineBolusVolume = value - } - } - - Text { id: _titleTextOperation - anchors.horizontalCenter: parent.horizontalCenter - text : qsTr("OPERATING PARAMETERS") - color : Colors.textMain - font.pixelSize: Fonts.fontPixelButton - font.bold : true - } - - GridSelection { id : _heparinType - readonly property bool _heparinTypeActive : (enabled && active) || (!enabled) - - objectName : "_heparinTypeRect" - title : qsTr("Heparin Type") - labels : vTreatmentRanges.heparinTypeOptions - onClicked :{vTreatmentCreate.heparinType = curIndex ; vTreatmentCreate.heparinTypeSet = true; } - enabled : _heparinDispensingRateSwitch.checked || _heparinBolusVolumeSwitch.checked - onEnabledChanged: { - if ( ! enabled ) { - vTreatmentCreate.heparinTypeSet = false - clear() - } - } - - valid : ! vTreatmentCreate.heparinTypeRejectReason - onCurIndexChanged : vTreatmentCreate.heparinTypeRejectReason = Variables.noRejectReason - } - - GridSelection { id : _acidConcentrate - objectName : "_acidConcentrateRect" - title : qsTr("Acid Concentrate") - labels : vTreatmentRanges.acidConcentrateOptions - onClicked :{vTreatmentCreate.acidConcentrate = curIndex ; vTreatmentCreate.acidConcentrateSet = true; } - - valid : ! vTreatmentCreate.acidConcentrateRejectReason - onCurIndexChanged : vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason - } - - GridSelection { id : _bicarbonateConcentrate - objectName : "_bicarbonateConcentrateRect" - title : qsTr("Bicarbonate Concentrate") - labels : vTreatmentRanges.bicarbonateConcentrateOptions - onClicked :{vTreatmentCreate.bicarbonateConcentrate = curIndex ; vTreatmentCreate.bicarbonateConcentrateSet = true; } - - valid : ! vTreatmentCreate.bicarbonateConcentrateRejectReason - onCurIndexChanged : vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason - } - - GridSelection { id : _dialyzerType - objectName : "_dialyzerTypeRect" - title : qsTr("Dialyzer Type") - labels : vTreatmentRanges.dialyzerTypeOptions - onClicked :{vTreatmentCreate.dialyzerType = curIndex ; vTreatmentCreate.dialyzerTypeSet = true; } - - valid : ! vTreatmentCreate.dialyzerTypeRejectReason - onCurIndexChanged : vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason - } - - Item { height: 1; width: 1 /* TODO : there is a design flaw in here, this is a workaround */ } - - SliderCreateTreatment { id: _dialysateTemperature - objectName : "_dialysateTemperature" - label : qsTr("Dialysate Temperature") - flickable : _flickable - unit : Variables.unitTextTemperature - decimal : Variables.dialysateTempPrecision - minimum : vTreatmentRanges.dialysateTempMin - maximum : vTreatmentRanges.dialysateTempMax - step : vTreatmentRanges.dialysateTempRes - defaultValue: vTreatmentRanges.dialysateTempDef - valid : !vTreatmentCreate.dialysateTempRejectReason - - onValueChanged: { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason - } - vTreatmentCreate.dialysateTemp = value - } - } - -/* [DEN-15359] Arterial and Venous Pressure has been removed, it has been kept here since it supposed to become a component and don't watnt to loose the coce. - - // TODO : This has to be a Component - Column { id: _arterialColumn - spacing: 45 - anchors.horizontalCenter: parent.horizontalCenter - Row { id: _arterialTitleRow - function setColor() { - let slider = _arterialPressureLimits - let color = Colors.textDisableButton - if ( slider.minAdjusted && slider.maxAdjusted ) { - color = Colors.textMain - } - - // if it's invalid upper or lower bound, set invalid color - if (!_arterialPressureLimits.lowerBoundValid || !_arterialPressureLimits.upperBoundValid) { - color = Colors.createTreatmentInvalidParam - } - return color - } - width : parent.width - height : _arterialLabel.height - anchors.left: parent.left - Text { id: _arterialLabel - visible : true - width : parent.width/2 - color : _arterialTitleRow.setColor() - text : qsTr("Arterial Pressure Limits") - font.pixelSize : Fonts.fontPixelFluidText - } - Text { id: _arterialUnit - visible : true - width : parent.width/2 - color : _arterialLabel.color - text : Variables.unitTextBloodPressure - font.pixelSize : Fonts.fontPixelFluidText - horizontalAlignment: Text.AlignRight - } - } - RangeSlider { id: _arterialPressureLimits - objectName : "_arterialPressureLimitsSlider" - // dimension - height : Variables.sliderDefaultBodyHeight - width : Variables.createTreatmentSliderWidth - anchors.horizontalCenter: parent.horizontalCenter - ticks : true - stepSnap : true - hasAdjust : true - - // Texts - lowerText.visible : true - lowerText.font.pixelSize : Fonts.fontPixelFluidText - lowerText.font.bold : false - lowerText.anchors.topMargin : -60 - lowerTextHorizontalCenter : true - - upperText.visible : true - upperText.font.pixelSize : Fonts.fontPixelFluidText - upperText.font.bold : false - upperText.anchors.topMargin : -60 - upperTextHorizontalCenter : true - - lowerBoundValid: !vTreatmentCreate.arterialPressureLimitLowRejectReason - upperBoundValid: !vTreatmentCreate.arterialPressureLimitHighRejectReason - - minText.visible : true - minText.font.bold : false - minVerticalEdgeVisible : false - - maxText.visible : true - maxText.font.bold : false - maxVerticalEdgeVisible : false - - // Ranges - step : vTreatmentRanges.arterialPressureLimitLowRes // currently min & max are on the same slider/scale so used min as the main res - gapValue : vTreatmentRanges.arterialPressureLimitLowGap // currently min & max are on the same slider/scale so used min as the main res - minimum : vTreatmentRanges.arterialPressureLimitLowMin - maximum : vTreatmentRanges.arterialPressureLimitHighMax - minValue : vTreatmentRanges.arterialPressureLimitLowDef - maxValue : vTreatmentRanges.arterialPressureLimitHighDef - minValueLowerBound : vTreatmentRanges.arterialPressureLimitLowMin - minValueUpperBound : vTreatmentRanges.arterialPressureLimitLowMax - maxValueLowerBound : vTreatmentRanges.arterialPressureLimitHighMin - maxValueUpperBound : vTreatmentRanges.arterialPressureLimitHighMax - // scroll handling and value updates - onPressed : { setInteractive(false) } - onDragged : { setInteractive(false) } - onReleased : { setInteractive(true ) } - onMinValueChanged : { - if ( minAdjusted ) { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!lowerBoundValid) { - vTreatmentCreate.arterialPressureLimitLowRejectReason = Variables.noRejectReason - } - vTreatmentCreate.arterialPressureLimitLow = minValue - } - } - onMaxValueChanged : { - if ( maxAdjusted ) { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!upperBoundValid) { - vTreatmentCreate.arterialPressureLimitHighRejectReason = Variables.noRejectReason - } - vTreatmentCreate.arterialPressureLimitHigh = maxValue - } - } - - SliderArrows{ id:_arterialPressureLimitsMaxArrows - anchors.verticalCenter : _arterialPressureLimits.verticalCenter - anchors.left : _arterialPressureLimits.right - anchors.leftMargin : Variables.sliderAdjustButtonLeftMargin - onIncrementValue : _arterialPressureLimits.incrementMax(true) - onDecrementValue : _arterialPressureLimits.decrementMax(true) - } - - SliderArrows{ id:_arterialPressureLimitsMinArrows - anchors.verticalCenter : _arterialPressureLimits.verticalCenter - anchors.right : _arterialPressureLimits.left - anchors.rightMargin : Variables.sliderAdjustButtonRightMargin - onIncrementValue : _arterialPressureLimits.incrementMin(true) - onDecrementValue : _arterialPressureLimits.decrementMin(true) - } - } - } - - // TODO : This has to be a Component - Column { id: _venousColumn - spacing: 45 - anchors.horizontalCenter: parent.horizontalCenter - Row { id: _venousTitleRow - function setColor() { - let slider = _venousPressureLimits - let color = Colors.textDisableButton - if ( slider.minAdjusted && slider.maxAdjusted ) { - color = Colors.textMain - } - - // if it's invalid upper or lower bound, set invalid color - if (!_venousPressureLimits.lowerBoundValid || !_venousPressureLimits.upperBoundValid) { - color = Colors.createTreatmentInvalidParam - } - return color - } - width : parent.width - height : _venousLabel.height - anchors.left: parent.left - Text { id: _venousLabel - visible : true - width : parent.width/2 - color : _venousTitleRow.setColor() - text : qsTr("Venous Pressure Limits") - font.pixelSize : Fonts.fontPixelFluidText - } - Text { id: _venousUnit - visible : true - width : parent.width/2 - color : _venousTitleRow.setColor() - text : Variables.unitTextBloodPressure - font.pixelSize : Fonts.fontPixelFluidText - horizontalAlignment: Text.AlignRight - } - } - RangeSlider { id: _venousPressureLimits - objectName: "_venousPressureLimitsSlider" - // dimension - height : Variables.sliderDefaultBodyHeight - width : Variables.createTreatmentSliderWidth - anchors.horizontalCenter: parent.horizontalCenter - ticks : true - stepSnap : true - hasAdjust : true - - // slider visuals - showTickmarks : true - isRoundedEnds : true - isTickMarksRound: true - - // Texts - lowerText.visible : true - lowerText.font.pixelSize : Fonts.fontPixelFluidText - lowerText.font.bold : false - lowerText.anchors.topMargin : -60 - lowerTextHorizontalCenter : true - - upperText.visible : true - upperText.font.pixelSize : Fonts.fontPixelFluidText - upperText.font.bold : false - upperText.anchors.topMargin : -60 - upperTextHorizontalCenter : true - - lowerBoundValid : !vTreatmentCreate.venousPressureLimitLowRejectReason - upperBoundValid : !vTreatmentCreate.venousPressureLimitHighRejectReason - - minText.visible : true - minText.font.bold : false - minVerticalEdgeVisible : false - - maxText.visible : true - maxText.font.bold : false - maxVerticalEdgeVisible : false - - // Ranges - step : vTreatmentRanges.venousPressureLimitLowRes // currently min & max are on the same slider/scale so used min as the main res - gapValue : vTreatmentRanges.venousPressureLimitLowGap // currently min & max are on the same slider/scale so used min as the main res - minimum : vTreatmentRanges.venousPressureLimitLowMin - maximum : vTreatmentRanges.venousPressureLimitHighMax - minValue : vTreatmentRanges.venousPressureLimitLowDef - maxValue : vTreatmentRanges.venousPressureLimitHighDef - minValueLowerBound : vTreatmentRanges.venousPressureLimitLowMin - minValueUpperBound : vTreatmentRanges.venousPressureLimitLowMax - maxValueLowerBound : vTreatmentRanges.venousPressureLimitHighMin - maxValueUpperBound : vTreatmentRanges.venousPressureLimitHighMax - // scroll handling and value updates - onPressed : { setInteractive(false) } - onDragged : { setInteractive(false) } - onReleased : { setInteractive(true ) } - onMinValueChanged : { - if ( minAdjusted ) { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!lowerBoundValid) { - vTreatmentCreate.venousPressureLimitLowRejectReason = Variables.noRejectReason - } - vTreatmentCreate.venousPressureLimitLow = minValue - } - } - onMaxValueChanged : { - if ( maxAdjusted ) { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!upperBoundValid) { - vTreatmentCreate.venousPressureLimitHighRejectReason = Variables.noRejectReason - } - vTreatmentCreate.venousPressureLimitHigh = maxValue - } - } - - SliderArrows{ id:_venousPressureLimitsMaxArrows - anchors.verticalCenter : _venousPressureLimits.verticalCenter - anchors.left : _venousPressureLimits.right - anchors.leftMargin : Variables.sliderAdjustButtonLeftMargin - onIncrementValue : _venousPressureLimits.incrementMax(true) - onDecrementValue : _venousPressureLimits.decrementMax(true) - } - - SliderArrows{ id:_venousPressureLimitsMinArrows - anchors.verticalCenter : _venousPressureLimits.verticalCenter - anchors.right : _venousPressureLimits.left - anchors.rightMargin : Variables.sliderAdjustButtonRightMargin - onIncrementValue : _venousPressureLimits.incrementMin(true) - onDecrementValue : _venousPressureLimits.decrementMin(true) - } - } - } - -*/ - - SliderCreateTreatment { id: _bloodPressureInterval - objectName : "_bloodPressureMeasurementInterval" - label : qsTr("Blood Pressure Measurement Interval") - zeroLabel : qsTr("OFF") - flickable : _flickable - unit : Variables.unitTextDuration - minimum : vTreatmentRanges.bloodPressureMeasureIntervalMin - maximum : vTreatmentRanges.bloodPressureMeasureIntervalMax - step : vTreatmentRanges.bloodPressureMeasureIntervalRes - defaultValue: vTreatmentRanges.bloodPressureMeasureIntervalDef - valid : !vTreatmentCreate.bloodPressureMeasureIntervalRejectReason - adjustable : _bloodPressureIntervalSwitch.checked - inActiveZero: true - enableAdjustButtons: _bloodPressureIntervalSwitch.checked - onValueChanged: { - // Reset the valid state to allow repositioning to the next invalid parameter - if(!valid) { - vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason - } - vTreatmentCreate.bloodPressureMeasureInterval = _bloodPressureIntervalSwitch.checked ? value : 0 - } - - // ToDo: create a component for this, - // ToDo: Consider putting the new CheckBox component into the SliderCreateTreatment component and set via boolean property - // This is a full implementation of a CheckBox - toggleSwich: _bloodPressureIntervalSwitch - Switch { id: _bloodPressureIntervalSwitch - property bool active: false - onCheckedChanged: { - if ( ! active ) { - active = true - checked = ! checked - } - vTreatmentCreate.bloodPressureMeasureInterval = 0 - _bloodPressureInterval.reset ( 0 ) - _bloodPressureInterval.active = ! checked - - } - - x : width * -1.5 - y : Variables.createTreatmentSwitchYDisplacement // these values are set to align the switch with slider - width : 75 // these values are set to align the switch with slider - height : 85 // these values are set to align the switch with slider - // DEBUG: background : Rectangle { color : "white" } - - indicator: Rectangle { - implicitWidth : Variables.sliderCircleDiameter * 1.7 - implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) - radius : implicitHeight - anchors.centerIn: parent - color : _bloodPressureIntervalSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive - border.color : _bloodPressureIntervalSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive - Rectangle { - property real diameter : Variables.sliderCircleDiameter - - x: _bloodPressureIntervalSwitch.checked ? parent.width - width : 0 - anchors.verticalCenter: parent.verticalCenter - width : diameter - height : diameter - radius : diameter - color : _bloodPressureIntervalSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive - border { - width: Variables.progressbarHandlerBorderWidth - color: Colors.textMain - } - } - } - - contentItem: Text { - text : _bloodPressureIntervalSwitch.checked ? qsTr("ON") : qsTr("OFF") - font : _bloodPressureIntervalSwitch.font - color : _bloodPressureIntervalSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignTop - horizontalAlignment: Text.AlignHCenter - anchors.centerIn: parent - } - } - } - - Item { - width : 50 - height : 50 - } - } } } Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -0,0 +1,449 @@ +/*! + * + * 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 PreTreatmentCreateContent.qml + * \author (last) Nico Ramirez + * \date (last) 21-Aug-2025 + * \author (original) Nico Ramirez + * \date (original) 21-Aug-2025 + * + */ + +// Qt +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +// Qml +import "qrc:/globals" +import "qrc:/components" +import "qrc:/dialogs" +import "qrc:/pages/pretreatment" + +Item { id: _root + enum Action { + Edit , + Select , + Clear + } + + readonly property int cellWidth : width / 2 - ( rowSpacing / 2 ) + readonly property int cellHeight : ( _contentRow.height ) / 7 - ( columnSpacing ) + readonly property int rowSpacing : Variables.defaultMargin * 3 + readonly property int columnSpacing : 15 + + property bool editingEnabled : true + + function enableEditing () { editingEnabled = true } + + function clear () { + vTreatmentCreate.patientID = "" + vTreatmentCreate.txCode = "" + _bloodFlowRateControl .clear() + _dialysateFlowRateControl .clear() + _durationControl .clear() + _heparinDispensingRateControl .clear() + _heparinBolusVolumeControl .clear() + _heparinStopTimeControl .clear() + _acidConcentrateComboBox .clear() + _bicarbonateConcentrateComboBox .clear() + _dialyzerTypeComboBox .clear() + _dialysateTemperatureControl .clear() + _salineBolusVolumeControl .clear() + _bpMeasurementIntervalControl .clear() + enableEditing () + } + + function confirm () { + vTreatmentCreate .patientID = _pretreatmentPatientIDEntry.text + vPostTreatmentAdjustmentTreatmentLog.patientID = _pretreatmentPatientIDEntry.text // store for the TreatmentLog + + vTreatmentCreate.arterialPressureLimitWindow = vTreatmentRanges.arterialPressureLimitWindowDef // these parameters don't have a user option on create treatment, so sending the default. + vTreatmentCreate.venousPressureLimitWindow = vTreatmentRanges.venousPressureLimitWindowDef // these parameters don't have a user option on create treatment, so sending the default. + vTreatmentCreate.venousPressureLimitAsymtrc = vTreatmentRanges.venousPressureLimitAsymtrcDef // these parameters don't have a user option on create treatment, so sending the default. + vTreatmentCreate.rinsebackFlowRate = vTreatmentRanges.rinsebackFlowRateDef // these parameters don't have a user option on create treatment, so sending the default. + vTreatmentCreate.doValidation ( ) + } + + function confirmReady () { + return _pretreatmentPatientIDEntry .text && + _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 + } + + Connections{ target: vTreatmentCreate + function onDidValidationPass ( vValue ) { + vPostTreatmentAdjustmentTreatmentLog.heparinDispensingRateOff = vTreatmentCreate.heparinDispensingRateOff = ! vTreatmentCreate.heparinDispensingRate + vPostTreatmentAdjustmentTreatmentLog.heparinBolusVolumeOff = vTreatmentCreate.heparinBolusVolumeOff = ! vTreatmentCreate.heparinBolusVolume + + vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason + vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason + vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason + vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason + vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason + vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason + vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason + vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason + vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason + vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason + vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason + vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason + vTreatmentCreate.doConfirm () + _root.editingEnabled = false + } + + function onDidValidationFail() { vTreatmentCreate.txCode = "" } + } + + Connections { target: _acidConcentrateAdjustment + function onAccepted () { + _acidConcentrateComboBox.currentIndex = vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.find(_acidConcentrateAdjustment.adjustment) + _acidConcentrateComboBox.active = vTreatmentCreate.acidConcentrateSet = true + } + } + + MouseArea { // click outside to remove active focus and lower keyboard + anchors.fill : parent + propagateComposedEvents : true + onClicked : focus = true // grab focus here + } + + Text { id: _prescriptionTitle + anchors { + top : parent.top + topMargin : Variables.defaultMargin + left : parent.left + } + text : qsTr("Prescription") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTitle + font.weight : Font.Medium + } + + BaseComboBox { id: _prescriptionMenu + anchors { + left : _prescriptionTitle.right + verticalCenter : _prescriptionTitle.verticalCenter + verticalCenterOffset: 5 + } + + model : [qsTr("Edit Rx"), qsTr("Select Rx"), qsTr("Clear All")] + height : 50 + width : 75 + dropDownWidth : 250 + delegateHeight : 65 + iconAnchors.rightMargin : Variables.defaultMargin * 2 + displayText : "" + iconSource : "qrc:/images/iMenuDot" + backgroundColor : Colors.transparent + + onActivated: { + switch (currentIndex) { + case PreTreatmentCreateContent.Edit: + _root.enableEditing() + break + case PreTreatmentCreateContent.Select: + print("TODO: Open and Select from Prescription Manager " ) + break + case PreTreatmentCreateContent.Clear: + _root.clear() + break + default: // Unknown state + break + } + } + } + + Row { id: _contentRow + anchors { + top : _prescriptionTitle.bottom + topMargin : Variables.defaultMargin * 2 + left : _root.left + right : _root.right + bottom : parent.bottom + } + spacing : _root.rowSpacing + + Column { id: _leftColumn + spacing : _root.columnSpacing + + Item { id: _patientIDItem + height : cellHeight + width : cellWidth + + PreTreatmentCreateItem { id: _patientID + anchors.verticalCenter : parent.verticalCenter + text : qsTr("Patient ID") + showUnit : false + height : cellHeight - Variables.defaultMargin + + contentItem : TextEntry { id: _pretreatmentPatientIDEntry + clip : true + textInput.width : parent.width - Variables.defaultMargin * 5 + text : vTreatmentCreate.patientID + anchors.centerIn : parent + textInput.font.pixelSize : Fonts.fontPixelValueControl + textInput.inputMethodHints : Qt.ImhPreferLowercase + textInput.echoMode : TextInput.Normal + textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID } + line.visible : false + enabled : _root.editingEnabled + onEditingFinished : vTreatmentCreate.patientID = text + + Text { id: _patientIDPlaceHolderText + text : "-- --" + anchors.centerIn : parent + font.pixelSize : Fonts.fontPixelValueControl + color : Colors.offWhite + visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 && + ! _pretreatmentPatientIDEntry.textInput.activeFocus + } + } + } + } + + PreTreatmentCreateItem { id: _bloodFlowRate + text : qsTr("Blood Flow Rate") + unitText : Variables.unitTextFlowRate + valid : ! vTreatmentCreate.bloodFlowRateRejectReason + + contentItem : ValueControl { id: _bloodFlowRateControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.bloodFlowRateMin + maximum : vTreatmentRanges.bloodFlowRateMax + step : vTreatmentRanges.bloodFlowRateRes + defaultValue : vTreatmentRanges.bloodFlowRateDef + onValueChanged : vTreatmentCreate.bloodFlowRate = value + } + } + + PreTreatmentCreateItem { id: _dialysateFlowRate + text : qsTr("Dialysate Flow Rate") + unitText : Variables.unitTextFlowRate + valid : ! vTreatmentCreate.dialysateFlowRateRejectReason + + contentItem : ValueControl { id: _dialysateFlowRateControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.dialysateFlowRateMin + maximum : vTreatmentRanges.dialysateFlowRateMax + step : vTreatmentRanges.dialysateFlowRateRes + defaultValue : vTreatmentRanges.dialysateFlowRateDef + onValueChanged : vTreatmentCreate.dialysateFlowRate = value + } + } + + PreTreatmentCreateItem { id: _duration + text : qsTr("Duration") + unitText : Variables.unitTextDuration + valid : ! vTreatmentCreate.treatmentDurationRejectReason + + contentItem : ValueControl { id: _durationControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.treatmentDurationMin + maximum : vTreatmentRanges.treatmentDurationMax + step : vTreatmentRanges.treatmentDurationRes + defaultValue : vTreatmentRanges.treatmentDurationDef + onValueChanged : vTreatmentCreate.treatmentDuration = value + } + } + + PreTreatmentCreateItem { id: _heparinDispensingRate + text : qsTr("Heparin Dispensing Rate") + unitText : Variables.unitTextDispensingRate + valid : ! vTreatmentCreate.heparinDispensingRateRejectReason + + contentItem : ValueControl { id: _heparinDispensingRateControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.heparinDispensingRateMin + maximum : vTreatmentRanges.heparinDispensingRateMax + step : vTreatmentRanges.heparinDispensingRateRes + defaultValue : vTreatmentRanges.heparinDispensingRateDef + decimal : Variables.heparinPrecision + onValueChanged : vTreatmentCreate.heparinDispensingRate = value + } + } + + PreTreatmentCreateItem { id: _heparinBolusVolume + text : qsTr("Heparin Bolus Volume") + unitText : Variables.unitTextFluid + valid : ! vTreatmentCreate.heparinBolusVolumeRejectReason + + contentItem : ValueControl { id: _heparinBolusVolumeControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.heparinBolusVolumeMin + maximum : vTreatmentRanges.heparinBolusVolumeMax + step : vTreatmentRanges.heparinBolusVolumeRes + defaultValue : vTreatmentRanges.heparinBolusVolumeDef + decimal : Variables.heparinPrecision + onValueChanged : vTreatmentCreate.heparinBolusVolume = value + } + } + + PreTreatmentCreateItem { id: _heparinStopTime + text : qsTr("Heparin Stop Time") + unitText : Variables.unitTextDuration + valid : ! vTreatmentCreate.heparinStopTimeRejectReason + + contentItem : ValueControl { id: _heparinStopTimeControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.heparinStopTimeMin + maximum : vTreatmentRanges.heparinStopTimeMax + step : vTreatmentRanges.heparinStopTimeRes + defaultValue : vTreatmentRanges.heparinStopTimeDef + onValueChanged : vTreatmentCreate.heparinStopTime = value + } + } + } + + Column { id: _rightColumn + spacing : _root.columnSpacing + + Row { id: _qrRow + height : _root.cellHeight + spacing : Variables.defaultMargin + anchors.left : parent.left + + QRCode { id: _qrCode + anchors.verticalCenter : parent.verticalCenter + anchors.verticalCenterOffset: -5 + qrcode : vTreatmentCreate.txCode + clear : ! _root.visible + } + + Text { id: _txCode + anchors.bottom : _qrCode.bottom + text : vTreatmentCreate.txCode ? qsTr("TX Code: ") + vTreatmentCreate.txCode : " " + color : "#DBE9FA" + font.pixelSize : Fonts.fontPixelButton + } + } + + PreTreatmentCreateItem { id: _acidConcentrate + text : qsTr("Acid Concentrate") + showUnit : false + showEdit : _root.editingEnabled + onEditClicked : _acidConcentrateAdjustment.open() + valid : ! vTreatmentCreate.acidConcentrateRejectReason + + contentItem : BaseComboBox { id: _acidConcentrateComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : Variables.defaultMargin * 2 + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: Variables.defaultMargin / 2 + active : false + enabled : _root.editingEnabled + currentIndex : vTreatmentCreate.acidConcentrate + model : vTreatmentRanges.acidConcentrateOptions + onClear : vTreatmentCreate.acidConcentrateSet = false + onActivated : { + vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.currentIndex + vTreatmentCreate.acidConcentrateSet = true + } + } + } + + PreTreatmentCreateItem { id: _bicarbonateConcentrate + text : qsTr("Bicarbonate Concentrate") + showUnit : false + valid : ! vTreatmentCreate.bicarbonateConcentrateRejectReason + + contentItem : BaseComboBox { id: _bicarbonateConcentrateComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : Variables.defaultMargin * 2 + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: Variables.defaultMargin / 2 + active : false + enabled : _root.editingEnabled + currentIndex : vTreatmentCreate.bicarbonateConcentrate + model : vTreatmentRanges.bicarbonateConcentrateOptions + onClear : vTreatmentCreate.bicarbonateConcentrateSet = false + onActivated : { + vTreatmentCreate.bicarbonateConcentrate = _bicarbonateConcentrateComboBox.currentIndex + vTreatmentCreate.bicarbonateConcentrateSet = true + } + } + } + + PreTreatmentCreateItem { id: _dialyzerType + text : qsTr("Dialyzer Type") + showUnit : false + valid : ! vTreatmentCreate.dialyzerTypeRejectReason + + contentItem : BaseComboBox { id: _dialyzerTypeComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : Variables.defaultMargin * 2 + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: Variables.defaultMargin / 2 + active : false + enabled : _root.editingEnabled + currentIndex : vTreatmentCreate.dialyzerType + model : vTreatmentRanges.dialyzerTypeOptions + onClear : vTreatmentCreate.dialyzerTypeSet = false + onActivated : { + vTreatmentCreate.dialyzerType = _dialyzerTypeComboBox.currentIndex + vTreatmentCreate.dialyzerTypeSet = true + } + } + } + + PreTreatmentCreateItem { id: _dialysateTemperature + text : qsTr("Dialysate Temperature") + unitText : Variables.unitTextTemperature + valid : ! vTreatmentCreate.dialysateTempRejectReason + + contentItem : ValueControl { id: _dialysateTemperatureControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.dialysateTempMin + maximum : vTreatmentRanges.dialysateTempMax + step : vTreatmentRanges.dialysateTempRes + defaultValue : vTreatmentRanges.dialysateTempDef + decimal : Variables.dialysateTempPrecision + onValueChanged : vTreatmentCreate.dialysateTemp = value + } + } + + PreTreatmentCreateItem { id: _salineBolusVolume + text : qsTr("Saline Bolus Volume") + unitText : Variables.unitTextFluid + valid : ! vTreatmentCreate.salineBolusVolumeRejectReason + + contentItem : ValueControl { id: _salineBolusVolumeControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.salineBolusVolumeMin + maximum : vTreatmentRanges.salineBolusVolumeMax + step : vTreatmentRanges.salineBolusVolumeRes + defaultValue : vTreatmentRanges.salineBolusVolumeDef + onValueChanged : vTreatmentCreate.salineBolusVolume = value + } + } + + PreTreatmentCreateItem { id: _bpMeasurementInterval + text : qsTr("BP Measurement Interval") + unitText : Variables.unitTextDuration + valid : ! vTreatmentCreate.bloodPressureMeasureIntervalRejectReason + + contentItem : ValueControl { id: _bpMeasurementIntervalControl + editable : _root.editingEnabled + minimum : vTreatmentRanges.bloodPressureMeasureIntervalMin + maximum : vTreatmentRanges.bloodPressureMeasureIntervalMax + step : vTreatmentRanges.bloodPressureMeasureIntervalRes + defaultValue : vTreatmentRanges.bloodPressureMeasureIntervalDef + onValueChanged : vTreatmentCreate.bloodPressureMeasureInterval = value + } + } + } + } +} Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateItem.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateItem.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateItem.qml (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -0,0 +1,90 @@ +/*! + * + * 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 PreTreatmentCreateItem.qml + * \author (last) Nico Ramirez + * \date (last) 21-Aug-2025 + * \author (original) Nico Ramirez + * \date (original) 21-Aug-2025 + * + */ + +// Qt +import QtQuick 2.12 + +// Qml +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment" + +Rectangle { id: _root + property Item contentItem : null + property alias contentArea : _contentArea + + property alias text : _title.text + property string unitText: "" + property bool valid : true + property bool showUnit : true + property bool showEdit : false + + height : cellHeight + width : cellWidth + radius : 8.5 + color : "#2E4259" + + border { + width: 1 + color: valid ? "#4DB5B5B5" : "#FFA500" + } + + signal editClicked + + Row { id: _titleRow + anchors { + verticalCenter : parent.verticalCenter + left : parent.left + leftMargin : Variables.defaultMargin + } + spacing : 10 + + Text { id: _title + anchors.verticalCenter : _titleRow.verticalCenter + color : Colors.offWhite + font.pixelSize : 28 + } + + Text { id: _unit + anchors.bottom : _title.bottom + text : ("(%1)").arg(_root.unitText) + color : Colors.offWhite + font.pixelSize : 22 + font.weight : Font.Thin + visible : _root.showUnit + } + + IconButton { id : _editButton + anchors.verticalCenter : _title.verticalCenter + anchors.verticalCenterOffset : 5 + visible : _root.showEdit + iconImageSource : "qrc:/images/iEdit" + onPressed : _root.editClicked() + iconSize : Variables.iconsDiameter + } + } + + ContentArea { id : _contentArea + anchors { + top : _root.top + left : _root.left + leftMargin : _root.width / 2 + right : _root.right + bottom : _root.bottom + } + + contentItem: _root.contentItem + } +} Fisheye: Tag 16a8f25568b4636ebc31e76c86a8031940cc4ad7 refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -118,7 +118,7 @@ width : 700 height : Variables.sliderDefaultBodyHeight diameter : Variables.progressbarHandler - touchMargin : Variables.createTreatmentSliderMargin + touchMargin : Variables.sliderDefaultBodyHeight ticks : true onValueChanged : reset( value ) } Index: sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -39,7 +39,7 @@ height : 40 width : contentItem.width topTextFont.pixelSize : Fonts.fontPixelVitals - topTextFont.weight : Font.Bold + topTextFont.weight : Font.Medium topText : Variables.notSetVariable(vTreatmentVitals.systolic, 2) + bloodSDSeparator + Variables.notSetVariable(vTreatmentVitals.diastolic, 2) bottomText : Variables.unitTextBloodPressure bottomTextFont.pixelSize: 20 @@ -51,7 +51,7 @@ height : 45 width : contentItem.width topTextFont.pixelSize : Fonts.fontPixelVitals - topTextFont.weight : Font.Bold + topTextFont.weight : Font.Medium topText : Variables.notSetVariable(vTreatmentVitals.heartRate, 2) bottomText : Variables.unitTextHeartBeat bottomTextFont.pixelSize: 20 Index: sources/view/hd/data/VTreatmentRanges.cpp =================================================================== diff -u -r036d378b4b89db03c812584c1d0f682494d81568 -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 036d378b4b89db03c812584c1d0f682494d81568) +++ sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -47,6 +47,26 @@ treatmentRanges_Dialysate_Flow_Max ( vData.mDialysate_Flow_Max - ( mDialysateFlowRateRes ? vData.mDialysate_Flow_Min % mDialysateFlowRateRes : 0 ) ); } +/** + * \brief VTreatmentRanges::doSaveAcidConcentrate + * \param vOption - QString new option to save to config file + * \details Save Acid Concentrate entered by user to config + */ +void View::VTreatmentRanges::doSaveAcidConcentrate (const QString &vOption) +{ + QString mCategory = ::Settings_Category_DataList; + + _Settings.add(mCategory, + "Acid Concentrate Options", + vOption, + QVariant(), + false ); + + // update +// emit acidConcentrateOptionsChanged(); + acidConcentrateOptions ( _Settings.keys(mCategory, "Acid Concentrate Options" )); +} + /*! * \brief VTreatmentCreate::onSettingsDone * \details fills the items below, read from the settings file, when the reading is notified done by ApplicationController. @@ -88,6 +108,9 @@ FROMVARIANT_WITHRETURN ( heparinBolusVolumeRes , "Heparin Bolus Volume Ranges" , "Heparin_Bolus_Volume_Res" , Float , isConfigsOk ); FROMVARIANT_WITHRETURN ( heparinStopTimeMin , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Min" , UInt , isConfigsOk ); + FROMVARIANT_WITHRETURN ( heparinStopTimeMax , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Max" , UInt , isConfigsOk ); + FROMVARIANT_WITHRETURN ( heparinStopTimeRes , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Res" , UInt , isConfigsOk ); + FROMVARIANT_WITHRETURN ( heparinStopTimeDef , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Def" , UInt , isConfigsOk ); FROMVARIANT_WITHRETURN ( salineBolusVolumeDef , "Saline Bolus Volume Ranges" , "Saline_Bolus_Volume_Def" , UInt , isConfigsOk ); FROMVARIANT_WITHRETURN ( salineBolusVolumeMin , "Saline Bolus Volume Ranges" , "Saline_Bolus_Volume_Min" , UInt , isConfigsOk ); Index: sources/view/hd/data/VTreatmentRanges.h =================================================================== diff -u -re36852d9548379bd861d4b0838761d2aa5243dad -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 --- sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision e36852d9548379bd861d4b0838761d2aa5243dad) +++ sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) @@ -77,5 +77,8 @@ signals: void didTreatmentRangesDone(bool vPass); + +public slots: + void doSaveAcidConcentrate (const QString &vOption); }; }