Index: leahi.pro =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -r213b9fed4fc569eb85a0647bde9869a3c82c0db3 --- leahi.pro (.../leahi.pro) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ leahi.pro (.../leahi.pro) (revision 213b9fed4fc569eb85a0647bde9869a3c82c0db3) @@ -613,7 +613,6 @@ sources/model/td/data/treatmentlog/MTreatmentLogEventData.cpp \ sources/model/td/data/treatmentlog/MTreatmentLogAvrgeData.cpp \ \ # ---------- Models - TD - Adjustment - sources/model/td/adjustment/MAdjustPowerOff.h \ \ # ---------- Models - TD - Adjustment - In-Treatment sources/model/td/adjustment/treatment/MTreatmentAdjustBloodPrimeResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustBloodFlowRateResponse.cpp \ @@ -658,8 +657,6 @@ \ # ---------- Models - Data - States sources/model/hd/data/pretreatment/MPreTreatmentStatesData.cpp \ sources/model/hd/data/posttreatment/MPostTreatmentStatesData.cpp \ - \ # ---------- Models - TD - Adjustment - sources/model/td/adjustment/MAdjustPowerOff.cpp \ \ # ---------- Models - TD - Adjustment - Settings sources/model/td/adjustment/settings/MAdjustTDDateTimeResponse.cpp \ sources/model/td/adjustment/settings/MTDInstitutionalRecordResponse.cpp \ Index: sources/gui/qml/PowerItem.qml =================================================================== diff -u -rd95ed86d997208024ec79422e350a86a2c52fd85 -r213b9fed4fc569eb85a0647bde9869a3c82c0db3 --- sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision d95ed86d997208024ec79422e350a86a2c52fd85) +++ sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 213b9fed4fc569eb85a0647bde9869a3c82c0db3) @@ -45,29 +45,22 @@ cancelText : vConfirm.cancel confirmVisible : ! vConfirm.isReject notificationText: vConfirm.adjustment_ReasonText - autoClose : vConfirm.isPowerOff || vConfirm.isReject + autoClose : vConfirm.isReject onVisibleChanged: { _root.isOpen = visible if (visible) _alarmItem.alarmHide() else _alarmItem.alarmMaximize() } + onAccepted: { - if ( vConfirm.isPowerOff ) { + if ( ! vConfirm.isReject ) { vConfirm.doConfirm( true ) + shutdownWait() } - else { - if ( ! vConfirm.isReject ) vConfirm.doConfirm( true ) - } } - onRejected: { - if ( vConfirm.isPowerOff ) { - vConfirm.doConfirm( false ) - } - else { - if ( ! vConfirm.isReject ) vConfirm.doConfirm( false ) - } - } + + onRejected: if ( ! vConfirm.isReject ) vConfirm.doConfirm( false ) } function open() { @@ -96,23 +89,17 @@ ) } - // ---- Connections - Connections { target: _GuiView - function onDidActionReceive( 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; - } - } + function shutdownWait() { + _autoHideInfo.showDialog ( + qsTr("System is shutting down"), + 5000 // if any error happens and shutdown is not successful then after 5 seconds dialog hides. + ) } Connections { target: vConfirm function onIsRejectChanged ( vValue ) { _powerOffDialog.footerUpdate() + if ( vValue ) _root.reject() } function onVisibleChanged ( vValue ) { Index: sources/gui/qml/dialogs/AutoHideInfo.qml =================================================================== diff -u -r23f8a6036e22f80c3c5fd2834a2980bb62d2a34d -r213b9fed4fc569eb85a0647bde9869a3c82c0db3 --- sources/gui/qml/dialogs/AutoHideInfo.qml (.../AutoHideInfo.qml) (revision 23f8a6036e22f80c3c5fd2834a2980bb62d2a34d) +++ sources/gui/qml/dialogs/AutoHideInfo.qml (.../AutoHideInfo.qml) (revision 213b9fed4fc569eb85a0647bde9869a3c82c0db3) @@ -33,7 +33,9 @@ property int fontSize : Fonts.fontPixelTitle property int verticalOffset : 0 - autoHide: true + width : Variables.completeDialogWidth + height : Variables.completeDialogHeight + autoHide : true TitleText { id: _titleText anchors.centerIn: parent Index: sources/gui/qml/main.qml =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -r213b9fed4fc569eb85a0647bde9869a3c82c0db3 --- sources/gui/qml/main.qml (.../main.qml) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/gui/qml/main.qml (.../main.qml) (revision 213b9fed4fc569eb85a0647bde9869a3c82c0db3) @@ -436,7 +436,7 @@ AlarmItem { id: _alarmItem ; z: 996 } PowerItem { id: _powerItem ; z: 997 } ConfirmDialog { id: _confirmDialog ; z: 998 } - DryDemoDialog { id: _dryDemoDialog; z: 999 } + DryDemoDialog { id: _dryDemoDialog ; z: 999 } DiagnosticsDialog { id: _diagnosticsDialog; z: 999 } // Note: NotificationBar has to be anchored to the main menu and if it is moved into the AlarmItem