Index: sources/gui/qml/main.qml =================================================================== diff -u -r4a6abe765f03feae8100ec660aa04aa218d4dfa3 -r595ed1fbe8066960afd4c8fea168208e81b173d9 --- sources/gui/qml/main.qml (.../main.qml) (revision 4a6abe765f03feae8100ec660aa04aa218d4dfa3) +++ sources/gui/qml/main.qml (.../main.qml) (revision 595ed1fbe8066960afd4c8fea168208e81b173d9) @@ -23,10 +23,12 @@ // TODO : When Testing data on Setting screen is removed // This needs to be moved into the TreatmentFlows.qml -import Gui.VTreatmentFlows 0.1; -import Gui.VTreatmentUltrafiltration 0.1; -import Gui.VTreatmentTime 0.1; -import Gui.VAlarmStatus 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; // Qml imports import "qrc:/globals" @@ -54,32 +56,36 @@ 5000 // if there is any error happening then after 5 seconds dialog hides. ) break; - - case GuiActions.PowerOff: - if (vData[GuiActions.PowerOff_ShowHide] === GuiActions.Command) { - _powerOffDialog.open() - } - if (vData[GuiActions.PowerOff_ShowHide] === GuiActions.Timeout) { - _powerOffDialog.close() - } - if (vData[GuiActions.PowerOff_ShowHide] === GuiActions.Rejected) { - _autoHideInfo.showDialog( - qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg() - 1000 // if there is any error happening then after 5 seconds dialog hides. - ) - } - break; - } } } // TODO : When Testing data on Setting screen is removed // This needs to be moved into the TreatmentFlows.qml - VTreatmentFlows { id: vTreatmentFlows } + VTreatmentBloodFlow { id: vTreatmentBloodFlow } + VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } VTreatmentUltrafiltration { id: vTreatmentUltrafiltration } VTreatmentTime { id: vTreatmentTime } VAlarmStatus { id: vAlarmStatus } + VPowerOff { id: vPowerOff + onPoweroff_statusChanged: { + console.debug("vpoweroff_status", vpoweroff_status) + switch (vpoweroff_status) { + case GuiActions.Command: + _powerOffDialog.open() + break; + case GuiActions.Timeout: + _powerOffDialog.close() + break; + case GuiActions.Rejected: + _autoHideInfo.showDialog( + qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg() + 1000 // if there is any error happening then after 5 seconds dialog hides. + ) + break; + } + } + } // ----- Follow the below Z order ----- // 1 - Screens