Index: sources/gui/qml/main.qml =================================================================== diff -u -r310dbfe508ffb4c921bb9337e207223f8677ca10 -rd4befd2d92ee54b57de33867a1e2517cafdd89d3 --- sources/gui/qml/main.qml (.../main.qml) (revision 310dbfe508ffb4c921bb9337e207223f8677ca10) +++ sources/gui/qml/main.qml (.../main.qml) (revision d4befd2d92ee54b57de33867a1e2517cafdd89d3) @@ -1,25 +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 + +// Project +// C++ imports import Gui.View 0.1; import Gui.Actions 0.1; - -import "qrc:/styles" +// Qml imports import "qrc:/globals" +import "qrc:/pages" +import "qrc:/components" +import "qrc:/dialogs" +// TODO : +// 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: _itemWindow - 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) { @@ -33,38 +51,44 @@ } } - 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 - backgroundColor: Colors.backgroundMain - visible: true - mouseAreaStartTreatment.onClicked: { - _stackView.push(_startTreatmentScreen) + // 3 - Footer + MainMenu { id: _mainMenu + titles: [ qsTr("Treatment") , qsTr("Manager") , qsTr("Settings") ] + onItemPressed: { + _treatmentStack .visible = vIndex == 0; + _mansagerStack .visible = vIndex == 1; + _settingsStack .visible = vIndex == 2; } - mouseAreaDayNightMode.onClicked: { - nightMode = !nightMode - } - mouseAreaTreatmentManager.onClicked: { - _stackView.push(_treatmentMansagerScreen) - } } - StackView { - id: _stackView - initialItem: _homeScreen - anchors.fill: parent + // 4 - Modals + PowerOff { id: _powerOffDialog } + + // 9 - Others + Text { //NOTE: Test Code : Must be removed when implemented + color: Colors.textMain + x: 1172 + y: 767 + width: 104 + height: 27 + text: qsTr("0.1") + horizontalAlignment: Text.AlignRight + anchors.bottom: parent.bottom + anchors.bottomMargin: 6 + anchors.right: parent.right + anchors.rightMargin: 4 + font.pixelSize: 14 } }