Index: sources/gui/qml/PowerItem.qml =================================================================== diff -u -r8b3412f64e23b66afa795a95ebc85107358e8070 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 8b3412f64e23b66afa795a95ebc85107358e8070) +++ sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2023 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) 23-Nov-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" @@ -38,10 +35,9 @@ property bool isOpen: false - VConfirm { id: vConfirm } AutoHideInfo { id: _autoHideInfo } - PowerOff { id: _powerOffDialog + ConfirmDialog { id: _powerOffDialog idText : vConfirm.id titleText : vConfirm.title messageText : vConfirm.message @@ -52,6 +48,7 @@ autoClose : vConfirm.isPowerOff || vConfirm.isReject onVisibleChanged: { + _root.isOpen = visible if (visible) _alarmItem.alarmHide() else _alarmItem.alarmMaximize() } @@ -76,6 +73,7 @@ function open() { _root.isOpen = true _powerOffDialog.open() + _confirmDialog.close() // close the user confirmation dialog if the power off is requested _alarmItem.alarmMinimize() }