Index: leahi.qrc =================================================================== diff -u -r0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199 -r9c0335bc7f5a2b591a9c6241b00ebb9510ea611a --- leahi.qrc (.../leahi.qrc) (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) +++ leahi.qrc (.../leahi.qrc) (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -46,6 +46,7 @@ sources/gui/qml/dialogs/PatientIdEntry.qml sources/gui/qml/dialogs/DryDemoDialog.qml sources/gui/qml/dialogs/ConfirmPasswordDialog.qml + sources/gui/qml/dialogs/DryBicartDisconnectDialog.qml sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml @@ -235,6 +236,7 @@ sources/gui/qml/compounds/InteractiveImage.qml sources/gui/qml/compounds/ProcessStatusView.qml sources/gui/qml/compounds/ExportLogsHeaderData.qml + sources/gui/qml/compounds/DryBicartDisconnect.qml qtquickcontrols2.conf Index: sources/gui/qml/compounds/DryBicartDisconnect.qml =================================================================== diff -u --- sources/gui/qml/compounds/DryBicartDisconnect.qml (revision 0) +++ sources/gui/qml/compounds/DryBicartDisconnect.qml (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -0,0 +1,33 @@ +// Qt +import QtQuick 2.15 + +// Project +// Qml imports +import "qrc:/globals" + +ProcessStatusView { id: _root + property bool isDialog: false + + title : _root.isDialog ? qsTr("Disconnect Dry Bicarb Cartridge") : qsTr("Bicarb Cartridge Options") + leftButtonText : vTreatmentDryBicartDisconnect.drainInProgress ? qsTr("Cancel") : qsTr("Drain") + centerButtonText : qsTr("Depressurize") + rightButtonText : isDialog ? qsTr("Done") : "" + leftButtonEnabled : ! vTreatmentDryBicartDisconnect.depressurizeInProgress + centerButtonEnabled : ! vTreatmentDryBicartDisconnect.drainInProgress + rightButtonEnabled : ! vTreatmentDryBicartDisconnect.depressurizeInProgress && ! vTreatmentDryBicartDisconnect.drainInProgress + + progressText : vTreatmentDryBicartDisconnect.drainInProgress ? qsTr("Draining Bicart...") : + vTreatmentDryBicartDisconnect.depressurizeInProgress ? qsTr("Depressurizing...") : + vTreatmentDryBicartDisconnect.progress >= vTreatmentDryBicartDisconnect.total && + vTreatmentDryBicartDisconnect.total > 0 ? qsTr("Complete") : "" + + + minimum : 0 + maximum : vTreatmentDryBicartDisconnect.total + value : vTreatmentDryBicartDisconnect.progress + + onLeftPressed : vTreatmentDryBicartDisconnect.drainInProgress ? vTreatmentAdjustmentDryBicartDisconnect.doCancel() : + vTreatmentAdjustmentDryBicartDisconnect.doDrain() + onCenterPressed : vTreatmentAdjustmentDryBicartDisconnect.doDepressurize() + onRightPressed : vTreatmentAdjustmentDryBicartDisconnect.doDone() +} Index: sources/gui/qml/compounds/ProcessStatusView.qml =================================================================== diff -u -r627062628b60e4d512ee8830c2dbc23eef02fe28 -r9c0335bc7f5a2b591a9c6241b00ebb9510ea611a --- sources/gui/qml/compounds/ProcessStatusView.qml (.../ProcessStatusView.qml) (revision 627062628b60e4d512ee8830c2dbc23eef02fe28) +++ sources/gui/qml/compounds/ProcessStatusView.qml (.../ProcessStatusView.qml) (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -14,10 +14,18 @@ property alias maximum : _progressCircle.maximum property int value : 0 - property string leftButtonText : "" - property string rightButtonText : "" + property string leftButtonText : "" + property string centerButtonText : "" + property string rightButtonText : "" + property bool leftButtonEnabled : true + property bool centerButtonEnabled : true + property bool rightButtonEnabled : true + signal leftPressed () + signal centerPressed () + signal rightPressed () + Text { id: _title anchors { top : _root.top @@ -75,9 +83,28 @@ font.weight : Font.Medium } visible : _root.leftButtonText + enabled : _root.leftButtonEnabled isDefault : true + + onClicked : _root.leftPressed() } + TouchRect { id : _centerButton + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + text { + text : _root.centerButtonText + font.pixelSize : Fonts.fontPixelConfirm + font.weight : Font.Medium + } + visible : _root.centerButtonText + enabled : _root.centerButtonEnabled + isDefault : true + + onClicked : _root.centerPressed() + + } + TouchRect { id : _rightButton width : Variables.defaultButtonWidth height : Variables.defaultButtonHeight @@ -87,7 +114,11 @@ font.weight : Font.Medium } visible : _root.rightButtonText + enabled : _root.rightButtonEnabled isDefault : true + + onClicked : _root.rightPressed() + } } } Index: sources/gui/qml/dialogs/DryBicartDisconnectDialog.qml =================================================================== diff -u --- sources/gui/qml/dialogs/DryBicartDisconnectDialog.qml (revision 0) +++ sources/gui/qml/dialogs/DryBicartDisconnectDialog.qml (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -0,0 +1,40 @@ +// Qt +import QtQuick 2.15 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" + +ModalDialog { id: _root + width : Variables.adjustmentDialogWidth + height : Variables.adjustmentDialogHeight + clip : true + + readonly property bool show: vTreatmentDryBicartDisconnect.showDialog + + onShowChanged: _root.show ? _root.open() : _root.close() + + DryBicartDisconnect { id: _drainBicarbCartridge + anchors.fill : parent + isDialog : true + } + + CloseButton { id : _closeButton + onClicked : { + _root.close() + } + } + + // Drain consumabnles + Connections { target: vTreatmentAdjustmentDryBicartDisconnect + function onAdjustmentTriggered ( vValue ) { + if ( vTreatmentAdjustmentDryBicartDisconnect.adjustment_Accepted ) { + _root.notificationText = "" + } else { + _root.notificationText = vTreatmentAdjustmentDryBicartDisconnect.text() + } + } + } + +} Index: sources/gui/qml/dialogs/DryBicartDisconnectDialog.qml.autosave =================================================================== diff -u --- sources/gui/qml/dialogs/DryBicartDisconnectDialog.qml.autosave (revision 0) +++ sources/gui/qml/dialogs/DryBicartDisconnectDialog.qml.autosave (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -0,0 +1,38 @@ +// Qt +import QtQuick 2.15 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" + +ModalDialog { id: _root + width : Variables.adjustmentDialogWidth + height : Variables.adjustmentDialogHeight + clip : true + + readonly property bool show: vTreatmentDryBicartDisconnect.showDialog + + onShowChanged: _root.show ? _root.open() : _root.close() + + DryBicartDisconnect { id: _drainBicarbCartridge + anchors.fill : parent + isDialog : true + } + + CloseButton { id : _closeButton + onClicked : { + _root.close() + } + } + + Connections { target: vTreatmentAdjustmentDryBicartDisconnect + function onAdjustmentTriggered ( vValue ) { + if ( vTreatmentAdjustmentDryBicartDisconnect.adjustment_Accepted ) { + _root.notificationText = "" + } else { + _root.notificationText = vTreatmentAdjustmentDryBicartDisconnect.text() + } + } + } +} Index: sources/gui/qml/main.qml =================================================================== diff -u -r9eb583ef8480f80fe55be7b88b3ed1a27109492a -r9c0335bc7f5a2b591a9c6241b00ebb9510ea611a --- sources/gui/qml/main.qml (.../main.qml) (revision 9eb583ef8480f80fe55be7b88b3ed1a27109492a) +++ sources/gui/qml/main.qml (.../main.qml) (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -333,7 +333,7 @@ VTreatmentAdjustmentRinseback { id: vTreatmentAdjustmentRinseback } VTreatmentAdjustmentRecirculate { id: vTreatmentAdjustmentRecirculate } VTreatmentAdjustmentEnd { id: vTreatmentAdjustmentEnd } - VTreatmentAdjustmentDryBicartDisconnect { id: vTreatmentAdjustmenDryBicartDisconnect } + VTreatmentAdjustmentDryBicartDisconnect { id: vTreatmentAdjustmentDryBicartDisconnect } // --- Post Treatment VPostTreatmentAdjustmentPatientDisconnectionConfirm { id: vPostTreatmentAdjustmentPatientDisconnectionConfirm } @@ -432,6 +432,7 @@ HeaderbarSettings { id: _headerbarSettings } HeaderbarInformation { id: _headerbarInformation } WaterSampleDialog { id: _headerbarWaterSampleDialysate } + DryBicartDisconnectDialog { id: _dryBicartDisconnectDialog } TreatmentAdjustmentVitals { id: _treatmentAdjustmentVitals } EndTreatmentDialog { id: _endTreatmentDialog } RinsebackCompleteDialog { id: _rinsebackCompleteDialog } Index: sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml =================================================================== diff -u -r70d6ebddd11a5df068f059fd563a0c1d0b50a2a3 -r9c0335bc7f5a2b591a9c6241b00ebb9510ea611a --- sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision 70d6ebddd11a5df068f059fd563a0c1d0b50a2a3) +++ sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -77,6 +77,17 @@ } } + // Drain dry bicart + Connections { target: vTreatmentAdjustmentDryBicartDisconnect + function onAdjustmentTriggered ( vValue ) { + if ( vTreatmentAdjustmentDryBicartDisconnect.adjustment_Accepted ) { + _postTreatmentDrainConsumables.reasonText = "" + } else { + _postTreatmentDrainConsumables.reasonText = vTreatmentAdjustmentDryBicartDisconnect.text() + } + } + } + onVisibleChanged: { if (visible) { _headerBar.activeStack = stackView Index: sources/gui/qml/pages/posttreatment/PostTreatmentDrainConsumables.qml =================================================================== diff -u -r627062628b60e4d512ee8830c2dbc23eef02fe28 -r9c0335bc7f5a2b591a9c6241b00ebb9510ea611a --- sources/gui/qml/pages/posttreatment/PostTreatmentDrainConsumables.qml (.../PostTreatmentDrainConsumables.qml) (revision 627062628b60e4d512ee8830c2dbc23eef02fe28) +++ sources/gui/qml/pages/posttreatment/PostTreatmentDrainConsumables.qml (.../PostTreatmentDrainConsumables.qml) (revision 9c0335bc7f5a2b591a9c6241b00ebb9510ea611a) @@ -59,19 +59,10 @@ anchors.horizontalCenter: parent.horizontalCenter } - ProcessStatusView { id: _drainBicarbCartridge + DryBicartDisconnect { id: _drainBicarbCartridge anchors.left : _line.right width : parent.width / 3 height : parent.height - title : qsTr("Bicarb Cartridge Options") - leftButtonText : qsTr("Cancel Drain") - rightButtonText : qsTr("Depressurize") - progressText : qsTr("Draining Bicart...") - - // TODO update with messaging - minimum : 0 - maximum : 100 - value : 25 } } }