Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -r1286d74bd015276aab604808be2766136091c125 -r14d7345260cdc47d8308da4fff127fbd97837fe4 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 1286d74bd015276aab604808be2766136091c125) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 14d7345260cdc47d8308da4fff127fbd97837fe4) @@ -31,18 +31,22 @@ stackView.initialItem : null enum StackStep { - Disconnection , + Disconnect , + Remove , Review , Disinfection } property var stepNames: [ - qsTr("Disconnection"), + qsTr("Disconnect" ), + qsTr("Remove" ), qsTr("Review" ), qsTr("Disinfection" ), ] property int stackStepIndex : 0 + readonly property bool isDisconnect : _root.stackStepIndex === PostTreatmentStack.StackStep.Disconnect + readonly property bool isReview : _root.stackStepIndex === PostTreatmentStack.StackStep.Review signal patientDisconnectionConfirm () signal treatmentReviewConfirm () @@ -68,14 +72,18 @@ function confirmClicked() { switch ( _root.stackStepIndex ) { - case PostTreatmentStack.Disconnection: - _root.patientDisconnectionConfirm() + case PostTreatmentStack.Disconnect: +// _postTreatmentDisconnectStack.continueClicked() + page( _postTreatmentRemove) // TODO REMOVE break + case PostTreatmentStack.Remove: + vPostTreatmentAdjustmentDisposablesRemovalConfirm.doConfirm() + break case PostTreatmentStack.Review: - _root.treatmentReviewConfirm() + page( _postTreatmentDisinfection ) break case PostTreatmentStack.Disinfection: - _root.disposablesRemovalConfirm() + // Skip button - go back to standby -- Finish Treatment break default: break @@ -84,27 +92,30 @@ function backClicked() { switch ( _root.stackStepIndex ) { - case PostTreatmentStack.Disconnection: + case PostTreatmentStack.Disconnect: +// _postTreatmentDisconnectStack.backClicked() break - case PostTreatmentStack.Review: - break case PostTreatmentStack.Disinfection: - _root.disposablesRemovalBack () + page( _postTreatmentReview) break + case PostTreatmentStack.Remove: + case PostTreatmentStack.Review: default: break } } function confirmButtonText() { switch ( _root.stackStepIndex ) { - case PostTreatmentStack.Disconnection: - return qsTr("Auto Eject") + case PostTreatmentStack.Disconnect: case PostTreatmentStack.Review: - return qsTr("NEXT") + return qsTr("Continue") + case PostTreatmentStack.Remove: + return qsTr("Auto Eject") case PostTreatmentStack.Disinfection: + return qsTr("Skip") default: - return qsTr("CONFIRM") + return qsTr("Next") } } @@ -124,51 +135,55 @@ 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() - } + Row { id: _qrRow + spacing : Variables.defaultMargin + visible : _root.isReview - USBButton { id: _usbButton - anchors.top : _exportButton.top - anchors.left : _exportButton.right - anchors.leftMargin: Variables.minVGap - enabled : _GuiView.usbIsReady && !_GuiView.exportRunning - visible : stackStepIndex === PostTreatmentStack.Review + anchors { + left : _titleBar.left + leftMargin : Variables.defaultMargin * 2 + top : _titleBar.top + topMargin : Variables.defaultMargin * 2 + } + + QRCode { id: _qrCode + anchors.verticalCenter : parent.verticalCenter + anchors.verticalCenterOffset: -5 + qrcode : vPostTreatmentAdjustmentTreatmentLog.txCode + clear : ! _root.visible + } + + Text { id: _txCodeText + anchors.bottom : _qrCode.bottom + text : vPostTreatmentAdjustmentTreatmentLog.txCode ? qsTr("Tx Code: ") + vPostTreatmentAdjustmentTreatmentLog.txCode : " " + color : "#DBE9FA" + font.pixelSize : Fonts.fontPixelButton + } + } } PostTreatmentBase { id: _patientDisconnectionConfirm objectName :"_patientDisconnectionConfirm" instructionBased : true - onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disconnection } + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disconnect } } - PostTreatmentReview { id: _treatmentReviewConfirm - objectName :"_treatmentReviewConfirm" - instructionBased : false - onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Review } - - onItemClicked : { - _detailTest.title.text = itemsText[vIndex] - push(_detailTest) - } + PostTreatmentBase { id: _postTreatmentRemove + objectName : "_postTreatmentRemove" + instructionBased : true + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Remove; updateModel() } } - PostTreatmentBase { id: _detailTest - objectName :"_detailTest" - onBackClicked : pop() + PostTreatmentReview { id: _postTreatmentReview + objectName :"_postTreatmentReview" + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Review; + vPostTreatmentAdjustmentTreatmentLog.doRequest() } } - PostTreatmentBase { id: _disposablesRemovalConfirm - objectName :"_disposablesRemovalConfirm" - instructionBased : true - onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disinfection } + PostTreatmentBase { id: _postTreatmentDisinfection + objectName :"_postTreatmentDisinfection" + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disinfection } } // connections @@ -183,35 +198,38 @@ function onPostTreatmentChanged ( vValue ) { page( _patientDisconnectionConfirm , vValue )} } + // Confirm Patient Disconnection Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { - _treatmentReviewConfirm.reasonText = "" - page( _disposablesRemovalConfirm ) + _postTreatmentReview.reasonText = "" + page( _postTreatmentDisinfection ) } else { - _treatmentReviewConfirm.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() + _postTreatmentReview.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() } } } + // Auto - Eject Connections { target: vPostTreatmentAdjustmentDisposablesRemovalConfirm function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentDisposablesRemovalConfirm.adjustment_Accepted ) { - _patientDisconnectionConfirm.reasonText = "" - page( _treatmentReviewConfirm ) + _postTreatmentRemove.reasonText = "" + page( _postTreatmentReview ) } else { - _patientDisconnectionConfirm.reasonText = vPostTreatmentAdjustmentDisposablesRemovalConfirm.text() + _postTreatmentRemove.reasonText = vPostTreatmentAdjustmentDisposablesRemovalConfirm.text() } } } + // Treatment Review Connections { target: vPostTreatmentAdjustmentTreatmentLog function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentTreatmentLog.adjustment_Accepted ) { - _treatmentReviewConfirm.reasonText = "" + _postTreatmentReview.reasonText = "" } else { - _treatmentReviewConfirm.reasonText = vPostTreatmentAdjustmentTreatmentLog.text() + _postTreatmentReview.reasonText = vPostTreatmentAdjustmentTreatmentLog.text() } } }