Index: sources/gui/qml/main.qml =================================================================== diff -u -r95c671ab7037af055db551456a719ff67bf10262 -r8f71000a841da5e8f18efccbb30a7655d3a211cd --- sources/gui/qml/main.qml (.../main.qml) (revision 95c671ab7037af055db551456a719ff67bf10262) +++ sources/gui/qml/main.qml (.../main.qml) (revision 8f71000a841da5e8f18efccbb30a7655d3a211cd) @@ -12,45 +12,6 @@ * */ -/* --Item - Circle - LogoD - MainMenu - PlaceHolderText - ProgressCircle - ScreenItem - StackItem - TextRect - TimeText - TouchArea - RangeMarker - --Text - TitleText - --Rectangle - Line - Background - CloseButton - TouchRect - BackButton - ConfirmButton - ExportButton - USBButton - RangeRect - ProgressBar - ProgressBarEx - ProgressRect - Slider - RangeBar - --Dialog - ModalDialog - AutoHideInfo - PowwerOff -*/ - // Qt import QtQuick 2.12 @@ -61,14 +22,23 @@ // TODO : When Testing data on Setting screen is removed // This needs to be moved into the TreatmentFlows.qml -import VTreatmentAdjustmentsResponse 0.1; -import VTreatmentBloodFlow 0.1; -import VTreatmentDialysateFlow 0.1; -import VTreatmentUltrafiltration 0.1; -import VTreatmentTime 0.1; -import VAlarmStatus 0.1; -import VPowerOff 0.1; +import VTreatmentBloodFlow 0.1; +import VTreatmentDialysateFlow 0.1; +import VTreatmentPressureOcclusion 0.1; +import VTreatmentUltrafiltration 0.1; +import VTreatmentTime 0.1; +import VAlarmStatus 0.1; +import VPowerOff 0.1; +import VTreatmentAdjustmentDuration 0.1; +import VTreatmentAdjustmentFlows 0.1; +import VTreatmentAdjustmentUltrafiltrationState 0.1; +import VTreatmentAdjustmentUltrafiltrationEdit 0.1; +import VTreatmentAdjustmentUltrafiltrationConfirm 0.1; + +import VLoadCellReadings 0.1; +import VTemperatureSensors 0.1; + // Qml imports import "qrc:/globals" import "qrc:/pages" @@ -87,55 +57,45 @@ GuiView { id: _GuiView onDidActionReceive: { - //console.debug(vData) + //console.debug(vAction, vData) switch(vAction) { case GuiActions.PowerOffBroadcast: _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 - VTreatmentAdjustmentsResponse { id: vTreatmentAdjustmentsResponse } - VTreatmentBloodFlow { id: vTreatmentBloodFlow } - VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } - VTreatmentUltrafiltration { id: vTreatmentUltrafiltration } - VTreatmentTime { id: vTreatmentTime } - VAlarmStatus { id: vAlarmStatus } - VPowerOff { id: vPowerOff - onPoweroffTriggered: { - switch (vpoweroff) { - case GuiActions.Command: - _powerOffDialog.open() - break; - case GuiActions.Timeout: - _powerOffDialog.close() - break; + VAlarmStatus { id: vAlarmStatus } + VPowerOff { id: vPowerOff } - case GuiActions.Rejected: - _autoHideInfo.showDialog( - qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg() - 2000 // notifies user and hides the dialog - ) - break; + VTreatmentBloodFlow { id: vTreatmentBloodFlow } + VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } + VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } + VTreatmentUltrafiltration { id: vTreatmentUltrafiltration } + VTreatmentTime { id: vTreatmentTime } - } - } - } + VLoadCellReadings { id: vLoadCellReadings } + VTemperatureSensors { id: vTemperatureSensors } + VTreatmentAdjustmentDuration { id: vTreatmentAdjustmentDuration } + VTreatmentAdjustmentFlows { id: vTreatmentAdjustmentFlows } + VTreatmentAdjustmentUltrafiltrationState { id: vTreatmentAdjustmentUltrafiltrationState } + VTreatmentAdjustmentUltrafiltrationEdit { id: vTreatmentAdjustmentUltrafiltrationEdit } + VTreatmentAdjustmentUltrafiltrationConfirm { id: vTreatmentAdjustmentUltrafiltrationConfirm } + // ----- Follow the below Z order ----- // 1 - Screens // 1 - 1 SettingsStack { id: _settingsStack } // 1 - 2 - ManagerStack { id: _mansagerStack } + ManagerStack { id: _managerStack } // 1 - 3 TreatmentStack { id: _treatmentStack } @@ -146,9 +106,9 @@ _treatmentStack.visible = true } onItemPressed: { - _treatmentStack .visible = vIndex == 0; - _mansagerStack .visible = vIndex == 1; - _settingsStack .visible = vIndex == 2; + _treatmentStack.visible = vIndex == 0; + _managerStack .visible = vIndex == 1; + _settingsStack .visible = vIndex == 2; } } @@ -164,7 +124,6 @@ } } - NotificationBar { id: _alarm anchors.bottom: _mainMenu.top level : vAlarmStatus.alarm_Priority @@ -186,4 +145,26 @@ text: Qt.application.version font.pixelSize: 14 } + + 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; + + } + } + } }