Index: denali.pro.user =================================================================== diff -u -r76f632ce5a9039ae662d9a52286079b772f8ae7f -r3345651cca9723989785801ee25001dc3e4f28a1 --- denali.pro.user (.../denali.pro.user) (revision 76f632ce5a9039ae662d9a52286079b772f8ae7f) +++ denali.pro.user (.../denali.pro.user) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -r76f632ce5a9039ae662d9a52286079b772f8ae7f -r3345651cca9723989785801ee25001dc3e4f28a1 --- denali.qrc (.../denali.qrc) (revision 76f632ce5a9039ae662d9a52286079b772f8ae7f) +++ denali.qrc (.../denali.qrc) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -146,5 +146,7 @@ sources/gui/qml/pages/postTreatment/PostTreatmentRinseback.qml sources/gui/qml/pages/postTreatment/PostTreatmentRecirculate.qml + sources/gui/qml/pages/postTreatment/PostTreatmentComplete.qml + sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackComplete.qml Index: sources/gui/qml/pages/postTreatment/PostTreatmentComplete.qml =================================================================== diff -u --- sources/gui/qml/pages/postTreatment/PostTreatmentComplete.qml (revision 0) +++ sources/gui/qml/pages/postTreatment/PostTreatmentComplete.qml (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -0,0 +1,86 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file PostTreatmentComplete.qml + * \author (last) Behrouz NematiPour + * \date (last) 03-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the post treatment complete screen + */ +ScreenItem { id: _root + objectName: "_PostTreatmentComplete" + + property alias reasonText : _notification.text + + signal rinsebackClicked() + signal endClicked() + + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Treatment Complete") + font.pixelSize: Fonts.fontPixelTitle + } + + Row { id: _buttonGroup + property int buttonsWidth : 560 + spacing: 50 + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + rightMargin : spacing + leftMargin : spacing + bottomMargin : spacing + } + + TouchRect { id : _rinsebackTouchRect + visible : true + button.onPressed: rinsebackClicked() + text.text : qsTr("BEGIN RINSEBACK") + width : _buttonGroup.buttonsWidth + borderColor : Colors.white + } + + TouchRect { id : _endTouchRect + visible : false // will be enabled if rinseback is not selected and timed out. + button.onPressed: endClicked() + text.text : qsTr("END TREATMENT") + width : _buttonGroup.buttonsWidth + borderColor : Colors.white + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu .hidden = true + _treatmentMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/postTreatment/PostTreatmentRecirculate.qml =================================================================== diff -u -r76f632ce5a9039ae662d9a52286079b772f8ae7f -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/gui/qml/pages/postTreatment/PostTreatmentRecirculate.qml (.../PostTreatmentRecirculate.qml) (revision 76f632ce5a9039ae662d9a52286079b772f8ae7f) +++ sources/gui/qml/pages/postTreatment/PostTreatmentRecirculate.qml (.../PostTreatmentRecirculate.qml) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -22,7 +22,7 @@ import "qrc:/components" /*! - * \brief the parent page of the pretreatment create screens + * \brief the post treatment recirculate screen */ ScreenItem { id: _root objectName: "_PostTreatmentRecirculate" @@ -79,7 +79,8 @@ onVisibleChanged: { _notification.text = "" if (visible) { - _mainMenu.hidden = true + _mainMenu .hidden = true + _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/PostTreatmentRinseback.qml =================================================================== diff -u -r76f632ce5a9039ae662d9a52286079b772f8ae7f -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/gui/qml/pages/postTreatment/PostTreatmentRinseback.qml (.../PostTreatmentRinseback.qml) (revision 76f632ce5a9039ae662d9a52286079b772f8ae7f) +++ sources/gui/qml/pages/postTreatment/PostTreatmentRinseback.qml (.../PostTreatmentRinseback.qml) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -22,7 +22,7 @@ import "qrc:/components" /*! - * \brief the rinseback screen + * \brief the post treatment rinseback screen */ ScreenItem { id: _root objectName: "_PostTreatmentRinseback" @@ -186,7 +186,8 @@ onVisibleChanged: { _notification.text = "" if (visible) { - _mainMenu.hidden = true + _mainMenu .hidden = true + _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackComplete.qml =================================================================== diff -u --- sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackComplete.qml (revision 0) +++ sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackComplete.qml (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -0,0 +1,95 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file PostTreatmentRinsebackComplete.qml + * \author (last) Behrouz NematiPour + * \date (last) 03-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the post treatment rinseback complete screen + */ +ScreenItem { id: _root + objectName: "_PostTreatmentRinsebackComplete" + + property alias reasonText : _notification.text + + signal additionalClicked() + signal recirculateClicked() + signal endClicked() + + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Rinseback Complete") + font.pixelSize: Fonts.fontPixelTitle + } + + Row { id: _buttonGroup + property int buttonsWidth : 300 + spacing: 50 + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + rightMargin : spacing + leftMargin : spacing + bottomMargin : spacing + } + + TouchRect { id : _additionalTouchRect + visible : true + button.onPressed: additionalClicked() + text.text : qsTr("ADDITIONAL") + width : _buttonGroup.buttonsWidth + borderColor : Colors.white + } + + TouchRect { id : _recirculateTouchRect + visible : true + button.onPressed: recirculateClicked() + text.text : qsTr("RECIRCULATE") + width : _buttonGroup.buttonsWidth + borderColor : Colors.white + } + + TouchRect { id : _disposablesTouchRect + visible : true // true if only treatment is not already complete + button.onPressed: endClicked() + text.text : qsTr("END") + width : _buttonGroup.buttonsWidth + borderColor : Colors.white + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu .hidden = true + _treatmentMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r76f632ce5a9039ae662d9a52286079b772f8ae7f -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 76f632ce5a9039ae662d9a52286079b772f8ae7f) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -222,8 +222,10 @@ } } - PostTreatmentRinseback { id: _postTreatmentRinseback } - PostTreatmentRecirculate { id: _postTreatmentRecirculate } + PostTreatmentRinseback { id: _postTreatmentRinseback } + PostTreatmentRinsebackComplete { id: _postTreatmentRinsebackComplete } + PostTreatmentRecirculate { id: _postTreatmentRecirculate } + PostTreatmentComplete { id: _postTreatmentComplete } // ---------- Manages Responses ---------- Connections { target: vTreatmentAdjustmentDuration @@ -330,17 +332,34 @@ onShowTreatmentStart : { push(_treatmentStart) } } + // the back is more flixible regarding our current design + // and it's easier(or may not need) to modify later if required. + // and is more optimized and will never leave screen empty + // also with what ever order they have been push with the reverse/correct animation will be poped or pushed. Connections { target: vHDTreatmentStates onTxStartChanged: { - console.debug(" ----- onTxStartChanged") if ( vHDTreatmentStates.txStart ) { back( _treatmentStart ) } } + onTxDialysisEndChanged: { + if ( vHDTreatmentStates.txDialysisEnd ) { + // if Tx completed + // -> Rinseback + // -> End / Disconnect + // if Tx Stopped + // -> + back( _postTreatmentComplete ) + } + } + onTxRinsebackChanged: { if ( vHDTreatmentStates.txRinseback ) { - push( _postTreatmentRinseback ) + // it may be navigated from complete or stop alarm dialog, + // which in the later case it can't be replaced with main treatment + // since user is able to go back to main treament if it's not timed out. + back( _postTreatmentRinseback ) _treatmentMenu.hidden = true } } @@ -350,7 +369,7 @@ // application state by design is navigating always from Rinseback to recirculate // so always it is rinseback on top which has to be replaced by recirculate // also we never go back to rinseback from recirculate and will go back to blood priming - replace( _postTreatmentRecirculate ) + back( _postTreatmentRecirculate ) _treatmentMenu.hidden = true } } Index: sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml =================================================================== diff -u -rdf0c8b4fa51d4f5ef0216eb2c3f6f5dfc97bf12e -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision df0c8b4fa51d4f5ef0216eb2c3f6f5dfc97bf12e) +++ sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -34,7 +34,7 @@ readonly property bool isCompleted : vHDTreatmentStates.hpCompleted readonly property bool isEmpty : vHDTreatmentStates.hpEmpty - readonly property bool isTxRunning : vHDTreatmentStates.txDialysis_Running + readonly property bool isTxRunning : vHDTreatmentStates.txDialysisRunning QtObject { id: _private readonly property string textHeparin : qsTr("HEPARIN DELIVERY") Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -32,7 +32,7 @@ property int progressValue : vTreatmentTime.time_Elapsed property int timeTextValue : vTreatmentTime.time_Remaining - property bool isRunning : vHDTreatmentStates.txDialysis_Running + property bool isRunning : vHDTreatmentStates.txDialysisRunning signal clicked() Index: sources/model/hd/alarm/MAlarmStatusData.cpp =================================================================== diff -u -r4af6dcfa0281dc27714a26514e82bf3def901b5a -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/model/hd/alarm/MAlarmStatusData.cpp (.../MAlarmStatusData.cpp) (revision 4af6dcfa0281dc27714a26514e82bf3def901b5a) +++ sources/model/hd/alarm/MAlarmStatusData.cpp (.../MAlarmStatusData.cpp) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -165,7 +165,7 @@ case GuiAlarmID::ALARM_ID_POST_ACID_CONDUCTIVITY_OUT_OF_RANGE : { result = QObject::tr("Post-acid concentrate conductivity out of range" ); break; } case GuiAlarmID::ALARM_ID_POST_BICARB_CONDUCTIVITY_OUT_OF_RANGE : { result = QObject::tr("Post-bicarb concentrate conductivity out of range" ); break; } case GuiAlarmID::ALARM_ID_RO_PUMP_FLOW_RATE_OUT_OF_RANGE : { result = QObject::tr("RO pump flow rate out of range" ); break; } - case GuiAlarmID::ALARM_ID_DG_THERMISOTRS_TEMPERATURE_OUT_OF_RANGE : { result = QObject::tr("DG thermistors/sensors temperature out of range" ); break; } + case GuiAlarmID::ALARM_ID_DG_THERMISTORS_TEMPERATURE_OUT_OF_RANGE : { result = QObject::tr("DG thermistors/sensors temperature out of range" ); break; } case GuiAlarmID::ALARM_ID_DG_FAN_RPM_OUT_OF_RANGE : { result = QObject::tr("DG fan RPM out of range" ); break; } case GuiAlarmID::ALARM_ID_DG_DIALYSATE_FILL_OUT_OF_TIME : { result = QObject::tr("DG dialysate fill runs out of time" ); break; } case GuiAlarmID::ALARM_ID_CP1_SPEED_CONTROL_ERROR : { result = QObject::tr("DG concentrate pump CP1 speed control error" ); break; } Index: sources/view/hd/data/VHDTreatmentStatesData.cpp =================================================================== diff -u -r76f632ce5a9039ae662d9a52286079b772f8ae7f -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/view/hd/data/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision 76f632ce5a9039ae662d9a52286079b772f8ae7f) +++ sources/view/hd/data/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -75,8 +75,8 @@ txEnd ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_END_STATE ); // Treatment states - Dialysis - txDialysis_Running ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_DIALYSIS_STATE ); - txDialysis_End ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_DIALYSIS_END_STATE ); + txDialysisRunning ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_DIALYSIS_STATE ); + txDialysisEnd ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_DIALYSIS_END_STATE ); // Treatment states - Rinse back txRinseback ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_RINSEBACK_STATE ); Index: sources/view/hd/data/VHDTreatmentStatesData.h =================================================================== diff -u -r76f632ce5a9039ae662d9a52286079b772f8ae7f -r3345651cca9723989785801ee25001dc3e4f28a1 --- sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 76f632ce5a9039ae662d9a52286079b772f8ae7f) +++ sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 3345651cca9723989785801ee25001dc3e4f28a1) @@ -90,10 +90,10 @@ // coco end // ---- Treatment states - Dialysis - PROPERTY( bool , txDialysis_Running , false) ///< TREATMENT_DIALYSIS_STATE Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested + PROPERTY( bool , txDialysisRunning , false) ///< TREATMENT_DIALYSIS_STATE Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested // coco begin validated: Manually tested // not used yet since the Treatment Start/stop/end has not been implemented yet. - PROPERTY( bool , txDialysis_End , false) ///< TREATMENT_DIALYSIS_END_STATE Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback + PROPERTY( bool , txDialysisEnd , false) ///< TREATMENT_DIALYSIS_END_STATE Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback // coco end // ---- Treatment states - Rinse back PROPERTY( bool , txRinseback , false) ///< TREATMENT_RINSEBACK_STATE Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating