Index: leahi.qrc
===================================================================
diff -u -rf2aa3ee850de1023cfc011b845ed0364d251b749 -r44b18327125389577b34655dfc0d95331c4b8f14
--- leahi.qrc (.../leahi.qrc) (revision f2aa3ee850de1023cfc011b845ed0364d251b749)
+++ leahi.qrc (.../leahi.qrc) (revision 44b18327125389577b34655dfc0d95331c4b8f14)
@@ -176,6 +176,7 @@
sources/gui/qml/compounds/LabelUnitContainer.qml
sources/gui/qml/compounds/ValueAdjuster.qml
sources/gui/qml/compounds/TreatmentAdjustmentUltrafiltrationMetrics.qml
+ sources/gui/qml/compounds/LabelUnitValueAdjuster.qml
qtquickcontrols2.conf
Index: sources/gui/qml/compounds/LabelUnitContainer.qml
===================================================================
diff -u -r24f141c96bdd5d4043e6ff05ea7ad962f63faabc -r44b18327125389577b34655dfc0d95331c4b8f14
--- sources/gui/qml/compounds/LabelUnitContainer.qml (.../LabelUnitContainer.qml) (revision 24f141c96bdd5d4043e6ff05ea7ad962f63faabc)
+++ sources/gui/qml/compounds/LabelUnitContainer.qml (.../LabelUnitContainer.qml) (revision 44b18327125389577b34655dfc0d95331c4b8f14)
@@ -22,13 +22,15 @@
import "qrc:/pages/pretreatment"
Rectangle { id: _root
- property Item contentItem : null
- property alias contentArea : _contentArea
+ property Item contentItem : null
+ property alias contentArea : _contentArea
- property alias text : _title.text
- property string unitText : ""
- property bool valid : true
- property bool showEdit : false
+ property alias text : _title.text
+ property alias titleFontPixelSize : _title.font.pixelSize
+ property string unitText : ""
+ property alias unitFontPixelSize : _unit.font.pixelSize
+ property bool valid : true
+ property bool showEdit : false
height : cellHeight
width : cellWidth
Index: sources/gui/qml/compounds/LabelUnitValueAdjuster.qml
===================================================================
diff -u
--- sources/gui/qml/compounds/LabelUnitValueAdjuster.qml (revision 0)
+++ sources/gui/qml/compounds/LabelUnitValueAdjuster.qml (revision 44b18327125389577b34655dfc0d95331c4b8f14)
@@ -0,0 +1,45 @@
+/*!
+ *
+ * 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 LabelUnitValueAdjuster.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 imports
+import "qrc:/globals"
+
+LabelUnitContainer { id: _root
+ objectName : "_LabelUnitValueAdjuster"
+
+ property alias valueTextColor : _valueAdjuster.textColor
+ property alias isActive : _valueAdjuster.isActive
+ property alias decimal : _valueAdjuster.decimal
+ property alias minimum : _valueAdjuster.minimum
+ property alias maximum : _valueAdjuster.maximum
+ property alias step : _valueAdjuster.step
+ property alias value : _valueAdjuster.value
+
+ width : Variables.adjustmentLabelUnitContainerWidth
+ height : Variables.adjustmentLabelUnitContainerHeight
+
+ signal didChange (real vValue)
+ signal didActiveChange (bool vState)
+
+ contentItem : ValueAdjuster { id: _valueAdjuster
+ objectName : "_valueAdjuster"
+
+ onDidChange : function(vValue) { _root.didChange(vValue) }
+ onDidActiveChange : function(vState) { _root.didActiveChange(vState) }
+ }
+}
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r8672e62f205231b08dd7d4a4f6f7f3a60b2c677b -r44b18327125389577b34655dfc0d95331c4b8f14
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 8672e62f205231b08dd7d4a4f6f7f3a60b2c677b)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 44b18327125389577b34655dfc0d95331c4b8f14)
@@ -301,6 +301,8 @@
readonly property string unitTextFluid : qsTr("mL")
readonly property string unitTextSaline : unitTextFluid
readonly property string unitTextHeparin : unitTextFluid
+ // - Pressure
+ readonly property string unitTextPressure : qsTr("mmHg")
// - Temperature
readonly property string unitTextTemperature : qsTr("°C")
// Concentration
Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml
===================================================================
diff -u -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 -r44b18327125389577b34655dfc0d95331c4b8f14
--- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7)
+++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision 44b18327125389577b34655dfc0d95331c4b8f14)
@@ -28,159 +28,104 @@
* To adjust the treatment inline blood pressure ranges of Arterial and venous
*/
TreatmentAdjustmentBase { id: _root
- contentItem.objectName: "TreatmentAdjustmentPressures" //SquishQt testability
+ objectName: "_TreatmentAdjustmentPressures" //SquishQt testability
- property alias arterialPressureLimitWindow : _arterialWindow .value
- property alias venousPressureLimitWindow : _venousWindow .value
- property alias venousPressureLimitAsymtrc : _venousAsymmetric .value
+ titleText: qsTr("Pressure Window Limit Settings")
- titleText: qsTr("PRESSURES")
+ contentItem: Item { id: _contentItem
+ objectName: "_contentItem"
- // Note : The slider values are not bound and will be set by user freely
- // and will be used to be sent for adjustment
- // if accepted will not changed and
- // if rejected then will be reset to the values passed by adjustment response
-
- // reset the flow values to the current flow values
- function currentFlows() {
- // if the vTreatmentAdjustmentPressuresLimits.* is not set yet, use the default value
- // TODO need to change to use the value used in treatment if these limits are being set in create treatment
- _arterialWindow.reset( vTreatmentAdjustmentPressuresLimits.arterialPressureLimitWindow || _arterialWindow.defaultValue)
- _venousWindow.reset( vTreatmentAdjustmentPressuresLimits.venousPressureLimitWindow || _venousWindow.defaultValue)
- _venousAsymmetric.reset( vTreatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrc || _venousAsymmetric.defaultValue)
- }
-
- // reset the flow values to the values of the adjustment response
- function resetFlows() {
- _arterialWindow.reset( vTreatmentAdjustmentPressuresLimits.arterialPressureLimitWindow )
- _venousWindow.reset( vTreatmentAdjustmentPressuresLimits.venousPressureLimitWindow )
- _venousAsymmetric.reset( vTreatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrc )
- }
-
- onAboutToShow: {
- // TODO : When Testing data on Setting screen is removed
- // This needs to be moved into the Treatment______.qml
- currentFlows()
- }
-
- Connections { target: vTreatmentAdjustmentPressuresLimits
- function onAdjustmentTriggered ( vValue ) {
- if ( vTreatmentAdjustmentPressuresLimits.adjustment_Accepted ) {
- accept()
- } else {
- resetFlows()
- console.debug(vTreatmentAdjustmentPressuresLimits.text())
- notification.text = vTreatmentAdjustmentPressuresLimits.text()
+ Item { id: _contentArea
+ objectName: "_contentArea"
+ anchors {
+ top: parent.top
+ bottom: _continueButton.top
+ left: parent.left
+ right: parent.right
}
- }
- }
- component SliderPressure : Item {
- property alias title : _title.text
- property alias minimum : _slider.minimum
- property alias maximum : _slider.maximum
- property alias step : _slider.step
- property alias value : _slider.value
- property alias defaultValue : _slider.defaultValue
- property alias sliderWidth : _slider.width
- property int hPadding : 30
+ Column { id: _controlColumn
+ objectName: "_controlColumn"
+ anchors.centerIn: parent
+ spacing: Variables.defaultMargin
- function reset(vValue) {
- _slider.reset(vValue)
- }
+ LabelUnitValueAdjuster { id: _arterialWindow
+ objectName : "_arterialWindow"
+ text : qsTr("Arterial Window")
+ titleFontPixelSize : Fonts.fontPixelContainerTitleSmall
+ unitText : Variables.unitTextPressure
+ unitFontPixelSize : Fonts.fontPixelContainerUnitSmall
+ valueTextColor : Colors.ufVolumeGoalText
+ minimum : vTreatmentRanges.arterialPressureLimitWindowMin
+ maximum : vTreatmentRanges.arterialPressureLimitWindowMax
+ step : vTreatmentRanges.arterialPressureLimitWindowRes
+ value : { value = vTreatmentRanges.arterialPressureLimitWindowDef } // set without binding
+ }
- height : 150
- width : parent.width - hPadding * 2
+ LabelUnitValueAdjuster { id: _venousWindow
+ objectName : "_venousWindow"
+ text : qsTr("Venous Window")
+ titleFontPixelSize : _arterialWindow.titleFontPixelSize
+ unitText : Variables.unitTextPressure
+ unitFontPixelSize : _arterialWindow.unitFontPixelSize
+ valueTextColor : _arterialWindow.valueTextColor
+ minimum : vTreatmentRanges.venousPressureLimitWindowMin
+ maximum : vTreatmentRanges.venousPressureLimitWindowMax
+ step : vTreatmentRanges.venousPressureLimitWindowRes
+ value : { value = vTreatmentRanges.venousPressureLimitWindowDef } // set without binding
+ }
- Text { id: _title
- height : 50
- anchors.top : parent.top
- anchors.left : parent.left
- horizontalAlignment : Text.AlignLeft
- font.pixelSize : Fonts.fontPixelPresseuresLabel
- color : Colors.textMain
- }
+ LabelUnitValueAdjuster { id: _venousAsymmetricWindow
+ objectName : "_venousAsymmetricWindow"
+ text : qsTr("Venous Asymmetric Window")
+ titleFontPixelSize : _arterialWindow.titleFontPixelSize
+ unitText : Variables.unitTextPressure
+ unitFontPixelSize : _arterialWindow.unitFontPixelSize
+ valueTextColor : _arterialWindow.valueTextColor
+ minimum : vTreatmentRanges.venousPressureLimitAsymtrcMin
+ maximum : vTreatmentRanges.venousPressureLimitAsymtrcMax
+ step : vTreatmentRanges.venousPressureLimitAsymtrcRes
+ value : { value = vTreatmentRanges.venousPressureLimitAsymtrcDef } // set without binding
+ }
- Text { id: _value
- width : 120
- anchors.baseline : _title.baseline
- anchors.right : parent.right
- font.pixelSize : Fonts.fontPixelFluidUnit
- color : Colors.textMain
- text : _slider.value.toFixed(0) + " " + Variables.unitTextBloodPressure
- horizontalAlignment : Text.AlignRight
+ LabelUnitValueAdjuster { id: _tmpWindow
+ objectName : "_tmpWindow"
+ text : qsTr("TMP Window")
+ titleFontPixelSize : _arterialWindow.titleFontPixelSize
+ unitText : Variables.unitTextPressure
+ unitFontPixelSize : _arterialWindow.unitFontPixelSize
+ valueTextColor : _arterialWindow.valueTextColor
+ minimum : vTreatmentRanges.trancembrncPressureLimitWindowMin
+ maximum : vTreatmentRanges.trancembrncPressureLimitWindowMax
+ step : vTreatmentRanges.trancembrncPressureLimitWindowRes
+ value : { value = vTreatmentRanges.trancembrncPressureLimitWindowDef } // set without binding
+ }
+ }
}
- Slider { id : _slider
- anchors.top : _title.bottom
- anchors.topMargin : 15
- anchors.horizontalCenter: parent.horizontalCenter
- width : 700
- height : Variables.sliderDefaultBodyHeight
- diameter : Variables.progressbarHandler
- touchMargin : Variables.sliderDefaultBodyHeight
- ticks : true
- onValueChanged : reset( value )
- }
+ TouchRect { id: _continueButton
+ objectName : "_continueButton"
+ anchors {
+ bottom : parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ }
+ width : Variables.ultrafiltrationButtonWidth
+ height : Variables.ultrafiltrationButtonHeight
+ text {
+ text : qsTr("Continue")
+ font.weight : Font.Medium
+ }
+ isDefault : true
- SliderArrows{ id : _sliderArrows
- anchors.left : _slider.right
- anchors.leftMargin : 30
- anchors.verticalCenter : _slider.verticalCenter
- onIncrementValue : _slider.incrementValue(true)
- onDecrementValue : _slider.decrementValue(true)
+ onClicked : {
+ console.log("continue.onClicked")
+ }
}
}
- SliderPressure { id: _arterialWindow
- objectName : "_arterialWindow"
- anchors {
- top : parent.top
- topMargin : 125
- horizontalCenter: parent.horizontalCenter
- }
- title : qsTr("Arterial Window")
- minimum : vTreatmentRanges.arterialPressureLimitWindowMin
- maximum : vTreatmentRanges.arterialPressureLimitWindowMax
- step : vTreatmentRanges.arterialPressureLimitWindowRes
- value : vTreatmentRanges.arterialPressureLimitWindowDef
- defaultValue : vTreatmentRanges.arterialPressureLimitWindowDef
+ footer: Item { id: _footerItem
+ objectName : "_footerItem"
+ width : parent.width
+ height : Variables.notificationHeight
}
-
- Line { id: _divider
- anchors.horizontalCenter: parent.horizontalCenter
- length : _root.width - 100
- color : Colors.separatorLine
- anchors.top: _arterialWindow.bottom
- anchors.topMargin: 15
- }
-
- SliderPressure { id: _venousWindow
- objectName : "_venousWindow"
- anchors {
- top : _divider.bottom
- topMargin : 30
- horizontalCenter: parent.horizontalCenter
- }
- title : qsTr("Venous Window")
- minimum : vTreatmentRanges.venousPressureLimitWindowMin
- maximum : vTreatmentRanges.venousPressureLimitWindowMax
- step : vTreatmentRanges.venousPressureLimitWindowRes
- value : vTreatmentRanges.venousPressureLimitWindowDef
- defaultValue : vTreatmentRanges.venousPressureLimitWindowDef
- }
-
- SliderPressure { id: _venousAsymmetric
- objectName : "_venousAsymmetric"
- anchors {
- top : _venousWindow.bottom
- horizontalCenter: parent.horizontalCenter
- }
- title : qsTr("Venous Asymmetric")
- minimum : vTreatmentRanges.venousPressureLimitAsymtrcMin
- maximum : vTreatmentRanges.venousPressureLimitAsymtrcMax
- step : vTreatmentRanges.venousPressureLimitAsymtrcRes
- value : vTreatmentRanges.venousPressureLimitAsymtrcDef
- defaultValue : vTreatmentRanges.venousPressureLimitAsymtrcDef
- }
}