Index: sources/gui/qml/PowerItem.qml =================================================================== diff -u -rf68b226e67eb500758ee94fe015df48931240013 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision f68b226e67eb500758ee94fe015df48931240013) +++ sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2024 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) 10-Oct-2022 + * \date (last) 30-Aug-2023 * \author (original) Behrouz NematiPour * \date (original) 01-Mar-2021 * @@ -21,9 +21,6 @@ import Gui.View 0.1 import Gui.Actions 0.1 -// Confirm -import VConfirm 0.1 - // Qml imports import "qrc:/globals" import "qrc:/components" @@ -36,10 +33,11 @@ Item { id: _root anchors.fill: parent - VConfirm { id: vConfirm } + property bool isOpen: false + AutoHideInfo { id: _autoHideInfo } - PowerOff { id: _powerOffDialog + ConfirmDialog { id: _powerOffDialog idText : vConfirm.id titleText : vConfirm.title messageText : vConfirm.message @@ -50,6 +48,7 @@ autoClose : vConfirm.isPowerOff || vConfirm.isReject onVisibleChanged: { + _root.isOpen = visible if (visible) _alarmItem.alarmHide() else _alarmItem.alarmMaximize() } @@ -72,16 +71,20 @@ } function open() { + _root.isOpen = true _powerOffDialog.open() + _confirmDialog.close() // close the user confirmation dialog if the power off is requested _alarmItem.alarmMinimize() } function close() { + _root.isOpen = false _powerOffDialog.close() _alarmItem.alarmMaximize() } function cancel() { + _root.isOpen = false _powerOffDialog.close() if ( vConfirm.needConfirm ) vConfirm.doConfirm( false ) }