Index: sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml =================================================================== diff -u -r600b6707b102919d981f3b1d18611834e23eae60 -r04892d957c8f85eba1dc0550c2c9b01eef86efe9 --- sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision 600b6707b102919d981f3b1d18611834e23eae60) +++ sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision 04892d957c8f85eba1dc0550c2c9b01eef86efe9) @@ -24,7 +24,11 @@ color : Colors.panelBackgroundColor header.color : Colors.heparinSectionHeader enableDropShadow: false - header.title : qsTr("Hemodiafiltration") + " (" + qsTr("HDF") + ")" + header { + title : qsTr("Hemodiafiltration") + " (" + qsTr("HDF") + ")" + showPauseResume : true + isPaused : vTreatmentHDF.hdfState === TreatmentHDF.Paused + } contentArea.anchors { topMargin : Variables.defaultMargin @@ -43,28 +47,26 @@ 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 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") + 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 @@ -83,7 +85,7 @@ 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 @@ -102,7 +104,8 @@ 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 @@ -118,11 +121,11 @@ width : parent.width * 0.6 height : 20 decimal : Variables.substitutionPrecision - minimum : _root.minimum - maximum : vTreatmentCreate.substitutionFluidVolume - value : _root.substitutionValue + minimum : 0 + maximum : _root.estimatedSubstitutionVal.toFixed(Variables.substitutionPrecision) + value : _root.substitutionValue.toFixed(Variables.substitutionPrecision) unitText : Variables.unitVolume - color : Colors.progressBarUltrafiltration + color : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? Colors.pauseColor : Colors.progressBarUltrafiltration bgColor : Colors.heparinSectionHeader radius : height showMarker : false @@ -145,7 +148,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 } @@ -180,25 +183,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 - - anchors { - bottom : parent.bottom - horizontalCenter: parent.horizontalCenter - } - - onClicked: substitutionFlowClicked() - } } Column { id: _rightColumn @@ -235,12 +219,10 @@ right : _autoSubText.left rightMargin : Variables.defaultMargin } - checked : true // TODO + checked : vTreatmentHDF.autoSubState height : Variables.contentHeight - onClicked: { - print (("Auto Sub Switch set to %1").arg(_autoSubSwitch.checked ? "On" : "Off")) - } + onClicked: vTreatmentAdjustmentAutoSub.doAdjustment( ! _autoSubSwitch.checked ) } }