Index: sources/gui/qml/main.qml =================================================================== diff -u -rd473be913284c14f14a6e5b18446cceafc3e1265 -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 --- sources/gui/qml/main.qml (.../main.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265) +++ sources/gui/qml/main.qml (.../main.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) @@ -1,35 +1,43 @@ +/*! + * + * 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 main.qml + * \date 2019/09/30 + * \author Behrouz NematiPour + * + */ + +// Qt import QtQuick 2.12 import QtQuick.Controls 2.12 -import QtGraphicalEffects 1.12 +// Project +// C++ imports import Gui.View 0.1; import Gui.Actions 0.1; - +// Qml imports import "qrc:/globals" import "qrc:/pages" import "qrc:/components" import "qrc:/dialogs" // TODO : -// 1 - Copyright -// 2 - StackView // 3 - Version - /* - Copyright Diality Inc. 2019-2020 All Rights Reserved. - Diality Inc. - Denali Project - main.qml - Initialization and start point of the QML - Behrouz NematiPour, bNematiPour@Diality.com - //Revision History (optional) + * \brief Initialization and start point of the QML */ -Item { id: _mainItem - visible: true - width: Variables.applicationWidth +Item { id : _mainItem + width : Variables.applicationWidth height: Variables.applicationHeight + property alias powerOffDialog: _powerOffDialog + GuiView { id: _guiView onActionEvaluated: { if (vAction === GuiActions.ActBack) { @@ -43,49 +51,30 @@ } } - StartTreatment { id: _startTreatmentScreen - btnBack.onClicked: { - _guiView.notifyActionRequest(GuiActions.ActBack) - } - btnBack.onPressAndHold: { - _guiView.notifyActionRequest(GuiActions.ActConfirm) - } - } + // ----- Follow the Z order ----- + // 1 - Screens + // 1 - 1 + SettingsStack { id: _settingsStack } + // 1 - 2 + ManagerStack { id: _mansagerStack } + // 1 - 3 + TreatmentStack { id: _treatmentStack } - TreatmentManager { id: _treatmentMansagerScreen - btnBack.onClicked: { - _guiView.notifyActionRequest(GuiActions.ActBack) - } - } + // 2 - Header + LogoD { id: _headerLogo } - Home { id: _homeScreen - //visible: true - startTreatmentButton.onPressed: { - _stackView.push(_startTreatmentScreen) - } - createTreatmentButton.onPressed: { - _stackView.push(_treatmentMansagerScreen) - } - } - - StackView { - id: _stackView - initialItem: _homeScreen - anchors.fill: parent - - } - - LogoD { id : _headerLogo } - + // 3 - Footer MainMenu { id: _mainMenu - settingsButton.onPressed: { - _powerOffDialog.open() - } + treatmentButton .onPressed: { _treatmentStack.visible = true ; _mansagerStack.visible = false; _settingsStack.visible = false; } + managerButton .onPressed: { _treatmentStack.visible = false; _mansagerStack.visible = true ; _settingsStack.visible = false; } + settingsButton .onPressed: { _treatmentStack.visible = false; _mansagerStack.visible = false; _settingsStack.visible = true ; } } - PowerOff { id : _powerOffDialog } + // 4 - Modals + PowerOff { id: _powerOffDialog } - Text { id: versionText // test code + // 9 - Others + Text { //NOTE: Test Code : Must be removed when implemented color: Colors.textMain x: 1172 y: 767