Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r7c12b8ce1964a37e856ebcae205f8b4ed19f3c6a -rab7cddfe742a1c00e265a37effe043f2c3db8bec --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 7c12b8ce1964a37e856ebcae205f8b4ed19f3c6a) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision ab7cddfe742a1c00e265a37effe043f2c3db8bec) @@ -315,8 +315,8 @@ // Post-Treatment // Patient Disconnect ID_AdjustPatientDisconnectNotifyReq = 0x4A00, // 74 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response - ID_AdjustPatientDisconnectConfirmReq = 0x060F, // 060f //// ----- @CRAPIZED - ID_AdjustPatientDisconnectConfirmRsp = 0x7E0F, // 126 //// ----- @CRAPIZED: had to change to avoid duplication + ID_AdjustPatientDisconnectConfirmReq = 0xA800, // 168 + ID_AdjustPatientDisconnectConfirmRsp = 0xA900, // 169 // Disposables Removal ID_AdjustDisposablesRemovalConfirmReq = 0x9400, // 148 Index: sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml =================================================================== diff -u -r7c12b8ce1964a37e856ebcae205f8b4ed19f3c6a -rab7cddfe742a1c00e265a37effe043f2c3db8bec --- sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision 7c12b8ce1964a37e856ebcae205f8b4ed19f3c6a) +++ sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision ab7cddfe742a1c00e265a37effe043f2c3db8bec) @@ -23,14 +23,17 @@ property int subStepIndex: PostTreatmentDisconnectStack.Step.DisconnectPatient signal goToNextStep() - signal goToPreviousStep() function initStack() { page ( _postTreatmentDisconnectPatient ) } + function goToDrain() { + page ( _postTreatmentDrainConsumables ) + } + function continueClicked() { switch ( _root.subStepIndex ) { case PostTreatmentDisconnectStack.Step.DisconnectPatient: - page ( _postTreatmentDrainConsumables ) + vPostTreatmentAdjustmentPatientDisconnectionConfirm.doConfirm() break case PostTreatmentDisconnectStack.Step.DrainConsumable: goToNextStep () @@ -59,11 +62,12 @@ // ----- Screens definitions PostTreatmentBase { id: _postTreatmentDisconnectPatient instructionBased : true - onVisibleChanged : if (visible) { _root.subStepIndex = PostTreatmentDisconnectStack.Step.DisconnectPatient ; updateModel() } subStepName : qsTr("Disconnect Patient BloodLines") + onVisibleChanged : if (visible) { _root.subStepIndex = PostTreatmentDisconnectStack.Step.DisconnectPatient ; updateModel() } } PostTreatmentBase { id: _postTreatmentDrainConsumables + title.text : qsTr("Drain Consumable Options") onVisibleChanged : if (visible) { _root.subStepIndex = PostTreatmentDisconnectStack.Step.DrainConsumable } } } Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -ra26580f1abb9900e91590bf19c78439c24ad6ffc -rab7cddfe742a1c00e265a37effe043f2c3db8bec --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision a26580f1abb9900e91590bf19c78439c24ad6ffc) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision ab7cddfe742a1c00e265a37effe043f2c3db8bec) @@ -16,7 +16,6 @@ // Qt import QtQuick 2.12 - // Project // Qml imports import "qrc:/globals" @@ -28,34 +27,64 @@ * \brief the post treatment Treatment Log review screen */ PostTreatmentBase { id: _root - - Grid { id: _grid - clip: true - + Rectangle { id: _rect anchors { top : header.bottom topMargin : Variables.defaultMargin * 2 bottom : _root.bottom bottomMargin : Variables.notificationHeight + Variables.minVGap - horizontalCenter: parent.horizontalCenter + left : parent.left + leftMargin : Variables.defaultMargin * 4 + right : parent.right + rightMargin : Variables.defaultMargin * 4 + } - flow : Grid.TopToBottom - columns : 3 - rows : _repeater.model.count / columns - rowSpacing : 10 - columnSpacing : Variables.defaultMargin + color : Colors.panelBackgroundColor + radius : 9 - Repeater { id: _repeater - model : vPostTreatmentAdjustmentTreatmentLog.parametersTitle + border { + width : Variables.panelBorderWidth + color : Colors.panelBorderColor + } - LabelUnitText { id: container - height : 67 - width : 575 - label : modelData - unit : vPostTreatmentAdjustmentTreatmentLog.parametersUnit[index] ?? "" - value : vPostTreatmentAdjustmentTreatmentLog.parametersText[index] ?? "" - textAlignment: Text.AlignJustify + Grid { id: _grid + property int cellHeight : parent.height / 10 + property int cellWidth : parent.width / 3 - ( Variables.defaultMargin ) // subtract columnSpacing + + clip: true + anchors.fill: parent + anchors.leftMargin: Variables.defaultMargin + anchors.rightMargin: Variables.defaultMargin + + flow : Grid.TopToBottom + columns : 3 + rows : _repeater.model.count / columns + rowSpacing : 0 + columnSpacing : Variables.defaultMargin + + Repeater { id: _repeater + model : vPostTreatmentAdjustmentTreatmentLog.parametersTitle + + LabelUnitText { id: _container + height : _grid.cellHeight + width : _grid.cellWidth + label : modelData + unit : vPostTreatmentAdjustmentTreatmentLog.parametersUnit[index] ?? "" + value : "123" // vPostTreatmentAdjustmentTreatmentLog.parametersText[index] ?? "" + textAlignment: Text.AlignJustify + radius : 0 + color : Colors.transparent + border.width: 0 + + Line { + anchors.bottom: parent.bottom + anchors.left : parent.left + anchors.right : parent.right + visible: index !== 9 && index !== 19 && index !== 29 + color: Colors.panelBorderColor + } + } } } } Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -ra26580f1abb9900e91590bf19c78439c24ad6ffc -rab7cddfe742a1c00e265a37effe043f2c3db8bec --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision a26580f1abb9900e91590bf19c78439c24ad6ffc) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision ab7cddfe742a1c00e265a37effe043f2c3db8bec) @@ -48,20 +48,6 @@ readonly property bool isDisconnect : _root.stackStepIndex === PostTreatmentStack.StackStep.Disconnect readonly property bool isReview : _root.stackStepIndex === PostTreatmentStack.StackStep.Review - -// signal patientDisconnectionConfirm () -// signal treatmentReviewConfirm () -// signal disposablesRemovalConfirm () -// signal disposablesRemovalBack () - - // TODO fix in post treatment -// onPatientDisconnectionConfirm : { vPostTreatmentAdjustmentDisposablesRemovalConfirm .doConfirm( ) } -// /* No wait for Rsp, so navigates => */ page( _postTreatmentReview ) -// /* After navigation ask for Tx data */ vPostTreatmentAdjustmentTreatmentLog .doRequest( )} -// onTreatmentReviewConfirm : { vPostTreatmentAdjustmentPatientDisconnectionConfirm .doConfirm( )} -// onDisposablesRemovalConfirm : vPostTreatmentAdjustmentDisposablesRemovalConfirm .doConfirm( ) -// onDisposablesRemovalBack : page( _postTreatmentReview ) - onVisibleChanged: { if (visible) { _mainMenu.hidden = true @@ -82,7 +68,7 @@ vPostTreatmentAdjustmentDisposablesRemovalConfirm.doConfirm() break case PostTreatmentStack.Review: - vPostTreatmentAdjustmentPatientDisconnectionConfirm.doConfirm() + page( _postTreatmentDisinfection ) break case PostTreatmentStack.Disinfection: // Skip button - go back to standby -- Finish Treatment @@ -132,7 +118,6 @@ default: return true } - } StepNavigationTitleBar { id: _titleBar @@ -207,7 +192,6 @@ PostTreatmentBase { id: _postTreatmentDisinfection objectName :" _postTreatmentDisinfection" - instructionBased : true onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disinfection } } @@ -223,12 +207,24 @@ function onPostTreatmentChanged ( vValue ) { page( _postTreatmentDisconnectStack , vValue )} } - - // Disconnect + // Disconnect stack Connections { target: _postTreatmentDisconnectStack function onGoToNextStep () { page ( _postTreatmentRemove )} } + // Confirm Patient Disconnection + Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm + function onAdjustmentTriggered ( vValue ) { + if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { + _postTreatmentReview.reasonText = "" + _postTreatmentDisconnectStack.goToDrain() + + } else { + _postTreatmentReview.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() + } + } + } + // Auto - Eject Connections { target: vPostTreatmentAdjustmentDisposablesRemovalConfirm function onAdjustmentTriggered ( vValue ) { @@ -245,25 +241,10 @@ Connections { target: vPostTreatmentAdjustmentTreatmentLog function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentTreatmentLog.adjustment_Accepted ) { - _postTreatmentReview.reasonText = "" + _postTreatmentReview.reasonText = "" } else { - _postTreatmentReview.reasonText = vPostTreatmentAdjustmentTreatmentLog.text() + _postTreatmentReview.reasonText = vPostTreatmentAdjustmentTreatmentLog.text() } } } - - // keep? - Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm - function onAdjustmentTriggered ( vValue ) { - if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { - _postTreatmentReview.reasonText = "" - page( _postTreatmentDisinfection ) - - } else { - _postTreatmentReview.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() - } - } - } - - }