Index: sources/gui/qml/main.qml =================================================================== diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r56eea041fb0995182b3d3ea0c0ac19e4933a2d3d --- sources/gui/qml/main.qml (.../main.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8) +++ sources/gui/qml/main.qml (.../main.qml) (revision 56eea041fb0995182b3d3ea0c0ac19e4933a2d3d) @@ -40,12 +40,28 @@ onDidActionReceive: { //console.debug(vData) switch(vAction) { + case GuiActions.PowerOffBroadcast: + _autoHideInfo.showDialog( + qsTr("System is shutting down"), + 5000 // if there is any error happening then after 5 seconds dialog hides. + ) + break; + case GuiActions.PowerOff: - if (vData[GuiActions.PowerOff_ShowHide] === GuiActions.Command) + if (vData[GuiActions.PowerOff_ShowHide] === GuiActions.Command) { _powerOffDialog.open() - if (vData[GuiActions.PowerOff_ShowHide] === GuiActions.Timeout) + } + 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; + } } } @@ -73,6 +89,8 @@ } // 4 - Modals + AutoHideInfo { id: _autoHideInfo } + PowerOff { id: _powerOffDialog onAccepted: { _GuiView.doActionTransmit(GuiActions.PowerOff, GuiActions.Accepted)