Index: leahi.qrc =================================================================== diff -u -r5d0e5c390a377b85066d1f6925291275ffc46e63 -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- leahi.qrc (.../leahi.qrc) (revision 5d0e5c390a377b85066d1f6925291275ffc46e63) +++ leahi.qrc (.../leahi.qrc) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -264,8 +264,8 @@ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml + sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationMetrics.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml - sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationPaused.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationConfirm.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml Index: sources/gui/qml/components/RangeMarker.qml =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/components/RangeMarker.qml (.../RangeMarker.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ sources/gui/qml/components/RangeMarker.qml (.../RangeMarker.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -46,9 +46,9 @@ Rectangle { id: _handle visible : false - width : _root.width * 3 - height : _root.width * 3 - radius : _root.width * 3 + width : _root.width * 4 + height : width + radius : width color : _root.color anchors { top : _root.top @@ -69,18 +69,20 @@ Text { id: _textValue font { pixelSize : Fonts.fontPixelRangeMarker - bold : true + weight : Font.DemiBold } anchors { - right : parent.left + right : valueOnTop ? parent.left : undefined top : valueOnTop ? undefined : parent.top bottom : valueOnTop ? _handle.top : undefined - bottomMargin: valueOnTop ? 5 : 0 + bottomMargin: valueOnTop ? 10 : 0 rightMargin : valueOnTop ? -12 : 5 topMargin : valueOnTop ? 0 : -5 + horizontalCenter: valueOnTop ? _handle.horizontalCenter : undefined } + horizontalAlignment: valueOnTop ? Text.AlignHCenter : Text.AlignLeft color : _root.color text : value.toFixed(decimal) + " " + unitText } Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -rb04fa0fce565a52305f2153f2cb6c5858453ab15 -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision b04fa0fce565a52305f2153f2cb6c5858453ab15) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -143,6 +143,12 @@ readonly property color scrollBarBgColor : white //"#80696969" // half transparent dimgray + readonly property color textBoxBgColor : "#344e6b" + readonly property color textBoxBorderColor : "#475d76" + readonly property color ufVolumeGoalText : "#f5be59" + readonly property color ufNotificationBarBg : "#0f2841" + readonly property color ufProgressBarFill : "#467bbe" + // ---------- < PRS > Related Section ---------- // Alarm priority colors function alarmPriorityColors(vPriority) { Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -rf7d7e8b10c7626f3c6b8450876721a452ebd730f -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision f7d7e8b10c7626f3c6b8450876721a452ebd730f) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -41,7 +41,7 @@ readonly property int fontPixelVitals : 60 - readonly property int fontPixelRangeMarker : 16 + readonly property int fontPixelRangeMarker : 32 readonly property int fontPixelRangeRectText : 14 readonly property int fontPixelStepCurrent : 18 @@ -77,6 +77,7 @@ readonly property int fontPixelUltrafiltrationAdjustmentNextButton : fontPixelUltrafiltrationAdjustmentButton readonly property int fontPixelUltrafiltrationAdjustmentConfirmButton : fontPixelUltrafiltrationAdjustmentButton readonly property int fontPixelUltrafiltrationAdjustmentEditValue : 46 + readonly property int fontPixelUltrafiltrationAdjustmentNotification : 32 readonly property int fontPixelUltrafiltrationRateUnit : 16 readonly property int fontPixelRinsebackAdjustmentButton : 26 Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -reecf28d1c27df3f060b6d671f209016ad62b594c -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision eecf28d1c27df3f060b6d671f209016ad62b594c) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -80,10 +80,10 @@ readonly property int rangeRectRadius : 2 readonly property int rangeRectTextMargin : 10 readonly property int rangeRectBorderWidth : 2 - readonly property int rangeMarkerHeight : 60 + readonly property int rangeMarkerHeight : 50 readonly property int rangeMarkerHeightMidle : 40 readonly property int rangeMarkerHeightShort : 30 - readonly property int rangeMarkerWidth : 2 + readonly property int rangeMarkerWidth : 3 readonly property int progressbarHeight : 30 readonly property int progressbarHandler : 30 @@ -144,6 +144,8 @@ readonly property int ultrafiltrationAdjustmtenOptionHeight : 275 readonly property int ultraFiltrationProgressBarHeight : 25 readonly property int ultraFiltrationEditSliderHeight : sliderDefaultBodyHeight // to be consistent with other sliders + readonly property int ultrafiltrationButtonWidth : 300 + readonly property int ultrafiltrationButtonHeight : 60 readonly property int silenceIconMargin : 10 readonly property int notificationBarIconMargin : 10 @@ -208,7 +210,7 @@ readonly property int textBoxBorderWidth : 2 readonly property int adjustmentDialogWidth : applicationWidth * 0.7 readonly property int adjustmentDialogHeight : applicationHeight * 0.7 - readonly property int adjustmentHeaderHeight : 100 + readonly property int adjustmentHeaderHeight : 120 readonly property int adjustmentButtonMargin : 30 // ---------- < PRS > Related Section ---------- Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -47,11 +47,11 @@ stackView.initialItem : null // ultrafiltration state information bar properties - readonly property bool isUFPaused : vTDTreatmentStates.ufPaused - readonly property bool isUFRunning : vTDTreatmentStates.ufRunning + readonly property bool isUFPaused : vTreatmentUltrafiltration.ufPaused + readonly property bool isUFRunning : vTreatmentUltrafiltration.ufRunning readonly property bool isTreatmentPaused : vTDTreatmentStates.txStop - readonly property string ufInfoImageSource : isUFPaused ? "qrc:/images/iPauseGray" : "" + readonly property string ufInfoImageSource : isUFPaused ? "qrc:/images/iPauseOrange" : "" readonly property string ufInfoText : isUFPaused ? qsTr("Ultrafiltration Paused" ) : "" readonly property string ufInfoTextColor : isUFPaused ? "gray" : "" Index: sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml (.../TreatmentUltrafiltrationItem.qml) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml (.../TreatmentUltrafiltrationItem.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -33,16 +33,11 @@ visible:false function open() { - if ( isUFRunning ) { - _treatmentAdjustmentUltrafiltrationStart .open() - } else { - _treatmentAdjustmentUltrafiltrationPaused.open() - } + _treatmentAdjustmentUltrafiltrationStart.open() } function close() { // this close should be never needed by design, but in tests it can easily happen and will block the screen touch. _treatmentAdjustmentUltrafiltrationStart .close() - _treatmentAdjustmentUltrafiltrationPaused .close() _treatmentAdjustmentUltrafiltrationEdit .close() _treatmentAdjustmentUltrafiltrationConfirm .close() } @@ -55,15 +50,13 @@ // not accepted show error in notification vTreatmentAdjustmentUltrafiltrationState.doPause() } - } - - TreatmentAdjustmentUltrafiltrationPaused { id: _treatmentAdjustmentUltrafiltrationPaused - onCloseClicked : close() onEditClicked : { close() _treatmentAdjustmentUltrafiltrationEdit.reset() // reset the slider to minimum value position _treatmentAdjustmentUltrafiltrationEdit.open() } + onIsolatedUfClicked : { + } onResumeClicked : { // send resume to HD and wait. // if accepted close() @@ -75,7 +68,7 @@ TreatmentAdjustmentUltrafiltrationEdit { id: _treatmentAdjustmentUltrafiltrationEdit onBackClicked : { close() - _treatmentAdjustmentUltrafiltrationPaused.open() + _treatmentAdjustmentUltrafiltrationStart.open() } onNextClicked : { // send Volume to HD and wait. @@ -98,21 +91,26 @@ } } + Connections { target: vTreatmentUltrafiltration + function onUfRunningChanged() { + if ( isUFRunning ) { + _treatmentAdjustmentUltrafiltrationEdit .close() + _treatmentAdjustmentUltrafiltrationConfirm .close() + _treatmentAdjustmentUltrafiltrationStart .open() + } + } + } + Connections { target: vTreatmentAdjustmentUltrafiltrationState function onAdjustmentTriggered ( vValue ) { if ( vTreatmentAdjustmentUltrafiltrationState.adjustment_Accepted ) { if (vTDTreatmentStates.ufPaused) { // handle screen regarding current accepted _treatmentAdjustmentUltrafiltrationStart .close() - _treatmentAdjustmentUltrafiltrationPaused.open () - } else { - _treatmentAdjustmentUltrafiltrationPaused.close() } } else { if (vTDTreatmentStates.ufRunning) { // handle error messages regarding current accepted _treatmentAdjustmentUltrafiltrationStart.notificationText = vTreatmentAdjustmentUltrafiltrationState.adjustment_ReasonText - } else { - _treatmentAdjustmentUltrafiltrationPaused.notificationText = vTreatmentAdjustmentUltrafiltrationState.adjustment_ReasonText } } } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationMetrics.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationMetrics.qml (revision 0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationMetrics.qml (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -0,0 +1,136 @@ +/*! + * + * 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 TreatmentAdjustmentUltrafiltrationMetrics.qml + * \author (last) Stephen Quong + * \date (last) 19-Aug-2025 + * \author (original) Stephen Quong + * \date (original) 19-Aug-2025 + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief TreatmentAdjustmentUltrafiltrationMetrics contains components + * that display the ultrafiltration volume removed and goal. + */ +Item { id: _root + property real setVolume : 0 + property real volumeRemoved : 0 + + TextMetrics { id: _volumeValueMetrics + font { + pixelSize : Fonts.fontPixelButton + 8 + weight : Font.DemiBold + } + text : "0.00" + } + + Rectangle { id: _ufVolumeRemovedBox + anchors { + centerIn : parent + horizontalCenterOffset : -(width/2 + 30) + } + width : 350 + height : 60 + radius : 5 + color : Colors.textBoxBgColor + border { + width : Variables.textBoxBorderWidth + color : Colors.textBoxBorderColor + } + + Item { id: _ufVolumeRemovedTextBox + anchors.centerIn: parent + width: childrenRect.width + height: _volumeValueMetrics.height + + Text { id: _ufVolumeRemovedLabel + anchors{ + left : parent.left + verticalCenter : parent.verticalCenter + } + font { + pixelSize : Fonts.fontPixelButton + weight : Font.Medium + } + color : Colors.fluidText + text : qsTr("UF Volume Removed: ") + } + + Text { id: _ufVolumeRemovedValue + anchors{ + left : _ufVolumeRemovedLabel.right + verticalCenter : parent.verticalCenter + } + width : _volumeValueMetrics.width + font { + pixelSize : _volumeValueMetrics.font.pixelSize + weight : _volumeValueMetrics.font.weight + } + color : Colors.fluidText + text : _root.volumeRemoved.toFixed(Variables.ultrafiltrationPrecision) + } + } + } + + Rectangle { id: _ufVolumeGoalBox + anchors { + centerIn : parent + horizontalCenterOffset : -(_ufVolumeRemovedBox.anchors.horizontalCenterOffset) + } + width : _ufVolumeRemovedBox.width + height : _ufVolumeRemovedBox.height + radius : _ufVolumeRemovedBox.radius + color : _ufVolumeRemovedBox.color + border { + width : Variables.textBoxBorderWidth + color : Colors.textBoxBorderColor + } + + Item { id: _ufVolumeGoalTextBox + anchors.centerIn: parent + width: childrenRect.width + height: _volumeValueMetrics.height + + Text { id: _ufVolumeGoalLabel + anchors{ + left : parent.left + verticalCenter : parent.verticalCenter + } + font { + pixelSize : Fonts.fontPixelButton + weight : Font.Medium + } + color : Colors.ufVolumeGoalText + text : qsTr("UF Volume Goal: ") + } + + Text { id: _ufVolumeGoalValue + anchors{ + left : _ufVolumeGoalLabel.right + verticalCenter : parent.verticalCenter + } + width : _volumeValueMetrics.width + font { + pixelSize : _volumeValueMetrics.font.pixelSize + weight : _volumeValueMetrics.font.weight + } + color : Colors.ufVolumeGoalText + text : _root.setVolume.toFixed(Variables.ultrafiltrationPrecision) + } + } + } +} Fisheye: Tag a6ad83a73eb80978261a408ee5a92fbc8f7faa4e refers to a dead (removed) revision in file `sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationPaused.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml =================================================================== diff -u -r86274f18e9356126c41d848bc78bfba318638aee -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision 86274f18e9356126c41d848bc78bfba318638aee) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -30,75 +30,156 @@ contentItem.objectName: "TreatmentAdjustmentUltrafiltrationStart" //SquishQt testability QtObject { id: _private - property real minimum: vTreatmentUltrafiltration.minimum - property real maximum: vTreatmentUltrafiltration.maximum - property real value : vTreatmentUltrafiltration.volumeRemoved + property real minimum : vTreatmentUltrafiltration.minimum + property real maximum : vTreatmentUltrafiltration.maximum + property real setVolume : vTreatmentUltrafiltration.setVolume + property real volumeRemoved : vTreatmentUltrafiltration.volumeRemoved } + signal editClicked() + signal isolatedUfClicked() signal pauseClicked() + signal resumeClicked() confirmVisible: false information { visible : true && information.text && ! notification.visible imageSource : ufInfoImageSource text : ufInfoText + radius : 0 + color : Colors.ufNotificationBarBg + textColor : Colors.ufVolumeGoalText + textfontSize : Fonts.fontPixelUltrafiltrationAdjustmentNotification + textfontWeight : Font.Normal } - titleText : qsTr("ULTRAFILTRATION VOLUME") + " " + Variables.unitTextUltrafiltrationVolume + titleText : qsTr("Ultrafiltration Volume ") + Variables.unitTextUltrafiltrationVolume - ProgressBarEx { id: _progressbarex - width : Variables.ultrafiltrationProgressbarWidth - height : Variables.ultraFiltrationProgressBarHeight + TreatmentAdjustmentUltrafiltrationMetrics { id: _ufMetrics anchors { - top: parent.top - topMargin: 250 + top : parent.top + topMargin : Variables.defaultMargin * 2 horizontalCenter: parent.horizontalCenter } + setVolume : _private.setVolume + volumeRemoved : _private.volumeRemoved + } + + ProgressBarEx { id: _progressbarex + anchors { + top : _ufMetrics.bottom + topMargin : 160 + left : parent.left + leftMargin : 60 + right : parent.right + rightMargin : anchors.leftMargin + } + height : Variables.ultraFiltrationProgressBarHeight decimal : Variables.ultrafiltrationPrecision minimum : _private.minimum - maximum : _private.maximum - value : _private.value + maximum : _private.setVolume + value : _private.volumeRemoved valueEx : 0 + progressEx.color: Colors.ufProgressBarFill + minText { + font { + pixelSize : Fonts.fontPixelButton + weight : Font.Normal + } + text : minimum.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume + } + maxText { + font { + pixelSize : minText.font.pixelSize + weight : minText.font.weight + } + text : _private.setVolume.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume + } } TouchRect { id: _pauseButton - onClicked: _root.pauseClicked() - - width: 530 - height: 95 anchors { - top: parent.top - topMargin: 400 + top : _progressbarex.bottom + topMargin : 110 horizontalCenter: parent.horizontalCenter } - isDefault: true - Image { id: _image + width : 360 + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Pause Ultrafiltration") + font.weight : Font.DemiBold anchors { - left : _pauseButton.left - leftMargin : 65 - verticalCenter: _pauseButton.verticalCenter + centerIn : null // disable the parent anchor + verticalCenter : _pauseButton.verticalCenter + left : _image.right + leftMargin : Variables.defaultMargin } + } + isDefault : true + visible : isUFPaused === false - width : Variables.pauseIconDiameter - height: Variables.pauseIconDiameter + onClicked : _root.pauseClicked() + + Image { id: _image + anchors { + top : parent.top + topMargin : 10 + bottom : parent.bottom + bottomMargin : anchors.topMargin + left : parent.left + leftMargin : (parent.width - (_image.width + _pauseButton.text.anchors.leftMargin + _pauseButton.text.contentWidth)) / 2 + } + width : height source: "qrc:/images/iPauseDarkBlue" } + } - text { - text: qsTr("PAUSE ULTRAFILTRATION") - font.weight: Font.DemiBold - font.pixelSize: 26 //Fonts.fontPixelBack - anchors { - centerIn: null // disable the parent anchor - verticalCenter: _pauseButton.verticalCenter - left: _image.right - leftMargin: 15 + Row { id: _pausedButtonArea + anchors { + top : _progressbarex.bottom + topMargin : _pauseButton.anchors.topMargin + horizontalCenter : parent.horizontalCenter + } + spacing : Variables.defaultMargin + visible : ! _pauseButton.visible + + TouchRect { id: _resumeButton + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Resume Ultrafiltration") + font.weight : Font.DemiBold } + isDefault : true + onClicked : _root.resumeClicked() } + + TouchRect { id: _editButton + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Edit UF") + font.weight : Font.DemiBold + } + isDefault : true + onClicked : _root.editClicked() + } + + TouchRect { id: _isolatedUfButton + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Isolated UF") + font.weight : Font.DemiBold + } + isDefault : true + onClicked : _root.isolatedUfClicked() + } } + Text { id: _informationText - text: qsTr("Note: Ultrafiltration needs to be paused to edit the volume.") + text: qsTr("Note: Ultrafiltration must be paused to edit the volume.") color: "#a3b7c9" font { pixelSize: 25 @@ -109,5 +190,6 @@ topMargin: 35 horizontalCenter: parent.horizontalCenter } + visible: _pauseButton.visible } } Index: sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml =================================================================== diff -u -re9bc210a8ebe1f8f2cf9f00a00d03211dec9b07c -ra6ad83a73eb80978261a408ee5a92fbc8f7faa4e --- sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision e9bc210a8ebe1f8f2cf9f00a00d03211dec9b07c) +++ sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision a6ad83a73eb80978261a408ee5a92fbc8f7faa4e) @@ -98,7 +98,6 @@ unitText: Variables.unitVolume color : Colors.progressBarUltrafiltration radius : height - progressRadius : radius showMarker : false minText.color: "#818181"