Index: sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml =================================================================== diff -u -re7a26aa8823fdabbfb21fe75ea9a581c7d0513b4 -r61a9a75c5b5ed003dc326ec3cc138a8f0e78c1e0 --- sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision e7a26aa8823fdabbfb21fe75ea9a581c7d0513b4) +++ sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision 61a9a75c5b5ed003dc326ec3cc138a8f0e78c1e0) @@ -21,11 +21,15 @@ import "qrc:/pages/treatment" TreatmentSection { id: _root - color : Colors.panelBackgroundColor - header.color : Colors.heparinSectionHeader - enableDropShadow : false - header.title : qsTr("Hemodiafiltration") + " (" + qsTr("HDF") + ")" - header.editEnabled : ! isIsoTreatment // LEAHI-PRS-459 + color : Colors.panelBackgroundColor + header.color : Colors.heparinSectionHeader + enableDropShadow: false + header { + title : qsTr("Hemodiafiltration") + " (" + qsTr("HDF") + ")" + showPauseResume : true + isPaused : vTreatmentHDF.hdfState === TreatmentHDF.Paused + editEnabled : ! isIsoTreatment // LEAHI-PRS-459 + } contentArea.anchors { topMargin : Variables.defaultMargin @@ -44,28 +48,28 @@ 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 estimatedSubstitutionVal : vTreatmentHDF.requestedVolume + readonly property real prescribedSubstitutionVal: vTreatmentCreate.substitutionFluidVolume + readonly property real substitutionRate : vTreatmentHDF.currentRate 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 real substitutionValue: vTreatmentHDF.totalVolume - readonly property string statusText : qsTr("Active") - /*isDispensing ? qsTr("Active") : - isPaused ? qsTr("Pause") : - isCompleted ? qsTr("Complete") : qsTr("Active")*/ + readonly property string statusText : vTreatmentHDF.hdfState === TreatmentHDF.Active ? qsTr("Active") : + vTreatmentHDF.hdfState === TreatmentHDF.Paused ? qsTr("Pause") : + vTreatmentHDF.hdfState === TreatmentHDF.Complete ? qsTr("Complete") : Variables.emptyEntry - readonly property string buttonText : qsTr("Pause Substitution Flow") + readonly property bool volumeDeviation: estimatedSubstitutionVal < prescribedSubstitutionVal // LEAHI-PRS-816 + 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 @@ -84,12 +88,13 @@ topText : qsTr("Estimated Final Substitution Volume") topTextFont.pixelSize : topTextFontSize topTextFont.weight : Font.Medium - bottomText : (_root.estimatedSubstitutionVal).toFixed(Variables.substitutionPrecision) //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision) + bottomText : (_root.estimatedSubstitutionVal).toFixed(Variables.substitutionPrecision) bottomTextFont.pixelSize: bottomTextFontSize bottomTextFont.weight : Font.Normal leftAlign : true unitText : Variables.unitVolume bottomTextTopMargin : Variables.defaultMargin + bottomTextColor : _root.volumeDeviation ? Colors.pauseColor : Colors.textTextRectLabel } LabelValue { id: _substitutionRate @@ -103,27 +108,30 @@ topText : qsTr("Substitution Rate") topTextFont.pixelSize : topTextFontSize topTextFont.weight : Font.Medium - bottomText : _root.substitutionRate //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision) + bottomText : _root.substitutionRate.toFixed(Variables.substitutionPrecision) + bottomTextColor : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? Colors.statusTextPaused : Colors.textTextRectLabel bottomTextFont.pixelSize: bottomTextFontSize bottomTextFont.weight : Font.Normal leftAlign : true unitText : Variables.unitTextFlowRate bottomTextTopMargin : Variables.defaultMargin } - ProgressBar { id: _progressbar + ProgressBarEx { id: _progressbar anchors { verticalCenter : parent.verticalCenter right : parent.right } width : parent.width * 0.6 height : 20 decimal : Variables.substitutionPrecision - minimum : _root.minimum - maximum : vTreatmentCreate.substitutionFluidVolume - value : _root.substitutionValue + minimum : 0 + maximum : _root.prescribedSubstitutionVal.toFixed(Variables.substitutionPrecision) + value : _root.substitutionValue.toFixed(Variables.substitutionPrecision) + valueEx : _root.volumeDeviation ? _root.estimatedSubstitutionVal.toFixed(Variables.substitutionPrecision) : 0 + unitText : Variables.unitVolume - color : Colors.progressBarUltrafiltration + color : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? Colors.pauseColor : Colors.progressBarUltrafiltration bgColor : Colors.heparinSectionHeader radius : height showMarker : false @@ -146,7 +154,7 @@ right : parent.right } text : _root.substitutionValue.toFixed(Variables.substitutionPrecision) + " " + Variables.unitVolume - color : Colors.white + color : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? Colors.statusTextPaused : Colors.offWhite font.pixelSize : 40 font.weight : Font.DemiBold } @@ -181,26 +189,6 @@ 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 - enabled : ! isIsoTreatment // LEAHI-PRS-459 - - anchors { - bottom : parent.bottom - horizontalCenter: parent.horizontalCenter - } - - onClicked: substitutionFlowClicked() - } } Column { id: _rightColumn @@ -237,14 +225,12 @@ right : _autoSubText.left rightMargin : Variables.defaultMargin } - checked : true // TODO + checked : vTreatmentHDF.autoSubState height : Variables.contentHeight active : ! isIsoTreatment // LEAHI-PRS-459 enabled : active - onClicked: { - print (("Auto Sub Switch set to %1").arg(_autoSubSwitch.checked ? "On" : "Off")) - } + onClicked: vTreatmentAdjustmentAutoSub.doAdjustment( ! _autoSubSwitch.checked ) } }