Index: leahi.qrc =================================================================== diff -u -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a -r04fd28f30e37a09450ff5877ae2f805a92898b44 --- leahi.qrc (.../leahi.qrc) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) +++ leahi.qrc (.../leahi.qrc) (revision 04fd28f30e37a09450ff5877ae2f805a92898b44) @@ -240,7 +240,6 @@ sources/gui/qml/pages/pretreatment/PreTreatmentWaterSampleStack.qml sources/gui/qml/pages/pretreatment/PreTreatmentConsumablesStack.qml sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml - sources/gui/qml/pages/pretreatment/PreTreatmentInstallation.qml sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml Index: sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml =================================================================== diff -u -r41ba9331e6a540df0c8eced0c4d3b8684afa9afa -r04fd28f30e37a09450ff5877ae2f805a92898b44 --- sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 41ba9331e6a540df0c8eced0c4d3b8684afa9afa) +++ sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 04fd28f30e37a09450ff5877ae2f805a92898b44) @@ -27,22 +27,16 @@ */ TreatmentFlowBase { id: _root objectName: "_PostTreatmentBase" - header.stepNames: [ - qsTr("Disconnection"), - qsTr("Review" ), - qsTr("Disinfection" ), - ] + header.visible : false - header.stepLineLength : 100 - onVisibleChanged: { if (visible) { _root.updateModel(stackStepIndex) } } function updateModel (index) { - let group = _root.header.stepNames[index] + let group = stepNames[index] if ( group === undefined ) group = "" let instructionsGroup = vSettings.instructions[group] Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r04fd28f30e37a09450ff5877ae2f805a92898b44 --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 04fd28f30e37a09450ff5877ae2f805a92898b44) @@ -34,22 +34,6 @@ readonly property alias itemsValue: _parametersGrid.itemsValue readonly property alias itemsUnit : _parametersGrid.itemsUnit - header.confirmText.text: qsTr("NEXT") - - ExportButton { id: _exportButton - isSmall : true - anchors.top : parent.top - anchors.left : parent.left - enabled : vPostTreatmentAdjustmentTreatmentLog.isIdle && _GuiView.usbIsReady && !_GuiView.exportRunning - onClicked : vPostTreatmentAdjustmentTreatmentLog.doExport() - } - USBButton { id: _usbButton - anchors.top : _exportButton.top - anchors.left : _exportButton.right - anchors.leftMargin: Variables.minVGap - enabled : _GuiView.usbIsReady && !_GuiView.exportRunning - } - ScrollBar { anchors.fill: _flickable flickable : _flickable Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -rf2e4eba6e85c5d36537be782926f23cc9dc01037 -r04fd28f30e37a09450ff5877ae2f805a92898b44 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision f2e4eba6e85c5d36537be782926f23cc9dc01037) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 04fd28f30e37a09450ff5877ae2f805a92898b44) @@ -30,6 +30,21 @@ stackView.initialItem : null + enum StackStep { + Disconnection , + Review , + Disinfection + } + + property var stepNames: [ + qsTr("Disconnection"), + qsTr("Review" ), + qsTr("Disinfection" ), + ] + + property int stepLineLength : 100 + property int stackStepIndex : 0 + signal patientDisconnectionConfirm () signal treatmentReviewConfirm () signal disposablesRemovalConfirm () @@ -44,51 +59,117 @@ onVisibleChanged: { if (visible) { _mainMenu.hidden = true + _headerBar.titleText = qsTr("Post Treatment") } else { stackView.initialItem = null + _headerBar.titleText = "" } } + function confirmClicked() { + switch ( _root.stackStepIndex ) { + case PostTreatmentStack.Disconnection: + _root.patientDisconnectionConfirm() + break + case PostTreatmentStack.Review: + _root.treatmentReviewConfirm() + break + case PostTreatmentStack.Disinfection: + _root.disposablesRemovalConfirm() + break + default: + break + } + } + + function backClicked() { + switch ( _root.stackStepIndex ) { + case PostTreatmentStack.Disconnection: + break + case PostTreatmentStack.Review: + break + case PostTreatmentStack.Disinfection: + _root.disposablesRemovalBack () + break + default: + break + } + } + + function confirmButtonText() { + switch ( _root.stackStepIndex ) { + case PostTreatmentStack.Disconnection: + return qsTr("Auto-Eject") + case PostTreatmentStack.Review: + return qsTr("NEXT") + case PostTreatmentStack.Disinfection: + default: + return qsTr("CONFIRM") + } + } + + StepNavigationTitleBar { id: _titleBar + stepIndex : _root.stackStepIndex + anchors { + top : _root.top + left : parent.left + right : parent.right + leftMargin : Variables.defaultMargin * 2 + rightMargin : anchors.leftMargin + } + confirmText.text: confirmButtonText() + confirmVisible : true + backVisible : stackStepIndex === PostTreatmentStack.Disinfection + width : _root.width + stepNames : _root.stepNames + onBackClicked : _root.backClicked() + onConfirmClicked: _root.confirmClicked() + } + + ExportButton { id: _exportButton + isSmall : true + anchors.top : parent.top + anchors.left : parent.left + visible : stackStepIndex === PostTreatmentStack.Review + enabled : vPostTreatmentAdjustmentTreatmentLog.isIdle && _GuiView.usbIsReady && !_GuiView.exportRunning + onClicked : vPostTreatmentAdjustmentTreatmentLog.doExport() + } + + USBButton { id: _usbButton + anchors.top : _exportButton.top + anchors.left : _exportButton.right + anchors.leftMargin: Variables.minVGap + enabled : _GuiView.usbIsReady && !_GuiView.exportRunning + visible : stackStepIndex === PostTreatmentStack.Review + } + PostTreatmentBase { id: _patientDisconnectionConfirm - objectName :"_patientDisconnectionConfirm" - property int stackStepIndex : 0 - header.confirmVisible : true - title.text : qsTr("Patient Disconnection") - instructionBased : true - onConfirmClicked : _root.patientDisconnectionConfirm() + objectName :"_patientDisconnectionConfirm" + instructionBased : true + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disconnection } } PostTreatmentReview { id: _treatmentReviewConfirm objectName :"_treatmentReviewConfirm" - property int stackStepIndex : 1 - header.confirmVisible : true - title.text : qsTr("Treatment Review") - instructionBased : false - onConfirmClicked : _root.treatmentReviewConfirm() - onItemClicked : { + instructionBased : false + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Review } + + onItemClicked : { _detailTest.title.text = itemsText[vIndex] push(_detailTest) } } PostTreatmentBase { id: _detailTest - objectName :"_detailTest" - property int stackStepIndex : 1 - onBackClicked : pop() - header.backVisible : true - header.confirmVisible : false + objectName :"_detailTest" + onBackClicked : pop() } PostTreatmentBase { id: _disposablesRemovalConfirm - objectName :"_disposablesRemovalConfirm" - property int stackStepIndex : 2 - header. backVisible : true - header.confirmVisible : true - title.text : qsTr("Disposables Removal") - instructionBased : true - onConfirmClicked : _root.disposablesRemovalConfirm() - onBackClicked : _root.disposablesRemovalBack () + objectName :"_disposablesRemovalConfirm" + instructionBased : true + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disinfection } } // connections Fisheye: Tag 04fd28f30e37a09450ff5877ae2f805a92898b44 refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/PreTreatmentInstallation.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml =================================================================== diff -u -r41ba9331e6a540df0c8eced0c4d3b8684afa9afa -r04fd28f30e37a09450ff5877ae2f805a92898b44 --- sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 41ba9331e6a540df0c8eced0c4d3b8684afa9afa) +++ sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 04fd28f30e37a09450ff5877ae2f805a92898b44) @@ -148,9 +148,13 @@ // PreTreatmentConsumablesStack{ id: _preTreatmentConsumablesStack ;objectName: "_preTreatmentConsumablesStack" } // PreTreatmentPrimeStack { id: _pretreatmentPrimeStack ;objectName: "_pretreatmentPrimeStack" } // PreTreatmentConnectionStack { id: _pretreatmentConnectionStack ;objectName: "_pretreatmentConnectionStack " } - PreTreatmentInstallation { id: _pretreatmentInstallation } - PreTreatmentCreate { id: _pretreatmentCreate } + PreTreatmentBase { id: _pretreatmentInstallation + instructionBased : true + onVisibleChanged : if (visible) { stackStepIndex = PreTreatmentStack.Installation } + } + PreTreatmentCreate { id: _pretreatmentCreate } + Connections { target: vPreTreatmentAdjustmentDisposablesConfirm function onAdjustmentTriggered ( vValue ) { if ( vPreTreatmentAdjustmentDisposablesConfirm.adjustment_Accepted ) {