Index: leahi.qrc =================================================================== diff -u -r0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199 -r00c17b6d803722f8338cc3202257d361bb0ad186 --- leahi.qrc (.../leahi.qrc) (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) +++ leahi.qrc (.../leahi.qrc) (revision 00c17b6d803722f8338cc3202257d361bb0ad186) @@ -340,6 +340,7 @@ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitalsInterval.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentHDF.qml + sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentEndIsolatedUF.qml sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentEndIsolatedUF.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentEndIsolatedUF.qml (revision 0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentEndIsolatedUF.qml (revision 00c17b6d803722f8338cc3202257d361bb0ad186) @@ -0,0 +1,80 @@ +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" + +/*! + * \brief TreatmentAdjustmentEndIsolatedUf.qml is the screen + * To adjust the treatment ultrafiltration + */ +Item { id: _root + + readonly property real volumeGoal : vTreatmentIsolatedUF.setVolume + readonly property real volumeRemoved : vTreatmentIsolatedUF.volumeDelivered + + signal endIsoUfClicked() + + TreatmentAdjustmentUltrafiltrationMetrics { id: _ufMetrics + objectName: "_ufMetrics" + anchors { + top : parent.top + topMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + leftLabel : qsTr("Isolated UF Volume Removed") + leftUnit : Variables.unitVolume + leftValue : _root.volumeRemoved.toFixed(Variables.ultrafiltrationPrecision) + rightLabel : qsTr("Isolated UF Volume Goal") + rightUnit : Variables.unitVolume + rightValue : _root.volumeGoal.toFixed(Variables.ultrafiltrationPrecision) + } + + Item { id: _contentArea + objectName: "_contentArea" + anchors { + top : _ufMetrics.bottom + bottom : _buttonArea.top + left : parent.left + right : parent.right + } + + ProgressBarEx { id: _progressBarEx + objectName : "_progressBarEx" + anchors { + centerIn : parent + } + decimal : Variables.ultrafiltrationPrecision + minimum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min + maximum : _root.volumeGoal + value : _root.volumeRemoved + valueEx : _root.volumeRemoved + } + } + + Row { id: _buttonArea + objectName: "_buttonArea" + anchors { + bottom : parent.bottom + bottomMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + spacing : Variables.defaultMargin + + TouchRect { id: _endIsolatedUfButton + objectName : "_endIsolatedUfButton" + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + text { + text : qsTr("End Isolated UF") + font.weight : Font.Medium + } + isDefault : true + onClicked : _root.endIsoUfClicked() + } + } +} Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStack.qml =================================================================== diff -u -r3bbcc27ab7584e84e87a9d005c14a6e04188d0c0 -r00c17b6d803722f8338cc3202257d361bb0ad186 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStack.qml (.../TreatmentAdjustmentUltrafiltrationStack.qml) (revision 3bbcc27ab7584e84e87a9d005c14a6e04188d0c0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStack.qml (.../TreatmentAdjustmentUltrafiltrationStack.qml) (revision 00c17b6d803722f8338cc3202257d361bb0ad186) @@ -72,7 +72,9 @@ visible : false StackView.onActivating : { - _root.titleText = qsTr("Ultrafiltration Volume ") + Variables.unitTextUltrafiltrationVolume + _root.titleText = qsTr("%1 %2 %3") .arg(_root.isIsolatedUf ? qsTr("Isolated") : "") + .arg(qsTr("Ultrafiltration Volume")) + .arg(Variables.unitTextUltrafiltrationVolume) _root.notificationText = "" } onPauseClicked : { @@ -93,8 +95,27 @@ // if accepted button changes, otherwise show error in notification vTreatmentAdjustmentUltrafiltrationState.doResume() } + onPauseIsoUfClicked : { + + } + onEndIsoUfClicked : { + _ufStack.page(_treatmentAdjustmentEndIsolatedUF) + } } + TreatmentAdjustmentEndIsolatedUF { id: _treatmentAdjustmentEndIsolatedUF + objectName : "_treatmentAdjustmentEndIsolatedUF" + visible : false + + StackView.onActivating : { + _root.titleText = qsTr("End Isolated Ultrafiltration Volume?") + _root.notificationText = "" + } + onEndIsoUfClicked : { + + } + } + TreatmentAdjustmentUltrafiltrationEdit { id: _treatmentAdjustmentUltrafiltrationEdit objectName : "_treatmentAdjustmentUltrafiltrationEdit" visible : false Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml =================================================================== diff -u -r7b71ec23c53c04a24e3db8ace0ca4825ec57d721 -r00c17b6d803722f8338cc3202257d361bb0ad186 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision 7b71ec23c53c04a24e3db8ace0ca4825ec57d721) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision 00c17b6d803722f8338cc3202257d361bb0ad186) @@ -30,24 +30,30 @@ Item { id: _root objectName: "_TreatmentAdjustmentUltrafiltrationStart" // SquishQt testability + readonly property real volumeGoal : isIsolatedUf ? vTreatmentIsolatedUF.setVolume : vTreatmentUltrafiltration.setVolume + readonly property real volumeRemoved : isIsolatedUf ? vTreatmentIsolatedUF.volumeDelivered : vTreatmentUltrafiltration.volumeRemoved + signal editClicked() signal isolatedUfClicked() signal pauseClicked() signal resumeClicked() + signal pauseIsoUfClicked() + signal endIsoUfClicked() + TreatmentAdjustmentUltrafiltrationMetrics { id: _ufMetrics objectName: "_ufMetrics" anchors { top : parent.top topMargin : Variables.defaultMargin horizontalCenter: parent.horizontalCenter } - leftLabel : qsTr("UF Volume Removed") + leftLabel : isIsolatedUf ? qsTr("Isolated UF Volume Removed") : qsTr("UF Volume Removed") leftUnit : Variables.unitVolume - leftValue : vTreatmentUltrafiltration.volumeRemoved.toFixed(Variables.ultrafiltrationPrecision) - rightLabel : qsTr("UF Volume Goal") + leftValue : _root.volumeRemoved.toFixed(Variables.ultrafiltrationPrecision) + rightLabel : isIsolatedUf ? qsTr("Isolated UF Volume Goal") : qsTr("UF Volume Goal") rightUnit : Variables.unitVolume - rightValue : vTreatmentUltrafiltration.setVolume.toFixed(Variables.ultrafiltrationPrecision) + rightValue : _root.volumeGoal.toFixed(Variables.ultrafiltrationPrecision) } Item { id: _contentArea @@ -66,9 +72,9 @@ } decimal : Variables.ultrafiltrationPrecision minimum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min - maximum : vTreatmentUltrafiltration.setVolume - value : vTreatmentUltrafiltration.volumeRemoved - valueEx : vTreatmentUltrafiltration.volumeRemoved + maximum : _root.volumeGoal + value : _root.volumeRemoved + valueEx : _root.volumeRemoved } } @@ -86,35 +92,37 @@ width : Variables.defaultButtonWidth height : Variables.defaultButtonHeight text { - text : isUFPaused ? qsTr("Resume UF") : qsTr("Pause UF") + text : isIsolatedUf ? isUFPaused ? qsTr("Resume Isolated UF") : qsTr("Pause Isolated UF"): + isUFPaused ? qsTr("Resume UF") : qsTr("Pause UF") font.weight : Font.Medium } isDefault : true - onClicked : isUFPaused ? _root.resumeClicked() : _root.pauseClicked() + onClicked : isIsolatedUf ? isUFPaused ? _root.resumeClicked() : _root.pauseClicked() : + isUFPaused ? _root.resumeClicked() : _root.pauseClicked() } TouchRect { id: _editButton objectName : "_editButton" width : Variables.defaultButtonWidth height : Variables.defaultButtonHeight text { - text : qsTr("Edit UF") + text : isIsolatedUf ? qsTr("Edit Isolated UF") : qsTr("Edit UF") font.weight : Font.Medium } isDefault : true - onClicked : _root.editClicked() + onClicked : isIsolatedUf ? _root.isolatedUfClicked() : _root.editClicked() } TouchRect { id: _isolatedUfButton objectName : "_isolatedUfButton" width : Variables.defaultButtonWidth height : Variables.defaultButtonHeight text { - text : qsTr("Isolated UF") + text : isIsolatedUf ? qsTr("End Isolated UF") : qsTr("Isolated UF") font.weight : Font.Medium } isDefault : true - onClicked : _root.isolatedUfClicked() + onClicked : isIsolatedUf ? _root.endIsoUfClicked() : _root.isolatedUfClicked() } } }