Index: denali.pro.user =================================================================== diff -u -r94f7349bd073a732dba5295250fc0e26f740743c -r1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829 --- denali.pro.user (.../denali.pro.user) (revision 94f7349bd073a732dba5295250fc0e26f740743c) +++ denali.pro.user (.../denali.pro.user) (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -68,7 +68,7 @@ Qt 5.12.5 (iMX8) Qt 5.12.5 (iMX8) {5d6458ef-f917-4aef-a092-c77bbe106149} - 1 + 0 0 0 Index: denali.qrc =================================================================== diff -u -r94f7349bd073a732dba5295250fc0e26f740743c -r1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829 --- denali.qrc (.../denali.qrc) (revision 94f7349bd073a732dba5295250fc0e26f740743c) +++ denali.qrc (.../denali.qrc) (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829) @@ -7,6 +7,7 @@ sources/gui/qml/dialogs/PowerOff.qml + sources/gui/qml/dialogs/AutoHideInfo.qml resources/images/Settings_gear_setting_tools-128.png Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -r94f7349bd073a732dba5295250fc0e26f740743c -r1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829 --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 94f7349bd073a732dba5295250fc0e26f740743c) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829) @@ -25,6 +25,9 @@ * \brief The parent item for modal dialogs */ Dialog { id : _root + property bool autoHide : false + property int autoHideDuration : 1000 + width : Variables.poweroffWidth height : Variables.poweroffHeight visible : false @@ -48,4 +51,24 @@ color : Colors.backgroundDialog radius: Variables.dialogRadius } + + onVisibleChanged: { + if (autoHide && visible) { + _autoHideAnimation.start() + console.debug("_autoHideAnimation started") + } + } + + + NumberAnimation { id: _autoHideAnimation + running: false + target: _root + property: "opacity" + duration: autoHideDuration + //easing.type: Easing.InOutQuad + onFinished: { + console.debug("_autoHideAnimation finished") + _root.visible = false + } + } } Index: sources/gui/qml/dialogs/AutoHideInfo.qml =================================================================== diff -u --- sources/gui/qml/dialogs/AutoHideInfo.qml (revision 0) +++ sources/gui/qml/dialogs/AutoHideInfo.qml (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829) @@ -0,0 +1,39 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright \n + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n + * IN PART OR IN WHOLE, \n + * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n + * + * \file AutoHideInfo.qml + * \date 2020/02/11 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief Contains the and Auto Hide Dialog Implementation + * for a quick information for user + * and will be hidden in a second + */ +ModalDialog { id : _root + property string message: "" + + autoHide: true + + TitleText { id: _titleText + anchors.centerIn: parent + width: parent.width + text: message + } +} Index: sources/gui/qml/main.qml =================================================================== diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829 --- sources/gui/qml/main.qml (.../main.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8) +++ sources/gui/qml/main.qml (.../main.qml) (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829) @@ -73,6 +73,10 @@ } // 4 - Modals + AutoHideInfo { id: _autoHideInfo + message : "System is shutting down" + } + PowerOff { id: _powerOffDialog onAccepted: { _GuiView.doActionTransmit(GuiActions.PowerOff, GuiActions.Accepted)