Index: leahi.qrc =================================================================== diff -u -r1164ea502e3fabdb55aa41923e0e566505f197ef -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- leahi.qrc (.../leahi.qrc) (revision 1164ea502e3fabdb55aa41923e0e566505f197ef) +++ leahi.qrc (.../leahi.qrc) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -179,6 +179,7 @@ sources/gui/qml/components/RangedValue.qml sources/gui/qml/components/SubStepIndicator.qml sources/gui/qml/components/SDCInfo.qml + sources/gui/qml/components/BaseChart.qml sources/gui/qml/compounds/PressureRangeSlider.qml @@ -269,6 +270,7 @@ sources/gui/qml/pages/treatment/TreatmentSection.qml sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml sources/gui/qml/pages/treatment/TreatmentHeparin.qml + sources/gui/qml/pages/treatment/TreatmentHDF.qml sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml @@ -279,6 +281,7 @@ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml sources/gui/qml/pages/treatment/sections/TreatmentPressureComponent.qml sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml + sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml Index: sources/gui/qml/components/BaseChart.qml =================================================================== diff -u --- sources/gui/qml/components/BaseChart.qml (revision 0) +++ sources/gui/qml/components/BaseChart.qml (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -0,0 +1,165 @@ +/*! + * + * Copyright (c) 2025-2026 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 BaseChart.qml + * \author (last) Nico Ramirez + * \date (last) 2-Feb-2026 + * \author (original) Nico Ramirez + * \date (original) 2-Feb-2026 + * + */ + +import QtQuick 2.15 +import QtCharts 2.15 + +import "qrc:/globals" + +Rectangle { id: _root + color : _root.chartColor + radius : 15 + + readonly property color chartColor : "#2A425A" + readonly property color gridColor : "#354F69" + readonly property color labelColor : "#6F7D8A" + + property int lineSeries1Value : 0 + property int lineSeries2Value : 0 + property int lineSeries3Value : 0 + property alias lineSeries1Color : _line1.color + property alias lineSeries2Color : _line2.color + property alias lineSeries3Color : _line3.color + + readonly property int minY : -700 + readonly property int maxY : 600 + + readonly property int plotFrequency : 1000 // 1000 * 60 // plot every 1 min + + /////////////////////////////// TODO: TEST REMOVE LATER /////////////////////////// + property int currentTime : 0 + readonly property int interval : 1 // interval to plot for DEMO + + function demoPlot() { + let now = new Date() + let newTime = new Date(now.getTime() + currentTime * 60 * 1000) + + if ( isOutsideWindow( newTime ) ) { shiftWindow(15) } // shift 15 min once out of scope + + _line1.append( newTime, lineSeries1Value ) + _line2.append( newTime, lineSeries2Value ) + _line3.append( newTime, lineSeries3Value ) + currentTime+=interval // inremement min + } + ////////////////////////////////// END REMOVE ////////////////////////////////////// + + function plotGraph() { + let now = new Date() + + if ( isOutsideWindow( now ) ) { shiftWindow(15) } // shift 15 min once out of scope + + _line1.append( now, lineSeries1Value ) + _line2.append( now, lineSeries2Value ) + _line3.append( now, lineSeries3Value ) + } + + // set window + function updateXAxis() { + let now = new Date() + let min = snapToPreviousFiveMinutes(now) + let max = snapToPreviousFiveMinutes(new Date(now.getTime() + 60 * 60 * 1000)) // 1 hour window + _xAxis.min = min + _xAxis.max = max + + _timer.start() + } + + // Snap any date to the previous 5-minute mark + function snapToPreviousFiveMinutes(date) { + let newDate = new Date(date) + let minutes = newDate.getMinutes() + + let snappedMinutes = Math.floor(minutes / 5) * 5 + newDate.setMinutes(snappedMinutes) + newDate.setSeconds(0) + newDate.setMilliseconds(0) + + return newDate + } + + function isOutsideWindow(time) { + return time > _xAxis.max + } + + // when out of scope shift window by given min + function shiftWindow( vMin ) { + const hourMs = 60 * vMin * 1000 + _xAxis.min = new Date(_xAxis.min.getTime() + hourMs) + _xAxis.max = new Date(_xAxis.max.getTime() + hourMs) + + // remove points left of the window + while (_line1.count > 0 && _line1.at(0).x < _xAxis.min.getTime()) { + _line1.remove(0) + _line2.remove(0) + _line3.remove(0) + } + } + + Timer { id: _timer + interval : _root.plotFrequency + running : false + repeat : true + onTriggered : demoPlot() // plotGraph() // demoPlot() demo code -- remove + } + + DateTimeAxis { id: _xAxis + format : "H:mm" + tickCount : 13 + gridVisible : false + color : _root.gridColor + labelsColor : _root.labelColor + labelsFont.pixelSize: 14 + } + + ValueAxis { id: _yAxis + min : _root.minY + max : _root.maxY + tickCount : 14 // 12 + labelFormat : "%i" + color : _root.gridColor + gridLineColor : _root.gridColor + labelsColor : _root.labelColor + labelsFont.pixelSize: 14 + } + + ChartView { id: _chartView + anchors.fill : parent + antialiasing : true + legend.visible : false + backgroundColor : _root.chartColor + plotAreaColor : _root.chartColor + + LineSeries { id: _line1 + axisX : _xAxis + axisY : _yAxis + useOpenGL : true + width : 3 + } + + LineSeries { id: _line2 + axisX : _xAxis + axisY : _yAxis + useOpenGL : true + width : 3 + } + + LineSeries { id: _line3 + axisX : _xAxis + axisY : _yAxis + useOpenGL : true + width : 3 + } + } +} Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -rf0e262920199d1d5ebdbe3f1bf0c58c58a82d363 -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision f0e262920199d1d5ebdbe3f1bf0c58c58a82d363) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -10,7 +10,8 @@ property alias titleText : _title.text property alias loggedUser : _loggedInUser.text readonly property int currentScreen : _headerMenu.currentScreen - property alias statusColor : _headerMenu.statusColor + property alias heparinStatusColor : _headerMenu.heparinStatusColor + property alias hdfStatusColor : _headerMenu.hdfStatusColor property bool isCreateRx : false // set in slot in parent width : Variables.applicationWidth @@ -145,7 +146,7 @@ ListElement { text: qsTr("Treatment"); visible: true; screen: 0 } // MainMenu.Treatment ListElement { text: qsTr("Trends"); visible: true; screen: 1 } // MainMenu.Trends ListElement { text: qsTr("Heparin"); visible: true; screen: 2 } // MainMenu.Heparin - ListElement { text: qsTr("HDF"); visible: false; screen: 3 } // MainMenu.HDF + ListElement { text: qsTr("HDF"); visible: true; screen: 3 } // MainMenu.HDF } } Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r69c86c57349b7d4a6ba47a801ba27b1c470fade5 -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 69c86c57349b7d4a6ba47a801ba27b1c470fade5) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -34,8 +34,9 @@ property color backgroundColor : Colors.backgroundMainMenu property int highlightHeight : 10 property bool isMainTreatment : false - readonly property int currentScreen : isMainTreatment ? model.get(index).screen : 0 - property color statusColor : Colors.transparent + readonly property int currentScreen : isMainTreatment ? _model.get(index).screen : 0 + property color heparinStatusColor : Colors.transparent + property color hdfStatusColor : Colors.transparent width : parent.width height : Variables.mainMenuHeight @@ -104,7 +105,7 @@ border.width: 0 pixelSize : titlePixelSize - Rectangle { id: _heparinStatus + Rectangle { id: _status anchors { left : parent.left leftMargin : Variables.defaultMargin * 2 @@ -115,8 +116,10 @@ height : 15 width : height radius : height - visible : _root.isMainTreatment && model.screen === MainMenu.Heparin - color : _root.statusColor + visible : _root.isMainTreatment && ( model.screen === MainMenu.Heparin || + model.screen === MainMenu.HDF ) + color : model.screen === MainMenu.Heparin ? _root.heparinStatusColor : + model.screen === MainMenu.HDF ? _root.hdfStatusColor : Colors.transparent } onPressed: { Index: sources/gui/qml/compounds/LabelUnitValueAdjuster.qml =================================================================== diff -u -rad57884fca3e8a0916b6d6bf51a69264b9b5263f -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/compounds/LabelUnitValueAdjuster.qml (.../LabelUnitValueAdjuster.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) +++ sources/gui/qml/compounds/LabelUnitValueAdjuster.qml (.../LabelUnitValueAdjuster.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -31,6 +31,7 @@ property alias value : _valueAdjuster.value property alias canOff : _valueAdjuster.canOff property alias editable : _valueAdjuster.editable + property alias defaultValue : _valueAdjuster.defaultValue width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r1164ea502e3fabdb55aa41923e0e566505f197ef -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 1164ea502e3fabdb55aa41923e0e566505f197ef) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -94,9 +94,9 @@ readonly property color panelInvalidBorderColor : "#FFA500" readonly property color heparinPanelBorderColor         : "#CC42556B" readonly property color heparinSectionHeader            : "#384B60" - readonly property color heparinActive                   : "#429C4A" - readonly property color heparinPaused                   : "#D9A23D" - readonly property color heparinComplete                 : "#276FCD" + readonly property color statusActive : "#429C4A" + readonly property color statusPaused : "#D9A23D" + readonly property color statusComplete : "#276FCD" readonly property color touchTextAreaTitle : "#a0b6d0" Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r5b83234771fac143552fa8106027d0ed8730c4d5 -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 5b83234771fac143552fa8106027d0ed8730c4d5) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -128,6 +128,8 @@ readonly property int treatmentFlowsComponentWidth : 150 readonly property int treatmentPressureTitleWidth : 125 readonly property int treatmentPressureValueWidth : 140 + readonly property int treatmentCellWidth : 264 // screen width / # columns + readonly property int treatmentCellHeight : 420 //screen height / # rows - headerbar readonly property int ultrafiltrationProgressBarWidth : 769 readonly property int ultraFiltrationProgressBarHeight : 25 Index: sources/gui/qml/pages/MainHome.qml =================================================================== diff -u -r2747ac2a6976f0ef0b2f8fd91a2243f04a817a49 -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 2747ac2a6976f0ef0b2f8fd91a2243f04a817a49) +++ sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -31,7 +31,6 @@ property alias reasonText : _notification.text - signal startTreatment() signal createTreatment() Image { Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -114,7 +114,6 @@ } MainHome { id: _mainHome - onStartTreatment : { page( _treatmentStack )} // TODO: Remove before merging into staging. Only needed for this branch onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate( )} onVisibleChanged: { if (visible) { Index: sources/gui/qml/pages/treatment/TreatmentHDF.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/TreatmentHDF.qml (revision 0) +++ sources/gui/qml/pages/treatment/TreatmentHDF.qml (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -0,0 +1,98 @@ +/*! + * + * Copyright (c) 2025-2026 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 TreatmentHDF.qml + * \author (last) Nico Ramirez + * \date (last) 2-Feb-2026 + * \author (original) Nico Ramirez + * \date (original) 2-Feb-2026 + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" +import "qrc:/pages/treatment/sections" + +ScreenItem { id: _root + readonly property int margin : Variables.defaultMargin * 5 + readonly property color statusColor : Colors.statusActive + + signal sectionPressuresClicked() + + Component.onCompleted: { + _headerBar.hdfStatusColor = _root.statusColor // TODO update later + } + + + Connections { target: vTDOpMode + function onInTreatmentChanged ( vValue ) { if ( vValue ) { _chart.updateXAxis() } } + } + + Column { id: _column + objectName: "column" + + spacing: Variables.defaultMargin + + anchors { + fill : parent + topMargin : 30 + leftMargin : _root.margin + rightMargin : _root.margin + margins: Variables.defaultMargin + } + + readonly property int cellHeight: Variables.treatmentCellHeight + readonly property int cellWidth : width / 2 - ( Variables.defaultMargin / 2 ) + + Row { id: _topRow + objectName: "topRow" + + spacing : Variables.defaultMargin + height : _column.cellHeight + + TreatmentPressures { id: _treatmentPressures + objectName : "_treatmentPressures" + width : _column.cellWidth + height : _column.cellHeight + onEditClicked : sectionPressuresClicked() + + color : Colors.panelBackgroundColor + header.color : Colors.heparinSectionHeader + enableDropShadow: false + } + + BaseChart { id: _chart + width : _column.cellWidth + height : _column.cellHeight + lineSeries1Value : vTreatmentPressureOcclusion.arterialPressure + lineSeries1Color : Colors.pressuresArterialBar + + lineSeries2Value : vTreatmentPressureOcclusion.venousPressure + lineSeries2Color : Colors.pressuresVenousBar + + lineSeries3Value : vTreatmentPressureOcclusion.tmpPressure + lineSeries3Color : Colors.pressuresTmpBar + } + } + + TreatmentHDFComponent { id: _treatmentHdfComponent + objectName : "_treatmentHdfComponent" + width : _column.width + height : _column.cellHeight + statusColor : _root.statusColor + + onSubstitutionFlowClicked: print ("Substitution Flow Clicked") + } + } +} Index: sources/gui/qml/pages/treatment/TreatmentHeparin.qml =================================================================== diff -u -rc369e34e8864b8b7a7bca07b77f5d3a41701ffbf -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/pages/treatment/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision c369e34e8864b8b7a7bca07b77f5d3a41701ffbf) +++ sources/gui/qml/pages/treatment/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -5,7 +5,7 @@ * 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 + * \file TreatmentHeparin.qml * \author (last) Nico Ramirez * \date (last) 2-Dec-2025 * \author (original) Nico Ramirez @@ -39,9 +39,9 @@ readonly property bool isTxRunning : vTDTreatmentStates.txDialysis readonly property color heparinColor : _root.deliveryOff ? Colors.transparent : - isDispensing ? Colors.heparinActive : - isPaused ? Colors.heparinPaused : - isCompleted ? Colors.heparinComplete : Colors.transparent + isDispensing ? Colors.statusActive : + isPaused ? Colors.statusPaused : + isCompleted ? Colors.statusComplete : Colors.transparent readonly property bool deliveryOff : vTreatmentCreate.heparinDispensingRate === 0 readonly property string buttonText : isDispensing ? qsTr("Pause") : isPaused ? qsTr("Resume") : qsTr("Pause") @@ -60,7 +60,7 @@ signal idleTimeout() - onHeparinColorChanged : _headerBar.statusColor = heparinColor + onHeparinColorChanged : _headerBar.heparinStatusColor = heparinColor enum HeparinPrescription{ HeparinType, @@ -246,7 +246,7 @@ left : parent.left } text : _root.deliveryOff ? ("%1 : %2").arg(Variables.emptyEntry).arg(Variables.emptyEntry) : _root.timeRemaining - color : _root.deliveryOff ? Colors.white : _root.isPaused ? Colors.heparinPaused : Colors.white + color : _root.deliveryOff ? Colors.white : _root.isPaused ? Colors.statusPaused : Colors.white font.pixelSize : _root.deliveryOff ? Fonts.fontPixelHeparin : Fonts.fontPixelHeparinTime font.weight : Font.DemiBold } @@ -295,7 +295,7 @@ maximum : _root.deliveryOff ? 0 : _root.target value : _root.deliveryOff ? 0 : _root.cumulative unitText : Variables.unitTextFluid - color : _root.isPaused ? Colors.heparinPaused : Colors.progressBarUltrafiltration + color : _root.isPaused ? Colors.statusPaused : Colors.progressBarUltrafiltration radius : height showMarker : false progress.opacity: _root.isPaused ? 0.5 : 1 @@ -320,7 +320,7 @@ } text : ("%1 %2").arg(_root.deliveryOff ? Variables.emptyEntry : _root.cumulative.toFixed(Variables.heparinDeliveryPrecision)).arg(qsTr(Variables.unitTextFluid)) - color : _root.deliveryOff ? Colors.white : _root.isPaused ? Colors.heparinPaused : Colors.white + color : _root.deliveryOff ? Colors.white : _root.isPaused ? Colors.statusPaused : Colors.white font.pixelSize : Fonts.fontPixelHeparin font.weight : Font.DemiBold } Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -41,8 +41,8 @@ signal sectionTimeClicked() signal sectionUltrafiltrationClicked() - readonly property int cellWidth : (_root.width / 7) - 10 // = screen width / # columns - readonly property int cellHeight: (Variables.screenContentHeight / 2) - Variables.notificationHeight // = screen height / # rows - headerbar + readonly property int cellWidth : Variables.treatmentCellWidth + readonly property int cellHeight: Variables.treatmentCellHeight Column { id: _column objectName: "column" Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r5a505f86c26c8e1fd6d584cd53a3765c25120781 -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 5a505f86c26c8e1fd6d584cd53a3765c25120781) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -122,7 +122,12 @@ } } - ScreenItem { id: _treatmentHDF } // TODO: make me! + TreatmentHDF { id: _treatmentHDF } + Connections { target: _treatmentHDF + function onSectionPressuresClicked ( ) { + _treatmentAdjustmentPressuresLimits.open() + } + } //// Treatment Adjustment Dialogs TreatmentAdjustmentSetPoints { id: _treatmentAdjustmentSetPoints } @@ -215,8 +220,4 @@ function onTxDialysisChanged ( vValue ) { page( _treatmentHome , vValue )} function onTxEndChanged ( vValue ) { if ( vValue ) { _endTreatmentDialog.open() }} } - - Connections { target: _mainHome - function onStartTreatment ( vValue ) { page( _treatmentHome )} - } } Index: sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (revision 0) +++ sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -0,0 +1,285 @@ +/*! + * + * Copyright (c) 2025-2026 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 TreatmentHDFComponent.qml + * \author (last) Nico Ramirez + * \date (last) 2-Feb-2026 + * \author (original) Nico Ramirez + * \date (original) 2-Feb-2026 + * + */ + +import QtQuick 2.15 + +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" +import "qrc:/pages/treatment" + +TreatmentSection { id: _root + color : Colors.panelBackgroundColor + header.color : Colors.heparinSectionHeader + enableDropShadow: false + header { + showEdit : false + titleLeftMargin : Variables.defaultMargin * 3 + title : qsTr("Hemodiafiltration") + " (" + qsTr("HDF") + ")" + + } + contentArea.anchors { + topMargin : Variables.defaultMargin + leftMargin : Variables.defaultMargin * 2 + rightMargin : Variables.defaultMargin + bottomMargin: Variables.defaultMargin + } + border { + width: 1 + color: Colors.heparinPanelBorderColor + } + header.border { + width: 1 + color: Colors.heparinPanelBorderColor + } + + readonly property int topTextFontSize : 25 + readonly property int bottomTextFontSize : 60 + readonly property real estimatedSubstitutionVal : 23.0 // TODO update later + readonly property int substitutionRate : 125 // TODO update later + + readonly property real minimum : vTreatmentRanges.substitutionVolumeMin + readonly property real maximum : vTreatmentRanges.substitutionVolumeMax + readonly property real resolution : vTreatmentRanges.substitutionVolumeRes + + readonly property real substitutionValue: 10.0 // TODO update later + + readonly property string statusText : qsTr("Active") + /*isDispensing ? qsTr("Active") : + isPaused ? qsTr("Pause") : + isCompleted ? qsTr("Complete") : qsTr("Active")*/ + + readonly property string buttonText : qsTr("Pause Substitution Flow") + property color statusColor : Colors.transparent + + + readonly property int cellHeight: contentItem.height + readonly property int cellWidth : contentItem.width / 2 - _row.spacing + + signal substitutionFlowClicked() + + contentItem: Row { id: _row + spacing: Variables.defaultMargin * 2 + + Item { id: _leftColumnContent + width : _root.cellWidth + height : _root.cellHeight + + LabelValue { id: _estimatedSubstitutionVol + anchors { + top : parent.top + left : parent.left + } + height : parent.height / 3 + width : parent.width * 0.2 + topText : qsTr("Estimated Final Substitution Volume") + topTextFont.pixelSize : topTextFontSize + topTextFont.weight : Font.Medium + bottomText : (_root.estimatedSubstitutionVal).toFixed(Variables.substitutionPrecision) //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision) + bottomTextFont.pixelSize: bottomTextFontSize + bottomTextFont.weight : Font.Normal + leftAlign : true + unitText : Variables.unitVolume + } + + LabelValue { id: _substitutionRate + anchors { + top : _estimatedSubstitutionVol.bottom + topMargin : Variables.defaultMargin + left : parent.left + } + height : parent.height / 3 + width : parent.width * 0.2 + topText : qsTr("Substitution Rate") + topTextFont.pixelSize : topTextFontSize + topTextFont.weight : Font.Medium + bottomText : _root.substitutionRate //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision) + bottomTextFont.pixelSize: bottomTextFontSize + bottomTextFont.weight : Font.Normal + leftAlign : true + unitText : Variables.unitTextFlowRate + } + + ProgressBar { id: _progressbar + anchors { + verticalCenter : parent.verticalCenter + right : parent.right + } + width : parent.width * 0.6 + height : 20 + decimal : Variables.substitutionPrecision + minimum : _root.minimum + maximum : _root.maximum + value : _root.substitutionValue + unitText : Variables.unitVolume + color : Colors.progressBarUltrafiltration + bgColor : Colors.heparinSectionHeader + radius : height + showMarker : false + minText.color: "#818181" + minText.font { + pixelSize : 18 + weight : Font.Normal + } + + maxText.color: "#818181" + maxText.font { + pixelSize : 18 + weight : Font.Normal + } + + Text { id: _valueText + anchors { + bottom : parent.top + bottomMargin : Variables.defaultMargin + right : parent.right + } + text : _root.substitutionValue.toFixed(Variables.substitutionPrecision) + " " + Variables.unitVolume + color : Colors.white + font.pixelSize : 40 + font.weight : Font.DemiBold + } + + Text { id: _substituionVolume + anchors { + top : parent.bottom + topMargin : Variables.defaultMargin * 2.5 + right : parent.right + } + text : qsTr("Substitution Volume") + color : Colors.textTextRectLabel + font.pixelSize : 20 + font.weight : Font.Medium + } + } + + Rectangle { id: _status + anchors { + top : parent.top + right : parent.right + } + width : 100 + height : 30 + radius : height + color : _root.statusColor + Text { id: _statusText + anchors.centerIn: parent + text : _root.statusText + color : Colors.white + font.pixelSize : Fonts.fontPixelContainerUnitSmall + font.weight : Font.DemiBold + } + } + + TouchRect { id : _substitutionFlowButton + width : text.implicitWidth + Variables.defaultMargin * 2 + height : 60 + text { + text : _root.buttonText + font.pixelSize : Fonts.fontPixelConfirm + font.weight : Font.Medium + } + + isDefault: true + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + } + + onClicked: substitutionFlowClicked() + } + } + + Column { id: _rightColumn + leftPadding : Variables.defaultMargin + width : _root.cellWidth + height : _root.cellHeight + spacing : Variables.defaultMargin + + Item { id: _autoSub + width : _rightColumn.width + height : _rightColumn.height / 4 + + Text { id: _autoSubText + anchors { + verticalCenter : _autoSub.verticalCenter + right : _autoSub.right + } + text : qsTr("Auto Sub") + color : Colors.offWhite + height : Variables.contentHeight + width : implicitWidth + verticalAlignment : Text.AlignVCenter + + font { + pixelSize : 22 + family : Fonts.fontFamilyFixed + weight : Font.Medium + } + } + + BaseSwitch { id: _autoSubSwitch + anchors { + verticalCenter : _autoSubText.verticalCenter + right : _autoSubText.left + rightMargin : Variables.defaultMargin + } + checked : true // TODO + height : Variables.contentHeight + + onClicked: { + print (("Auto Sub Switch set to %1").arg(_autoSubSwitch.checked ? "On" : "Off")) + } + } + } + + LabelUnitContainer { id: _treatmentMode + objectName : "_treatmentMode" + text : qsTr("Treatment Mode") + width : _rightColumn.width + height : Variables.adjustmentLabelUnitContainerHeight + showEdit : true + onEditClicked : print ("Treatment Mode Edit Clicked") + + contentItem : ValueAdjusterCustom { id: _bpMeasurementIntervalControl + value : vTreatmentCreate.hdfTreatmentMode + model : vTreatmentRanges.hdfTreatmentModeOptions + onDidChange : function(vValue) { + vTreatmentCreate.hdfTreatmentMode = vValue + } + } + } + + LabelUnitValueAdjuster { id: _prescribedFluidVolume + objectName : "_prescribedFluidVolume" + text : qsTr("Prescribed Sub. Fluid Volume") + unitText : Variables.unitVolume + decimal : Variables.substitutionPrecision + isActive : true + minimum : _root.minimum + maximum : _root.maximum + step : _root.resolution + width : _rightColumn.width + value : 24.0 + defaultValue : 24.0 + + onDidChange : function(vValue) { + value = vValue + } + } + } + } +} Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -rb1462640e36df3f567c42aa8c8cbd6dafe865625 -rd7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8 --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision b1462640e36df3f567c42aa8c8cbd6dafe865625) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision d7cdeb52d868ce60c0fb5b6ac0e279c440ba99a8) @@ -98,6 +98,7 @@ VALUESET(float , dialysateTemp , 0) VALUESET(float , heparinDispensingRate , 0) VALUESET(float , heparinBolusVolume , 0) + VALUESET(quint32 , hdfTreatmentMode , 0) VALUESET(QString , patientID ,"") VALUESET(bool , parametersValidated , 0)