Index: denali.pro.user =================================================================== diff -u -rd6dc1cd63d86d7d4f4c4d05958bec4f870783f41 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- denali.pro.user (.../denali.pro.user) (revision d6dc1cd63d86d7d4f4c4d05958bec4f870783f41) +++ denali.pro.user (.../denali.pro.user) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -1481,7 +1481,7 @@ denali Qt4ProjectManager.Qt4RunConfiguration:/home/denali/Projects/application/denali.pro - --disable-timeout --disable-unhandled-report --logOut + --disable-timeout --logOut 3768 false true Index: denali.qrc =================================================================== diff -u -r3702984c4572607055ab3ede4d45792e74595991 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- denali.qrc (.../denali.qrc) (revision 3702984c4572607055ab3ede4d45792e74595991) +++ denali.qrc (.../denali.qrc) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -1,9 +1,11 @@ + sources/gui/qml/pages/MainStack.qml + sources/gui/qml/pages/MainHome.qml sources/gui/qml/pages/ManagerStack.qml + sources/gui/qml/pages/ManagerHome.qml sources/gui/qml/pages/SettingsStack.qml sources/gui/qml/pages/SettingsHome.qml - sources/gui/qml/pages/ManagerHome.qml sources/gui/qml/dialogs/PowerOff.qml @@ -104,6 +106,8 @@ qtquickcontrols2.conf sources/gui/qml/main.qml + sources/gui/qml/AlarmItem.qml + sources/gui/qml/PowerItem.qml @@ -113,17 +117,23 @@ sources/gui/qml/globals/Fonts.qml - sources/gui/qml/pages/treatment/TreatmentHome.qml sources/gui/qml/pages/treatment/TreatmentStack.qml sources/gui/qml/pages/treatment/TreatmentStart.qml + sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml + + sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml + sources/gui/qml/pages/pretreatment/PreTreatmentCreateStack.qml + sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml + sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml - sources/gui/qml/pages/pretreatment/create/PreTreatmentUltrafiltration.qml sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml - sources/gui/qml/pages/pretreatment/create/PreTreatmentPrime.qml - sources/gui/qml/pages/pretreatment/create/PreTreatmentBase.qml + + sources/gui/qml/pages/pretreatment/prime/PreTreatmentUltrafiltration.qml + sources/gui/qml/pages/pretreatment/prime/PreTreatmentPrime.qml + sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml Index: sources/gui/qml/AlarmItem.qml =================================================================== diff -u --- sources/gui/qml/AlarmItem.qml (revision 0) +++ sources/gui/qml/AlarmItem.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,146 @@ +/*! + * + * 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 AlarmItem.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 28-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// C++ imports +import VAlarmStatus 0.1 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/dialogs" + +/*! + * \brief AlarmItem is the alarm logic container to be separated from the rest of the code. + * This item needs to work with the NotificationBar component. + */ +Item { id : _root + anchors.fill: parent + + VAlarmStatus { id: vAlarmStatus } + + readonly property alias backgroundColor: _alarmDialog.backgroundColor + readonly property alias textColor : _alarmDialog.textColor + readonly property alias text : vAlarmStatus.text + readonly property alias isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced + readonly property alias timeout : vAlarmStatus.alarm_MuteTimeout + + // Alarms + function alarmMinimize() { + _alarmDialog .visible = false + _alarmListDialog.visible = false + _alarmBar .visible = true + } + function alarmMaximize() { + _alarmDialog .visible = true + _alarmListDialog.visible = false + _alarmBar .visible = false + } + function alarmList() { + _alarmDialog .visible = false + _alarmListDialog.visible = true + _alarmBar .visible = false + } + function alarmHide() { + _alarmDialog .visible = false + _alarmListDialog.visible = false + _alarmBar .visible = false + } + + Connections { target: _alarmBar + onMuteClicked : vAlarmStatus.doSilence() + onListClicked : alarmList() + onMaximizeClicked : alarmMaximize() + onClicked : alarmMaximize() + } + + // TODO : Later need to create a base Notification dialog class + // and inherit NotificationDialog and AlarmListDialog from that + // Beter be the NotificationDialog defined as parent + // and two separate dialogs by the names of AlarmDialog , AlarmListDlialog creatd. + // Same for the Notification Bar + NotificationDialog { id : _alarmDialog + // this will change later to the actual message text + // and the instruction would be in the dialog content + titleText : qsTr("Alarm") + description : vAlarmStatus.text + alarmID : vAlarmStatus.alarm_AlarmID + isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced + timeout : vAlarmStatus.alarm_MuteTimeout + okVisible : vAlarmStatus.alarm_Flag_UserMustAck + resumeVisible : ! vAlarmStatus.alarm_Flag_noResume + rinsebackVisible : ! vAlarmStatus.alarm_Flag_noRinseback + endVisible : ! vAlarmStatus.alarm_Flag_noEndTreatment + + onMuteClicked : vAlarmStatus.doSilence () + onResumeClicked : vAlarmStatus.doUserActionResume () + onRinsebackClicked : vAlarmStatus.doUserActionRinseback() + onEndClicked : vAlarmStatus.doUserActionEnd () + onOkClicked : vAlarmStatus.doUserActionOk () + onMinimizeClicked : { + alarmMinimize() + // when user minimizes the alarm it can stay minimized until otherwize is set + // by the next alarm status received. + // see also the "Connections { target: vAlarmStatus" implementation + vAlarmStatus.alarm_KeepMinimized = true + // DEBUG: vAlarmStatus.doClearCondition() + } + } + + AlarmListDialog { id : _alarmListDialog + isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced + timeout : vAlarmStatus.alarm_MuteTimeout + onMuteClicked : vAlarmStatus.doSilence() + onMinimizeClicked : alarmMinimize() + } + + Connections { target: vAlarmStatus + onAlarm_Flag_noResumeChanged : vAlarmStatus.alarm_KeepMinimized = false + onAlarm_Flag_noRinsebackChanged : vAlarmStatus.alarm_KeepMinimized = false + onAlarm_Flag_noEndTreatmentChanged : vAlarmStatus.alarm_KeepMinimized = false + onAlarm_Flag_UserMustAckChanged : vAlarmStatus.alarm_KeepMinimized = false + onAlarm_AlarmIDChanged : vAlarmStatus.alarm_KeepMinimized = false + onAlarm_Flag_alarmsSilencedChanged : vAlarmStatus.alarm_KeepMinimized = vAlarmStatus.alarm_Flag_alarmsSilenced + onAlarm_PriorityChanged: { + [ + _alarmDialog.titleBarBackground, + _alarmDialog.titleBarForeground, + _alarmDialog.backgroundColor , + _alarmDialog.textColor , + ] = Colors.alarmPriorityColors(vAlarmStatus.alarm_Priority) + } + + onDidAlarmRaise: { + let silenceMinimize = false + if (vAlarmStatus.alarm_Flag_alarmsSilenced && silenceMinimize) { + // this is the response to the silence request + // so the dialog should be closed when the request accepted + // if not then if can stay minimized nothing happens + // if can't stay minimized then it has to be shown + alarmMinimize() + } + else { + if (! vAlarmStatus.alarm_KeepMinimized) { + alarmMaximize() + } + } + } + + onDidAlarmEmpty: alarmHide() + } +} Index: sources/gui/qml/PowerItem.qml =================================================================== diff -u --- sources/gui/qml/PowerItem.qml (revision 0) +++ sources/gui/qml/PowerItem.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,84 @@ +/*! + * + * 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 PowerItem.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 28-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// C++ imports +import Gui.View 0.1 +import Gui.Actions 0.1 +import VPowerOff 0.1 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/dialogs" + +/*! + * \brief PowerItem is the power off logic container to be separated from the rest of the code. + * \todo This item needs to be modified later to be independent of the _GuiView + */ +Item { id: _root + anchors.fill: parent + + VPowerOff { id: vPowerOff } + + AutoHideInfo { id: _autoHideInfo } + + Connections { target: _GuiView + onDidActionReceive: { + switch(vAction) { + case GuiActions.ID_ShuttingDown: + _autoHideInfo.showDialog( + qsTr("System is shutting down"), + 5000 // if any error happens and shutdown is not successful then after 5 seconds dialog hides. + ) + break; + } + } + } + + PowerOff { id: _powerOffDialog + onAccepted: { + _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.Accepted) + } + onRejected: { + _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.Rejected) + } + } + + Connections { target: vPowerOff + onPoweroffTriggered: { + switch (vpoweroff) { + case GuiActions.Command: + _powerOffDialog.open() + break; + + case GuiActions.Timeout: + _powerOffDialog.close() + break; + + case GuiActions.Rejected: + _autoHideInfo.showDialog( + qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg() + 2000 // notifies user and hides the dialog + ) + break; + } + } + } + +} Index: sources/gui/qml/components/Background.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/components/Background.qml (.../Background.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/components/Background.qml (.../Background.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -5,20 +5,21 @@ * 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 Background.qml - * \author (last) Behrouz NematiPour - * \date (last) 23-Jan-2020 - * \author (original) Behrouz NematiPour - * \date (original) 13-Jan-2020 + * \file Background.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 13-Jan-2020 * */ // Qt import QtQuick 2.0 // Project +import "qrc:/globals" Rectangle { id: _root anchors.fill: parent - color: "gray" + color: Colors.backgroundMain } Index: sources/gui/qml/main.qml =================================================================== diff -u -r93b6bd48e2aec1fca4f2b5b79dcefffa49e9ce16 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/main.qml (.../main.qml) (revision 93b6bd48e2aec1fca4f2b5b79dcefffa49e9ce16) +++ sources/gui/qml/main.qml (.../main.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -5,11 +5,11 @@ * 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 main.qml - * \author (last) Peter Lucia - * \date (last) 15-Oct-2020 - * \author (original) Behrouz NematiPour - * \date (original) 24-Sep-2019 + * \file main.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 24-Sep-2019 * */ @@ -30,8 +30,6 @@ import VTreatmentPressureOcclusion 0.1 import VTreatmentUltrafiltration 0.1 import VTreatmentTime 0.1 -import VAlarmStatus 0.1 -import VPowerOff 0.1 import VHDOperationMode 0.1 import VTreatmentRinseback 0.1 import VTreatmentRecirculate 0.1 @@ -80,26 +78,6 @@ width : Variables.applicationWidth height: Variables.applicationHeight - property alias powerOffDialog: _powerOffDialog - - GuiView { id: _GuiView - onDidActionReceive: { - //console.debug(vAction, vData) - switch(vAction) { - case GuiActions.ID_ShuttingDown: - _autoHideInfo.showDialog( - qsTr("System is shutting down"), - 5000 // if any error happens and shutdown is not successful then after 5 seconds dialog hides. - ) - break; - } - } - } - - // TODO : When Testing data on Setting screen is removed - // This needs to be moved into the Treatment______.qml - VAlarmStatus { id: vAlarmStatus } - VPowerOff { id: vPowerOff } VHDOperationMode { id: vHDOperationMode } VTreatmentBloodFlow { id: vTreatmentBloodFlow } VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } @@ -142,116 +120,39 @@ VTreatmentAdjustmentRecirculate { id: vTreatmentAdjustmentRecirculate } VTreatmentAdjustmentEnd { id: vTreatmentAdjustmentEnd } VTreatmentAdjustmentVersions { id: vTreatmentAdjustmentVersions } + + Background {} + + GuiView { id: _GuiView } + // ----- Follow the below Z order ----- // 1 - Screens // 1 - 1 - SettingsStack { id: _settingsStack } + SettingsStack { id: _settingsStack } // 1 - 2 - ManagerStack { id: _managerStack } + ManagerStack { id: _managerStack } // 1 - 3 - TreatmentStack { id: _treatmentStack } + MainStack { id: _mainStack } + PowerItem {} + // 3 - Footer MainMenu { id: _mainMenu titles: [ qsTr("Treatment") , qsTr("Manager") , qsTr("Settings") ] Component.onCompleted: { - _treatmentStack.visible = true + _settingsStack.visible = false + _managerStack .visible = false + _mainStack .visible = true } + onItemPressed: { - _treatmentStack.visible = vIndex == 0; + _mainStack .visible = vIndex == 0; _managerStack .visible = vIndex == 1; _settingsStack .visible = vIndex == 2; } } - // 4 - Modals - AutoHideInfo { id: _autoHideInfo } - PowerOff { id: _powerOffDialog - onAccepted: { - _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.Accepted) - } - onRejected: { - _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.Rejected) - } - } - - // Alarms - function alarmMinimize() { - _alarmDialog .visible = false - _alarmListDialog.visible = false - _alarmBar .visible = true - } - function alarmMaximize() { - _alarmDialog .visible = true - _alarmListDialog.visible = false - _alarmBar .visible = false - } - function alarmList() { - _alarmDialog .visible = false - _alarmListDialog.visible = true - _alarmBar .visible = false - } - function alarmHide() { - _alarmDialog .visible = false - _alarmListDialog.visible = false - _alarmBar .visible = false - } - - NotificationBar { id : _alarmBar - backgroundColor : _alarmDialog.backgroundColor - textColor : _alarmDialog.textColor - anchors.bottom : _mainMenu.top - text : vAlarmStatus.text; - isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced - timeout : vAlarmStatus.alarm_MuteTimeout - - onMuteClicked : vAlarmStatus.doSilence() - onListClicked : alarmList() - onMaximizeClicked : alarmMaximize() - onClicked : alarmMaximize() - } - - // TODO : Later need to create a base Notification dialog class - // and inherit NotificationDialog and AlarmListDialog from that - // Beter be the NotificationDialog defined as parent - // and two separate dialogs by the names of AlarmDialog , AlarmListDlialog creatd. - // Same for the Notification Bar - NotificationDialog { id : _alarmDialog - // this will change later to the actual message text - // and the instruction would be in the dialog content - titleText : "Alarm" - description : vAlarmStatus.text - alarmID : vAlarmStatus.alarm_AlarmID - isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced - timeout : vAlarmStatus.alarm_MuteTimeout - okVisible : vAlarmStatus.alarm_Flag_UserMustAck - resumeVisible : ! vAlarmStatus.alarm_Flag_noResume - rinsebackVisible : ! vAlarmStatus.alarm_Flag_noRinseback - endVisible : ! vAlarmStatus.alarm_Flag_noEndTreatment - - onMuteClicked : vAlarmStatus.doSilence () - onResumeClicked : vAlarmStatus.doUserActionResume () - onRinsebackClicked : vAlarmStatus.doUserActionRinseback() - onEndClicked : vAlarmStatus.doUserActionEnd () - onOkClicked : vAlarmStatus.doUserActionOk () - onMinimizeClicked : { - alarmMinimize() - // when user minimizes the alarm it can stay minimized until otherwize is set - // by the next alarm status received. - // see also the "Connections { target: vAlarmStatus" implementation - vAlarmStatus.alarm_KeepMinimized = true - // DEBUG: vAlarmStatus.doClearCondition() - } - } - - AlarmListDialog { id : _alarmListDialog - isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced - timeout : vAlarmStatus.alarm_MuteTimeout - onMuteClicked : vAlarmStatus.doSilence() - onMinimizeClicked : alarmMinimize() - } - // 9 - Others Text { // TEST : Application version should be moved into the information screen later. color : Colors.textMain @@ -283,62 +184,18 @@ anchors.fill: parent source: "qrc:/images/iMicroSD" } - visible: true // ! _GuiView.sdIsReady || _GuiView.sdIsReadOnly + visible: true } - Connections { target: vPowerOff - onPoweroffTriggered: { - switch (vpoweroff) { - case GuiActions.Command: - _powerOffDialog.open() - break; - - case GuiActions.Timeout: - _powerOffDialog.close() - break; - - case GuiActions.Rejected: - _autoHideInfo.showDialog( - qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg() - 2000 // notifies user and hides the dialog - ) - break; - } - } + AlarmItem { id: _alarmItem } + // NotificationBar has to be anchored to the main menu and if it is moved into the AlarmItem + // then cannot be anchored. + NotificationBar { id: _alarmBar + anchors.bottom : _mainMenu.top + backgroundColor : _alarmItem.backgroundColor + textColor : _alarmItem.textColor + text : _alarmItem.text + isSilenced : _alarmItem.isSilenced + timeout : _alarmItem.timeout } - - Connections { target: vAlarmStatus - onAlarm_Flag_noResumeChanged : vAlarmStatus.alarm_KeepMinimized = false - onAlarm_Flag_noRinsebackChanged : vAlarmStatus.alarm_KeepMinimized = false - onAlarm_Flag_noEndTreatmentChanged : vAlarmStatus.alarm_KeepMinimized = false - onAlarm_Flag_UserMustAckChanged : vAlarmStatus.alarm_KeepMinimized = false - onAlarm_AlarmIDChanged : vAlarmStatus.alarm_KeepMinimized = false - onAlarm_Flag_alarmsSilencedChanged : vAlarmStatus.alarm_KeepMinimized = vAlarmStatus.alarm_Flag_alarmsSilenced - onAlarm_PriorityChanged: { - [ - _alarmDialog.titleBarBackground, - _alarmDialog.titleBarForeground, - _alarmDialog.backgroundColor , - _alarmDialog.textColor , - ] = Colors.alarmPriorityColors(vAlarmStatus.alarm_Priority) - } - - onDidAlarmRaise: { - let silenceMinimize = false - if (vAlarmStatus.alarm_Flag_alarmsSilenced && silenceMinimize) { - // this is the response to the silence request - // so the dialog should be closed when the request accepted - // if not then if can stay minimized nothing happens - // if can't stay minimized then it has to be shown - alarmMinimize() - } - else { - if (! vAlarmStatus.alarm_KeepMinimized) { - alarmMaximize() - } - } - } - - onDidAlarmEmpty: alarmHide() - } } Index: sources/gui/qml/pages/MainHome.qml =================================================================== diff -u --- sources/gui/qml/pages/MainHome.qml (revision 0) +++ sources/gui/qml/pages/MainHome.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,66 @@ +/*! + * + * 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 MainHome.qml + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 27-Jan-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief TreatmentHome is the screen + * which is the default screen in the "Treatment" stack + */ +ScreenItem { id: _root + // exported items + property alias startTreatmentButton : _startTreatmentRect.button + property alias createTreatmentButton: _createTreatmentRect.button + + signal treatmentStarted() + signal treatmentCreated() + + // 2 - Header + ImageLogoD { id: _headerLogo } + + // Definitions + Column { + spacing: Variables.columnSpacing + anchors.centerIn: parent + TitleText { id: _titleText + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width + text: qsTr("Good Morning") + } + TouchRect { id : _startTreatmentRect + anchors.horizontalCenter: parent.horizontalCenter + text.text: qsTr("START TREATMENT") + button.onClicked: treatmentStarted() + } + TouchRect { id : _createTreatmentRect + anchors.horizontalCenter: parent.horizontalCenter + text.text: qsTr("CREATE TREATMENT") + button.onClicked: treatmentCreated() + } + } + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = false + } + } +} Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u --- sources/gui/qml/pages/MainStack.qml (revision 0) +++ sources/gui/qml/pages/MainStack.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,98 @@ +/*! + * + * 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 ManagerStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Oct-2019 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment" +import "qrc:/pages/treatment" +import "qrc:/pages/posttreatment" + +/*! + * \brief ManagerStack is the screen + * which contains the main stack for all the Trearment Manager screens + * This is the screen which will show up when "Manager" option + * is selected from the main menu. + */ +StackItem { id : _root + stackView.initialItem : _mainHome + + MainHome { id: _mainHome + onTreatmentStarted : _root.page ( _treatmentStack ) + onTreatmentCreated : vTreatmentCreate.doSelectParameters() + } + + // Pre Treatment + PreTreatmentCreateStack { id: _preTreatmentCreateStack } + PreTreatmentPrimeStack { id: _preTreatmentPrimeStack } + + TreatmentStack { id: _treatmentStack + // please be careful about the _root.pop. + // since TreatmentStack is a stack, just calling a pop will call the pop function of the TreatmentStack not MainStack. + // but _mainHome belongs to MainStack. + onBackClicked: _root.pop ( _mainHome ) + } + + // Post Treatment + PostTreatmentBloodPrime { id: _postTreatmentBloodPrime } // only one page, no stack for now. + PostTreatmentRinsebackStack { id: _postTreatmentRinsebackStack } + PostTreatmentRecirculateStack { id: _postTreatmentRecirculateStack } + PostTreatmentEndStack { id: _postTreatmentEndStack } + + Connections { target: vHDOperationMode + onFaultChanged : { if ( vfault ) { /* this is one way navigation, no getting back or out */ }} + onServiceChanged : { if ( vservice ) { /* this is one way navigation, no getting back or out */ }} + onInitChanged : { if ( vinit ) { /* this is one way navigation, no getting back or out */ }} + onStandbyChanged : { if ( vstandby ) { pop ( _mainHome )}} // this is a reset + onValidateParametersChanged : { if ( vvalidateParameters) { page( _preTreatmentCreateStack )}} + onPreTreatmentChanged : { if ( vpreTreatment ) { page( _preTreatmentPrimeStack )}} + onInTreatmentChanged : { if ( vinTreatment ) { page( _treatmentStack )}} + onPostTreatmentChanged : { if ( vpostTreatment ) { }} + onInvalidModeChanged : { if ( vinvalidMode ) { }} + } + + + // the page function 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 + // Blood Prime + onTxBloodPrimeChanged : { if ( vtxBloodPrime ) { page( _postTreatmentBloodPrime )}} + onBpRampChanged : { if ( vbpRamp ) { /* No action defined yet */ }} + + // in-Treatmet + onTxDialysisChanged : { if ( vtxDialysis ) { page( _treatmentStack )}} + + onTxRinsebackChanged : { if ( vtxRinseback ) { page( _postTreatmentRinsebackStack )}} + onTxRecirculateChanged : { if ( vtxRecirculate ) { page( _postTreatmentRecirculateStack )}} + onTxEndChanged : { if ( vtxEnd ) { page( _postTreatmentEndStack )}} + + // Treatment Stop + onTxStopChanged : { if ( vtxStop ) { page( _treatmentStack )}} + onTsRecirculateChanged : { if ( vtsRecirculate ) { /* No action defined yet */ }} + onTsRecirculateNoChanged: { if ( vtsRecirculateNo ) { /* No action defined yet */ }} + } + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = false + } + } +} Index: sources/gui/qml/pages/ManagerStack.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -30,4 +30,10 @@ StackItem { id : _root ManagerHome { id : _managerHome } stackView.initialItem : _managerHome + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = false + } + } } Index: sources/gui/qml/pages/SettingsStack.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/SettingsStack.qml (.../SettingsStack.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/pages/SettingsStack.qml (.../SettingsStack.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -5,11 +5,11 @@ * 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 SettingsStack.qml - * \author (last) Behrouz NematiPour - * \date (last) 22-Mar-2020 - * \author (original) Behrouz NematiPour - * \date (original) 21-Oct-2019 + * \file SettingsStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Oct-2019 * */ @@ -30,4 +30,10 @@ StackItem { id : _root SettingsHome { id : _settingsHome } stackView.initialItem : _settingsHome + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = false + } + } } Index: sources/gui/qml/pages/postTreatment/PostTreatmentBloodPrime.qml =================================================================== diff -u -r5937f831af0f641a4f4d10eac77d06c262a46b4a -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/PostTreatmentBloodPrime.qml (.../PostTreatmentBloodPrime.qml) (revision 5937f831af0f641a4f4d10eac77d06c262a46b4a) +++ sources/gui/qml/pages/postTreatment/PostTreatmentBloodPrime.qml (.../PostTreatmentBloodPrime.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -58,7 +58,6 @@ onVisibleChanged: { if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackStack.qml =================================================================== diff -u -rd6dc1cd63d86d7d4f4c4d05958bec4f870783f41 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackStack.qml (.../PostTreatmentRinsebackStack.qml) (revision d6dc1cd63d86d7d4f4c4d05958bec4f870783f41) +++ sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackStack.qml (.../PostTreatmentRinsebackStack.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -70,3 +70,31 @@ } } } + +/* TODO: + // an idea that is being worked on for later performance imporovement + // if the stackview becomes slow this idea is a manual transition with animation to be replacecd with stackView + PropertyAnimation { id: _rbInitAnimation + target: _postTreatmentRinsebackInit + property: "opacity" + duration: 1000 + to: vHDTreatmentStates.rbInit ? 1 : 0 + } + PropertyAnimation { id: _rbStopAnimation + target: _postTreatmentRinsebackComplete + property: "opacity" + duration: 1000 + to: vHDTreatmentStates.rbStop ? 1 : 0 + } + Connections { target: vHDTreatmentStates + onStateTriggered : { // this property is a TRIGGER and shall be set at the end of the property setters functions list + _postTreatmentRinsebackInit .visible = vHDTreatmentStates.rbInit + _postTreatmentRinseback .visible = vHDTreatmentStates.rbRun || vHDTreatmentStates.rbPaused + _postTreatmentRinsebackComplete .visible = vHDTreatmentStates.rbStop + _postTreatmentAdditional .visible = vHDTreatmentStates.rbAdditional + + } + onRbInitChanged: _rbInitAnimation.running = true + onRbStopChanged: _rbStopAnimation.running = true + } +*/ Index: sources/gui/qml/pages/postTreatment/end/PostTreatmentEnd.qml =================================================================== diff -u -r3702984c4572607055ab3ede4d45792e74595991 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/end/PostTreatmentEnd.qml (.../PostTreatmentEnd.qml) (revision 3702984c4572607055ab3ede4d45792e74595991) +++ sources/gui/qml/pages/postTreatment/end/PostTreatmentEnd.qml (.../PostTreatmentEnd.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -105,7 +105,6 @@ _notification.text = "" if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/end/PostTreatmentEndPause.qml =================================================================== diff -u -r3702984c4572607055ab3ede4d45792e74595991 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/end/PostTreatmentEndPause.qml (.../PostTreatmentEndPause.qml) (revision 3702984c4572607055ab3ede4d45792e74595991) +++ sources/gui/qml/pages/postTreatment/end/PostTreatmentEndPause.qml (.../PostTreatmentEndPause.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -77,7 +77,6 @@ onVisibleChanged: { if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentRecirculate.qml =================================================================== diff -u -rf4bdf1e57221c8395580fc169d239d49d670ce1b -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentRecirculate.qml (.../PostTreatmentRecirculate.qml) (revision f4bdf1e57221c8395580fc169d239d49d670ce1b) +++ sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentRecirculate.qml (.../PostTreatmentRecirculate.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -115,7 +115,6 @@ _notification.text = "" if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentReconnect.qml =================================================================== diff -u -r07e0c7bd409782cab96a4ae761ee3f819bdb8639 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentReconnect.qml (.../PostTreatmentReconnect.qml) (revision 07e0c7bd409782cab96a4ae761ee3f819bdb8639) +++ sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentReconnect.qml (.../PostTreatmentReconnect.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -152,7 +152,6 @@ _notification.text = "" if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentAdditional.qml =================================================================== diff -u -r5937f831af0f641a4f4d10eac77d06c262a46b4a -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentAdditional.qml (.../PostTreatmentAdditional.qml) (revision 5937f831af0f641a4f4d10eac77d06c262a46b4a) +++ sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentAdditional.qml (.../PostTreatmentAdditional.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -85,7 +85,6 @@ onVisibleChanged: { if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinseback.qml =================================================================== diff -u -r07e0c7bd409782cab96a4ae761ee3f819bdb8639 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinseback.qml (.../PostTreatmentRinseback.qml) (revision 07e0c7bd409782cab96a4ae761ee3f819bdb8639) +++ sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinseback.qml (.../PostTreatmentRinseback.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -171,7 +171,6 @@ _notification.text = "" if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackComplete.qml =================================================================== diff -u -rd6dc1cd63d86d7d4f4c4d05958bec4f870783f41 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackComplete.qml (.../PostTreatmentRinsebackComplete.qml) (revision d6dc1cd63d86d7d4f4c4d05958bec4f870783f41) +++ sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackComplete.qml (.../PostTreatmentRinsebackComplete.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -180,7 +180,6 @@ _notification.text = "" if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackInit.qml =================================================================== diff -u -rc5a6eee8a7619f2a2f425008b97ce5963cf8b2fa -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackInit.qml (.../PostTreatmentRinsebackInit.qml) (revision c5a6eee8a7619f2a2f425008b97ce5963cf8b2fa) +++ sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackInit.qml (.../PostTreatmentRinsebackInit.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -160,7 +160,6 @@ _notification.text = "" if (visible) { _mainMenu .hidden = true - _treatmentMenu.hidden = true } } } Index: sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,55 @@ +/*! + * + * 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 PreTreatmentBase.qml + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 12-Jan-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the parent page of the pretreatment create screens + */ +ScreenItem { id: _root + objectName: "_PreTreatmentBase" + + property alias reasonText : _notification.text + property alias header : _titleBar + + signal backClicked () + + TitleBarCreateTreatment { id: _titleBar + stepName : "" + anchors.top : parent.top + anchors.horizontalCenter : parent.horizontalCenter + width : parent.width + onBackClicked : { + _root.backClicked(); + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/pretreatment/PreTreatmentCreateStack.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/PreTreatmentCreateStack.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/PreTreatmentCreateStack.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,53 @@ +/*! + * + * 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 PreTreatmentCreateStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 28-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment/create" +/*! + * \brief the pre treatment parameters create stack screen + */ +StackItem { id: _root + objectName: "_PreTreatmentCreateStack" + + stackView.initialItem : null + + PreTreatmentCreate { id: _pretreatmentCreate + onBackClicked : {vTreatmentCreate.doCancelSelectingParameters() } + onContinueClicked : {vTreatmentCreate.doFinishedCreate(); } + } + + PreTreatmentConfirm { id: _pretreatmentConfirm + onBackClicked : {vTreatmentCreate.doCancelConfirmParameters() } + onConfirmClicked : {vTreatmentCreate.doFinishedConfirm(); } + } + + Connections { target: vHDOperationMode + onValidateParametersChanged : { if ( vvalidateParameters) { page( _pretreatmentCreate )}} + } + Connections { target: vTreatmentCreate + onFwValidationSuccess : { push( _pretreatmentConfirm ) } + } + onVisibleChanged: { + if (visible) { + _mainMenu .hidden = true + } + } +} Index: sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,65 @@ +/*! + * + * 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 PreTreatmentPrimeStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 28-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment/prime" +/*! + * \brief the pre treatment prime stack screen + */ +StackItem { id: _root + objectName: "_PreTreatmentPrimeStack" + + stackView.initialItem : null + + PreTreatmentPrime { id: _pretreatmentPrime + onBackClicked : {vTreatmentCreate.doRequestPop() } + onContinueClicked : {vTreatmentCreate.doFinishedPrime(); } + } + + PreTreatmentUltrafiltration { id: _pretreatmentUltrafiltration + onBackClicked : {vTreatmentCreate.doRequestPop() } + onStartClicked : {vTreatmentAdjustmentUltrafiltrationInit.doAdjustment(_pretreatmentUltrafiltration.ufVolume) } + } + + Connections { target: vTreatmentAdjustmentUltrafiltrationInit + onAdjustmentTriggered : { + // the maximum ultrafiltration volume has to be set/revert regardless + vTreatmentUltrafiltration.maximum = vTreatmentAdjustmentUltrafiltrationInit.volume + _pretreatmentUltrafiltration.ufVolume = vTreatmentAdjustmentUltrafiltrationInit.volume + // but only if it has been accepted it will navigate + if (vTreatmentAdjustmentUltrafiltrationInit.adjustment_Accepted) { + vTreatmentCreate.doStartTreatment() + } + else { + _pretreatmentUltrafiltration.reasonText = vTreatmentAdjustmentUltrafiltrationInit.text() + } + } + } + + Connections { target: vHDOperationMode + onPreTreatmentChanged : { if ( vpreTreatment ) { page( _pretreatmentPrime )}} + } + onVisibleChanged: { + if (visible) { + _mainMenu .hidden = true + } + } +} Fisheye: Tag c15ce613e372838316d42c40a86953e6f0aa05d3 refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/create/PreTreatmentBase.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml =================================================================== diff -u -r43b80bc100e5bbc5f940e014cb622b5269a55e6c -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (.../PreTreatmentConfirm.qml) (revision 43b80bc100e5bbc5f940e014cb622b5269a55e6c) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (.../PreTreatmentConfirm.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -7,7 +7,7 @@ * * \file PreTreatmentConfirm.qml * \author (last) Behrouz NematiPour - * \date (last) 12-Jan-2021 + * \date (last) 01-Mar-2021 * \author (original) Peter Lucia * \date (original) 03-Aug-2020 * @@ -21,6 +21,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/pretreatment" /*! * \brief Pre-Treatment confirm screen Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rf772cc152a61bf775aa7c4ce968024670f204f17 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision f772cc152a61bf775aa7c4ce968024670f204f17) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -7,7 +7,7 @@ * * \file PreTreatmentCreate.qml * \author (last) Behrouz NematiPour - * \date (last) 12-Jan-2021 + * \date (last) 01-Mar-2021 * \author (original) Behrouz NematiPour * \date (original) 27-Jan-2020 * @@ -21,6 +21,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/pretreatment" /*! * \brief Pre-Treatment create screen Fisheye: Tag c15ce613e372838316d42c40a86953e6f0aa05d3 refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/create/PreTreatmentPrime.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c15ce613e372838316d42c40a86953e6f0aa05d3 refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/create/PreTreatmentUltrafiltration.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/pretreatment/prime/PreTreatmentPrime.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/prime/PreTreatmentPrime.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/prime/PreTreatmentPrime.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,131 @@ +/*! + * + * 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 PreTreatmentPrime.qml + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Peter Lucia + * \date (original) 03-Aug-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment" + +/*! + * \brief Pre-Treatment priming screen + * \details which contains the priming timer and steps to let user know about the priming status. + */ +PreTreatmentBase { id: _root + objectName: "_PreTreatmentPrime" + + signal continueClicked() + + header.stepName : Variables.preTreatmentStepLabelPriming + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = true + } + } + + Text { id: _titleText + anchors { + top: _root.top + topMargin: 150 + horizontalCenter: parent.horizontalCenter + } + text: qsTr("Priming") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + + ProgressCircle { id: _circle + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _titleText.bottom + anchors.topMargin: 25 + minimum: 0 + maximum: vPriming.secondsTotal + diameter: 100 + value: vPriming.primingComplete ? vPriming.secondsTotal : vPriming.secondsTotal - vPriming.secondsRemaining + + PrimingTimer { id: _timeText + anchors.centerIn: parent + seconds : vPriming.secondsRemaining + completed: vPriming.primingComplete + } + } + + Column { id: _checklist + spacing: 20 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _circle.bottom + anchors.topMargin: 30 + + CheckListItem { id: _checking_installation + anchors.horizontalCenter: parent.horizontalCenter + color : Colors.transparent + text: qsTr("Checking installation") + completed: vPriming.checkingInstallationComplete + } + + CheckListItem { id: _creating_dialysate + anchors.horizontalCenter: parent.horizontalCenter + color : Colors.transparent + text : qsTr("Creating dialysate") + completed: vPriming.creatingDialysateComplete + } + + CheckListItem { id: _priming_lines + anchors.horizontalCenter: parent.horizontalCenter + color : Colors.transparent + text : qsTr("Priming lines") + completed: vPriming.primingLinesComplete + } + } + + Text { id: _priming_complete + objectName: "_primingCompleteText" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _checklist.bottom + anchors.topMargin: 45 + text: qsTr("Priming Complete!") + color: vPriming.primingComplete ? Colors.textMain : Colors.transparent + font.pixelSize: Fonts.fontPixelPriming + } + + TouchRect { id : _continueRect + objectName: "_treatmentPrimeContinueButton" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _priming_complete.bottom + anchors.topMargin: 50 + width: 490 + height: 60 + text.text: vPriming.continueBtnText + disabled : false // it has not been implemeted in the FW so it is enabled always. + // /*! vPriming.primingComplete // */vPriming.continueEnabled + onEnabledChanged: { + if (enabled) { + borderColor = Colors.primingReady + textColor = Colors.primingReady + } else { + borderColor = Colors.primingNotReady + textColor = Colors.primingNotReady + } + } + + button.onClicked: { + _root.continueClicked() + } + } +} Index: sources/gui/qml/pages/pretreatment/prime/PreTreatmentUltrafiltration.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/prime/PreTreatmentUltrafiltration.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/prime/PreTreatmentUltrafiltration.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,126 @@ +/*! + * + * 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 PreTreatmentUltrsafiltration.qml + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Peter Lucia + * \date (original) 03-Aug-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment" + +/*! + * \brief Pre-Treatment ultrafiltration screen + * \details which contains a slider to let user set the ultratiltration volume. + */ +PreTreatmentBase { id: _root + objectName: "_PreTreatmentUltrafiltration" + + property alias ufVolume : _volumeSlider.value + + signal startClicked() + + QtObject { id: _private + property real minimum : 0.000 + property real maximum : 8.000 + } + + header.stepName : Variables.preTreatmentStepLabelUltrafiltration + + Text { id: _textTitle + visible : true + color : "white" + text : qsTr("Begin Treatment") + font.pixelSize : Fonts.fontPixelTitle + anchors { + horizontalCenter: parent.horizontalCenter + top : parent.top + topMargin : 150 + } + } + + Text { id: _textLabel + visible : true + color : "white" + text : qsTr("Ultrafiltration Volume") + " " + Variables.unitTextUltrafiltrationVolume + font { + pixelSize : Fonts.fontPixelCreateTreatment + } + anchors { + left : _volumeSlider.left + bottom : _volumeSlider.top + bottomMargin : 45 + } + } + + Text { id: _textValue + visible : true + color : "white" + text : _root.ufVolume.toFixed(Variables.ultrafiltrationPrecision) + font { + pixelSize : Fonts.fontPixelCreateTreatment + } + anchors { + right : _volumeSlider.right + bottom : _volumeSlider.top + bottomMargin : 45 + } + } + + Slider { id: _volumeSlider + objectName: "_volumeSlider" + anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top + topMargin: 425 + } + isActive: false + width : parent.width / 2 + height : 5 + step : 0.100 + stepSnap: true + ticks : false + diameter: Variables.sliderCircleDiameter + decimal : Variables.ultrafiltrationPrecision + minimum : _private.minimum + maximum : _private.maximum + minText.font.pixelSize: Fonts.fontPixelFluidText + maxText.font.pixelSize: Fonts.fontPixelFluidText + onPressed: isActive = true + } + + + TouchRect { id: _startButton + objectName: "_startButton" + width : 515 + height : 70 + anchors { + top: parent.top + topMargin: 650 + horizontalCenter: parent.horizontalCenter + } + disabled: ! _volumeSlider.isActive + backgroundColor: Colors.backgroundButtonSelect + text { + text: qsTr("START") + font.weight : Font .DemiBold + font.pixelSize: Fonts.fontPixelUltrafiltrationAdjustmentButton + } + onClicked: { + _root.startClicked() + } + } +} Fisheye: Tag c15ce613e372838316d42c40a86953e6f0aa05d3 refers to a dead (removed) revision in file `sources/gui/qml/pages/treatment/TreatmentHome.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rd6dc1cd63d86d7d4f4c4d05958bec4f870783f41 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision d6dc1cd63d86d7d4f4c4d05958bec4f870783f41) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -7,7 +7,7 @@ * * \file TreatmentStack.qml * \author (last) Behrouz NematiPour - * \date (last) 09-Feb-2021 + * \date (last) 28-Feb-2021 * \author (original) Behrouz NematiPour * \date (original) 27-Jan-2020 * @@ -20,7 +20,7 @@ import "qrc:/globals" import "qrc:/components" import "qrc:/pages/treatment/adjustments" -import "qrc:/pages/pretreatment/create" +import "qrc:/pages/pretreatment" import "qrc:/pages/posttreatment" /*! @@ -32,7 +32,7 @@ StackItem { id : _root objectName: "TreatmentStack" - stackView.initialItem : _treatmentHome + stackView.initialItem : null // ultrafiltration state information bar properties readonly property bool isUFPaused : vHDTreatmentStates.ufPaused @@ -51,6 +51,8 @@ readonly property bool isSBInProgress : ( vHDTreatmentStates.sbRunning || vHDTreatmentStates.sbWaitPump ) + signal backClicked + // Components MainMenu { id: _treatmentMenu y : Variables.mainMenuHeight * -1 @@ -64,19 +66,12 @@ hasLogo : true } - // Blood Prime - PostTreatmentBloodPrime { id: _postTreatmentBloodPrime } // only one page, no stack for now. - PostTreatmentRinsebackStack { id: _postTreatmentRinsebackStack } - PostTreatmentRecirculateStack { id: _postTreatmentRecirculateStack } - PostTreatmentEndStack { id: _postTreatmentEndStack } - TreatmentHome { id: _treatmentHome - onTreatmentStarted : push( _treatmentStart ) - onTreatmentCreated : vTreatmentCreate.doSelectParameters() - } - - TreatmentStart { id: _treatmentStart - onBackClicked : pop( _treatmentHome ) + TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem } + TreatmentStart { id: _treatmentStart + onBackClicked : { + _root.backClicked() + } onSectionFlowClicked : { _treatmentAdjustmentFlow.open() } @@ -91,34 +86,10 @@ _treatmentAdjustmentDuration.open() } onSectionUltrafiltrationClicked: { - if ( isUFRunning ) { - _treatmentAdjustmentUltrafiltrationStart .open() - } else { - _treatmentAdjustmentUltrafiltrationPaused.open() - } + _treatmentUltrafiltrationItem.open() } } - PreTreatmentCreate { id: _pretreatmentCreate - onBackClicked : {vTreatmentCreate.doCancelSelectingParameters() } - onContinueClicked : {vTreatmentCreate.doFinishedCreate(); } - } - - PreTreatmentConfirm { id: _pretreatmentConfirm - onBackClicked : {vTreatmentCreate.doCancelConfirmParameters() } - onConfirmClicked : {vTreatmentCreate.doFinishedConfirm(); } - } - - PreTreatmentPrime { id: _pretreatmentPrime - onBackClicked : {vTreatmentCreate.doRequestPop() } - onContinueClicked : {vTreatmentCreate.doFinishedPrime(); } - } - - PreTreatmentUltrafiltration { id: _pretreatmentUltrafiltration - onBackClicked : {vTreatmentCreate.doRequestPop() } - onStartClicked : {vTreatmentAdjustmentUltrafiltrationInit.doAdjustment(_pretreatmentUltrafiltration.ufVolume) } - } - //// Treatment Adjustment Dialogs TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow onCloseClicked : close() @@ -156,64 +127,7 @@ onConfirmClicked : vTreatmentAdjustmentDuration.doAdjustment(durationValue) } - TreatmentAdjustmentUltrafiltrationStart { id: _treatmentAdjustmentUltrafiltrationStart - onCloseClicked : close() - onPauseClicked : { - // send pause to HD and wait. - // if accepted close() - // not accepted show error in notification - vTreatmentAdjustmentUltrafiltrationState.doPause() - } - } - - TreatmentAdjustmentUltrafiltrationPaused { id: _treatmentAdjustmentUltrafiltrationPaused - onCloseClicked : close() - onEditClicked : { - close() - _treatmentAdjustmentUltrafiltrationEdit.reset() // reset the slider to minimum value position - _treatmentAdjustmentUltrafiltrationEdit.open() - } - onResumeClicked : { - // send resume to HD and wait. - // if accepted close() - // not accepted show error in notification - vTreatmentAdjustmentUltrafiltrationState.doResume() - } - } - - TreatmentAdjustmentUltrafiltrationEdit { id: _treatmentAdjustmentUltrafiltrationEdit - onBackClicked : { - close() - _treatmentAdjustmentUltrafiltrationPaused.open() - } - onNextClicked : { - // send Volume to HD and wait. - // if accepted close() - // not accepted show error in notification - vTreatmentAdjustmentUltrafiltrationEdit.doAdjustment(vVolume) - } - } - - TreatmentAdjustmentUltrafiltrationConfirm { id: _treatmentAdjustmentUltrafiltrationConfirm - onBackClicked : { - close() - _treatmentAdjustmentUltrafiltrationEdit.open () - } - onConfirmRateClicked : { - vTreatmentAdjustmentUltrafiltrationConfirm.doOptionRate(vVolume) - } - onConfirmDurationClicked: { - vTreatmentAdjustmentUltrafiltrationConfirm.doOptionDuration(vVolume) - } - } - // ---------- Manages Responses ---------- - Connections { target: vHDOperationMode - onStandbyChanged : { - pop( _treatmentHome ) - } - } - Connections { target: vTreatmentAdjustmentDuration onAdjustmentTriggered : { if ( vTreatmentAdjustmentDuration.adjustment_Accepted ) { @@ -226,71 +140,6 @@ } } - Connections { target: vTreatmentAdjustmentUltrafiltrationInit - onAdjustmentTriggered : { - // the maximum ultrafiltration volume has to be set/revert regardless - vTreatmentUltrafiltration.maximum = vTreatmentAdjustmentUltrafiltrationInit.volume - _pretreatmentUltrafiltration.ufVolume = vTreatmentAdjustmentUltrafiltrationInit.volume - // but only if it has been accepted it will navigate - if (vTreatmentAdjustmentUltrafiltrationInit.adjustment_Accepted) { - vTreatmentCreate.doStartTreatment() - } - else { - _pretreatmentUltrafiltration.reasonText = vTreatmentAdjustmentUltrafiltrationInit.text() - } - } - } - - Connections { target: vTreatmentAdjustmentUltrafiltrationState - onAdjustmentTriggered : { - if ( vTreatmentAdjustmentUltrafiltrationState.adjustment_Accepted ) { - if (vHDTreatmentStates.ufPaused) { // handle screen regarding current accepted - _treatmentAdjustmentUltrafiltrationStart .close() - _treatmentAdjustmentUltrafiltrationPaused.open () - } else { - _treatmentAdjustmentUltrafiltrationPaused.close() - } - } - else { - if (vHDTreatmentStates.ufRunning) { // handle error messages regarding current accepted - _treatmentAdjustmentUltrafiltrationStart.notificationText = vTreatmentAdjustmentUltrafiltrationState.adjustment_ReasonText - } else { - _treatmentAdjustmentUltrafiltrationPaused.notificationText = vTreatmentAdjustmentUltrafiltrationState.adjustment_ReasonText - } - } - } - } - - Connections { target: vTreatmentAdjustmentUltrafiltrationEdit - onAdjustmentTriggered : { - if (vTreatmentAdjustmentUltrafiltrationEdit.adjustment_Accepted) { - _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationVolume = vTreatmentAdjustmentUltrafiltrationEdit.volume - _treatmentAdjustmentUltrafiltrationConfirm.treatmentDuration = vTreatmentAdjustmentUltrafiltrationEdit.duration - _treatmentAdjustmentUltrafiltrationConfirm.treatmentDurationDiff = vTreatmentAdjustmentUltrafiltrationEdit.durationDiff - _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationRate = vTreatmentAdjustmentUltrafiltrationEdit.rate - _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationRateDiff = vTreatmentAdjustmentUltrafiltrationEdit.rateDiff - _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationRateOld = vTreatmentAdjustmentUltrafiltrationEdit.rateOld - - _treatmentAdjustmentUltrafiltrationEdit .close() - _treatmentAdjustmentUltrafiltrationConfirm.reset() - _treatmentAdjustmentUltrafiltrationConfirm.open () - } else { - _treatmentAdjustmentUltrafiltrationEdit.notification.text = vTreatmentAdjustmentUltrafiltrationEdit.text() - } - } - } - - Connections { target: vTreatmentAdjustmentUltrafiltrationConfirm - onAdjustmentTriggered : { - if (vTreatmentAdjustmentUltrafiltrationConfirm.adjustment_Accepted) { - vTreatmentUltrafiltration.maximum = vTreatmentAdjustmentUltrafiltrationConfirm.volume - _treatmentAdjustmentUltrafiltrationConfirm.close() - } else { - _treatmentAdjustmentUltrafiltrationConfirm.notification.text = vTreatmentAdjustmentUltrafiltrationConfirm.text() - } - } - } - Connections { target: vTreatmentAdjustmentPressuresLimits onAdjustmentTriggered : { // values have to be update even when rejected HD is reverting back the values. @@ -309,34 +158,17 @@ } } - Connections { target: vTreatmentCreate - onShowCreate : { push(_pretreatmentCreate) } - onShowConfirm : { push(_pretreatmentConfirm) } - onShowPrime : { push(_pretreatmentPrime) } - onShowBegin : { push(_pretreatmentUltrafiltration) } - onPop : { pop() } - onShowTreatmentStart : { push(_treatmentStart) } + Connections { target: vHDOperationMode + onInTreatmentChanged : { if ( vinTreatment ) { 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 - // Blood Prime - onTxBloodPrimeChanged : { if ( vtxBloodPrime ) { page( _postTreatmentBloodPrime )}} - onBpRampChanged : { if ( vbpRamp ) { /* No action defined yet */ }} - // in-Treatmet - onTxDialysisChanged : { if ( vtxDialysis ) { page( _treatmentStart )}} + onTxDialysisChanged : { if ( vtxDialysis ) { push( _treatmentStart )}} + } - onTxRinsebackChanged : { if ( vtxRinseback ) { page( _postTreatmentRinsebackStack )}} - onTxRecirculateChanged : { if ( vtxRecirculate ) { page( _postTreatmentRecirculateStack )}} - onTxEndChanged : { if ( vtxEnd ) { page( _postTreatmentEndStack )}} - - // Treatment Stop - onTxStopChanged : { if ( vtxStop ) { page( _treatmentStart )}} - onTsRecirculateChanged : { if ( vtsRecirculate ) { /* No action defined yet */ }} - onTsRecirculateNoChanged: { if ( vtsRecirculateNo ) { /* No action defined yet */ }} + Connections { target: _mainHome + onTreatmentStarted : push( _treatmentStart ) + onVisibleChanged : if (_mainHome.visible) _treatmentMenu.hidden = true } } Index: sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml (revision 0) +++ sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -0,0 +1,139 @@ +/*! + * + * 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 TreatmentUltrafiltrationItem.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 28-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/treatment/adjustments" +/*! + * \brief the treatment ultrafiltration flow manager screen + */ +Item { id: _root + objectName: "_TreatmentUltrafiltration" + anchors.fill: parent + function open() { + if ( isUFRunning ) { + _treatmentAdjustmentUltrafiltrationStart .open() + } else { + _treatmentAdjustmentUltrafiltrationPaused.open() + } + } + + TreatmentAdjustmentUltrafiltrationStart { id: _treatmentAdjustmentUltrafiltrationStart + onCloseClicked : close() + onPauseClicked : { + // send pause to HD and wait. + // if accepted close() + // not accepted show error in notification + vTreatmentAdjustmentUltrafiltrationState.doPause() + } + } + + TreatmentAdjustmentUltrafiltrationPaused { id: _treatmentAdjustmentUltrafiltrationPaused + onCloseClicked : close() + onEditClicked : { + close() + _treatmentAdjustmentUltrafiltrationEdit.reset() // reset the slider to minimum value position + _treatmentAdjustmentUltrafiltrationEdit.open() + } + onResumeClicked : { + // send resume to HD and wait. + // if accepted close() + // not accepted show error in notification + vTreatmentAdjustmentUltrafiltrationState.doResume() + } + } + + TreatmentAdjustmentUltrafiltrationEdit { id: _treatmentAdjustmentUltrafiltrationEdit + onBackClicked : { + close() + _treatmentAdjustmentUltrafiltrationPaused.open() + } + onNextClicked : { + // send Volume to HD and wait. + // if accepted close() + // not accepted show error in notification + vTreatmentAdjustmentUltrafiltrationEdit.doAdjustment(vVolume) + } + } + + TreatmentAdjustmentUltrafiltrationConfirm { id: _treatmentAdjustmentUltrafiltrationConfirm + onBackClicked : { + close() + _treatmentAdjustmentUltrafiltrationEdit.open () + } + onConfirmRateClicked : { + vTreatmentAdjustmentUltrafiltrationConfirm.doOptionRate(vVolume) + } + onConfirmDurationClicked: { + vTreatmentAdjustmentUltrafiltrationConfirm.doOptionDuration(vVolume) + } + } + + Connections { target: vTreatmentAdjustmentUltrafiltrationState + onAdjustmentTriggered : { + if ( vTreatmentAdjustmentUltrafiltrationState.adjustment_Accepted ) { + if (vHDTreatmentStates.ufPaused) { // handle screen regarding current accepted + _treatmentAdjustmentUltrafiltrationStart .close() + _treatmentAdjustmentUltrafiltrationPaused.open () + } else { + _treatmentAdjustmentUltrafiltrationPaused.close() + } + } + else { + if (vHDTreatmentStates.ufRunning) { // handle error messages regarding current accepted + _treatmentAdjustmentUltrafiltrationStart.notificationText = vTreatmentAdjustmentUltrafiltrationState.adjustment_ReasonText + } else { + _treatmentAdjustmentUltrafiltrationPaused.notificationText = vTreatmentAdjustmentUltrafiltrationState.adjustment_ReasonText + } + } + } + } + + Connections { target: vTreatmentAdjustmentUltrafiltrationEdit + onAdjustmentTriggered : { + if (vTreatmentAdjustmentUltrafiltrationEdit.adjustment_Accepted) { + _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationVolume = vTreatmentAdjustmentUltrafiltrationEdit.volume + _treatmentAdjustmentUltrafiltrationConfirm.treatmentDuration = vTreatmentAdjustmentUltrafiltrationEdit.duration + _treatmentAdjustmentUltrafiltrationConfirm.treatmentDurationDiff = vTreatmentAdjustmentUltrafiltrationEdit.durationDiff + _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationRate = vTreatmentAdjustmentUltrafiltrationEdit.rate + _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationRateDiff = vTreatmentAdjustmentUltrafiltrationEdit.rateDiff + _treatmentAdjustmentUltrafiltrationConfirm.ultrafiltrationRateOld = vTreatmentAdjustmentUltrafiltrationEdit.rateOld + + _treatmentAdjustmentUltrafiltrationEdit .close() + _treatmentAdjustmentUltrafiltrationConfirm.reset() + _treatmentAdjustmentUltrafiltrationConfirm.open () + } else { + _treatmentAdjustmentUltrafiltrationEdit.notification.text = vTreatmentAdjustmentUltrafiltrationEdit.text() + } + } + } + + Connections { target: vTreatmentAdjustmentUltrafiltrationConfirm + onAdjustmentTriggered : { + if (vTreatmentAdjustmentUltrafiltrationConfirm.adjustment_Accepted) { + vTreatmentUltrafiltration.maximum = vTreatmentAdjustmentUltrafiltrationConfirm.volume + _treatmentAdjustmentUltrafiltrationConfirm.close() + } else { + _treatmentAdjustmentUltrafiltrationConfirm.notification.text = vTreatmentAdjustmentUltrafiltrationConfirm.text() + } + } + } + +} Index: sources/model/MPowerOff.h =================================================================== diff -u -r6cad9b004e904200b71de7431c745795256080df -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/model/MPowerOff.h (.../MPowerOff.h) (revision 6cad9b004e904200b71de7431c745795256080df) +++ sources/model/MPowerOff.h (.../MPowerOff.h) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -29,7 +29,7 @@ * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------:| - * |0x0100| 0x020 | 6 | Cmd | N | HD | UI | Power Off | + * |0x1000| 0x020 | 6 | Cmd | N | HD | UI | Power Off | * * | Payload || * | || Index: sources/model/MStartTreatmentResponse.h =================================================================== diff -u -r1f8abdd821041623392d18cf4f80cad9ae1bf246 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/model/MStartTreatmentResponse.h (.../MStartTreatmentResponse.h) (revision 1f8abdd821041623392d18cf4f80cad9ae1bf246) +++ sources/model/MStartTreatmentResponse.h (.../MStartTreatmentResponse.h) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -1,6 +1,3 @@ -#ifndef MSTARTTREATMENTRESPONSE_H -#define MSTARTTREATMENTRESPONSE_H - #pragma once // Qt @@ -46,18 +43,18 @@ QVariantList parameters() const override; struct { - Types::U32 startTreatmentResponse; + Types::U32 startTreatmentResponse ; Types::U32 startTreatmentRejectReason; } _data; public: - Type_Enum typeText () const override { return Type_Enum::eEvent ; } - Unit_Enum unitText () const override { return Unit_Enum::eHD ; } - QString infoText () const override { return QString("StartTreatmentResponse"); } + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + QString infoText () const override { return QString("StartTreatmentResponse" ); } struct Data { - quint32 startTreatmentResponse = 0; + quint32 startTreatmentResponse = 0; quint32 startTreatmentRejectReason = 0; }; @@ -69,5 +66,3 @@ } typedef Model::MStartTreatmentResponse::Data StartTreatmentResponseData; - -#endif // MSTARTTREATMENTRESPONSE_H Index: sources/model/MTreatmentParametersResp.h =================================================================== diff -u -r95a840fc93f1a2cd65732d835fad2aca0f03f28e -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/model/MTreatmentParametersResp.h (.../MTreatmentParametersResp.h) (revision 95a840fc93f1a2cd65732d835fad2aca0f03f28e) +++ sources/model/MTreatmentParametersResp.h (.../MTreatmentParametersResp.h) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -12,9 +12,9 @@ * \date (original) 08-Sep-2020 * */ -#ifndef MTREATMENTPARAMETERSRESP_H -#define MTREATMENTPARAMETERSRESP_H +#pragma once + // Qt // Project @@ -31,11 +31,11 @@ * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:------------------------------: | - * |0x3500| 0x020 | 6 | Rsp | Y | HD | UI | Treatment Parameters Response | + * |0x3600| 0x020 | 6 | Rsp | Y | HD | UI | Treatment Parameters Response | * * | Payload || * | || - * | #1:(U32) | \ref Data::requestValid | + * | #1:(U32) | \ref Data::requestValid | * | #2:(U32) | \ref Data::bloodFlowRate | * | #3:(U32) | \ref Data::dialysateFlowRate | * | #4:(U32) | \ref Data::duration | @@ -126,4 +126,3 @@ } typedef Model::MTreatmentParametersResponse::Data AdjustTreatmentParametersResponseData; -#endif // MTREATMENTPARAMETERSRESP_H Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -r0b8e00869ef81ef0a834c03c13049f4c281870d2 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 0b8e00869ef81ef0a834c03c13049f4c281870d2) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -585,9 +585,9 @@ * \brief The MStartTreatmentReq class * \details The model to request starting a treatment * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| - * | 56 | 0x100 | 9 | Req | Y | UI | HD | Start Treatment Request | + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * |0x3800| 0x100 | 9 | Req | Y | UI | HD | Start Treatment Request | * * | Payload || * | || Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -ra3030123e885fb9f22dea5839c4e988896a257e4 -rc15ce613e372838316d42c40a86953e6f0aa05d3 --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision a3030123e885fb9f22dea5839c4e988896a257e4) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) @@ -333,14 +333,15 @@ if (success) { emit fwValidationSuccess(); - goToNextPage(true); + + // goToNextPage(true); } return success; } /** - * @brief VCreateTreatment::doActionReceive + * \brief VCreateTreatment::doActionReceive * Called when we receive a response back from firmware after requesting * to start selecting treatment parameters, cancel, or start the treatment * @param messageData @@ -351,17 +352,19 @@ if (messageData.startTreatmentResponse != 1) return; - if (startTreatmentRequest.request == StartTreatmentRequestData::eCancel) - goToNextPage(false); - else - goToNextPage(true); + if (startTreatmentRequest.request == StartTreatmentRequestData::eCancel) { + //goToNextPage(false); + } + else { + //goToNextPage(true); + } } /** - * @brief VCreateTreatment::getNextPage - * Updates the current page to the next page after - * moving forward or backward - * @param forward - (bool) true if moving forward, if false pop the page + * \brief VCreateTreatment::getNextPage + * \details Updates the current page to the next page after + * moving forward or backward + * \param forward - (bool) true if moving forward, if false pop the page */ void VTreatmentCreate::goToNextPage(bool forward) { @@ -429,15 +432,13 @@ // coco end /** - * \brief VCreateTreatment::onFinishedConfirm - * Emits treatment data to gui controller, - * who emits to application controller and the - * application controller will save the data to disk. + * \brief VCreateTreatment::onFinishedConfirm + * \details Emits treatment data to gui controller, + * who emits to application controller and the + * application controller will save the data to disk. + * \note Finished create treatment confirm... */ void VTreatmentCreate::doFinishedConfirm() { - qDebug() << "Finished create treatment confirm..."; - - QJsonObject obj { {"bloodFlowRate", QString::number(treatmentData.bloodFlowRate)}, {"dialysateFlowRate", QString::number(treatmentData.dialysateFlowRate)}, @@ -467,13 +468,13 @@ emit requestConfirm(confirmTreatmentRequest); // no FW response required - goToNextPage(true); + // goToNextPage(true); } /** - * \brief ApplicationController::saveNewTreatment - * Saves a new treatment to the filesystem. - * \param doc - QJsonDocument containing the new treatment parameters. + * \brief ApplicationController::saveNewTreatment + * \details Saves a new treatment to the file system. + * \param doc - QJsonDocument containing the new treatment parameters. * \returns QString - the file to be written to * */ @@ -491,9 +492,9 @@ } /** - * @brief VCreateTreatment::getParameterRangesDataCSV - * Gets the parameter ranges data prepared for CSV file format - * @return QString - the data to write to CSV + * \brief VCreateTreatment::getParameterRangesDataCSV + * \details Gets the parameter ranges data prepared for CSV file format + * \return QString - the data to write to CSV */ QString VTreatmentCreate::getParameterRangesDataCSV() { @@ -536,15 +537,14 @@ } /*! - * \brief VCreateTreatment::saveTreatmentRangesCSV - * Saves the treatment ranges to a CSV file - * \param filename - the csv file to save the ranges to - * \return bool - true if successful, false otherwise + * \brief VCreateTreatment::saveTreatmentRangesCSV + * \details Saves the treatment ranges to a CSV file + * \param filename - the csv file to save the ranges to + * \return bool - true if successful, false otherwise */ bool VTreatmentCreate::saveTreatmentRangesCSV(const QString &filename) { QString csvData = getParameterRangesDataCSV(); - return FileHandler::write(filename, csvData); } @@ -558,19 +558,18 @@ } /** - * \brief VCreateTreatment::onFnishedPrime - * Called when priming qml selections are complete. - * TODO: Placed here for now. Likely will be moved eventually. + * \brief VCreateTreatment::onFnishedPrime + * \details Called when priming qml selections are complete. + * \note Finished create treatment prime... + * \todo Placed here for now. Likely will be moved eventually. */ void VTreatmentCreate::doFinishedPrime() { - qDebug() << "Finished create treatment prime..."; - - goToNextPage(true); + // goToNextPage(true); } /** - * \brief VCreateTreatment::start - * Called when user is ready to begin a new treatment. + * \brief VCreateTreatment::start + * \details Called when user is ready to begin a new treatment. */ void VTreatmentCreate::doStartTreatment() { qDebug() << "Requesting to start a treatment..."; @@ -579,10 +578,10 @@ } /** - * \brief VCreateTreatment::validate - * Validates the create new treatment input. - * \param vData - the selected TreatmentParametersData - * \return true on success, false otherwise. + * \brief VCreateTreatment::validate + * \details Validates the create new treatment input. + * \param vData - the selected TreatmentParametersData + * \return true on success, false otherwise. */ bool VTreatmentCreate::validate(const AdjustTreatmentParametersRequestData &vData) { @@ -750,11 +749,11 @@ } /** - * \brief VCreateTreatment::indexInItems - * Checks if the index is in the QStringList - * \param idx (int) the index - * \param items (QStringList) The list of strings to check - * \return True if it is in the list, false otherwise + * \brief VCreateTreatment::indexInItems + * \details Checks if the index is in the QStringList + * \param idx (int) the index + * \param items (QStringList) The list of strings to check + * \return True if it is in the list, false otherwise */ bool VTreatmentCreate::indexInItems(quint32 idx, const QStringList &items) { @@ -777,9 +776,9 @@ } /*! - * \brief VCreateTreatment::doGetPrescriptionParameterNames - * Gets a list of the prescription parameter names. - * \return (QStringList) A list of the prescription parameter names + * \brief VCreateTreatment::doGetPrescriptionParameterNames + * \details Gets a list of the prescription parameter names. + * \return (QStringList) A list of the prescription parameter names */ QStringList VTreatmentCreate::doGetPrescriptionParameterNames() { @@ -794,9 +793,9 @@ } /*! - * \brief VCreateTreatment::doGetPrescriptionParameterValues - * Gets a list of the prescription parameter values - * \return (QStringList) The list of parameter values with units + * \brief VCreateTreatment::doGetPrescriptionParameterValues + * \details Gets a list of the prescription parameter values + * \return (QStringList) The list of parameter values with units */ QStringList VTreatmentCreate::doGetPrescriptionParameterValues() { @@ -829,9 +828,9 @@ } /*! - * \brief VCreateTreatment::doGetOperatingParameterValues - * Gets the operating parameter values - * \return (QStringList) The list of operating parameter values with units where applicable + * \brief VCreateTreatment::doGetOperatingParameterValues + * \details Gets the operating parameter values + * \return (QStringList) The list of operating parameter values with units where applicable */ QStringList VTreatmentCreate::doGetOperatingParameterValues() { @@ -863,45 +862,44 @@ } /** - * @brief VCreateTreatment::doSelectParameters - * Sends a request to FW to start selecting treatment parameters + * \brief VCreateTreatment::doSelectParameters + * \details Sends a request to FW to start selecting treatment parameters + * \note Sending request to FW to select parameters... */ void VTreatmentCreate::doSelectParameters() { - qDebug() << "Sending request to FW to select parameters..."; startTreatmentRequest.request = StartTreatmentRequestData::eSelectParams; emit requestSelectParameters(startTreatmentRequest); } /** - * @brief VCreateTreatment::doCancelSelectingParameters - * Sends a request to FW to cancel selecting parameters + * \brief VCreateTreatment::doCancelSelectingParameters + * \details Sends a request to FW to cancel selecting parameters + * \note Sending request to FW to cancel selecting parameters... */ void VTreatmentCreate::doCancelSelectingParameters() { - qDebug() << "Sending request to FW to cancel selecting parameters..."; startTreatmentRequest.request = StartTreatmentRequestData::eCancel; emit requestSelectParameters(startTreatmentRequest); } /** - * @brief VCreateTreatment::doCancelConfirmParameters - * Notifies FW the user has canceled confirming the treatment parameters + * \brief VCreateTreatment::doCancelConfirmParameters + * \details Notifies FW the user has canceled confirming the treatment parameters + * \note Telling FW user is canceling confirm treatment parameters... */ void VTreatmentCreate::doCancelConfirmParameters() { - // Tell FW we cancel confirm - qDebug() << "Telling FW user is canceling confirm treatment parameters..."; confirmTreatmentRequest.request = ConfirmTreatmentRequestData::eCancel; emit requestConfirm(confirmTreatmentRequest); - goToNextPage(false); + // goToNextPage(false); } /** - * @brief VCreateTreatment::doRequestPop - * Navigates backward in the create treatment process. + * \brief VCreateTreatment::doRequestPop + * \details Navigates backward in the create treatment process. */ void VTreatmentCreate::doRequestPop() { - goToNextPage(false); + // goToNextPage(false); }