Index: denali.qrc
===================================================================
diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265
--- denali.qrc (.../denali.qrc) (revision 11887705270e9c700e297610ed1af479bae4079e)
+++ denali.qrc (.../denali.qrc) (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -4,6 +4,9 @@
sources/gui/qml/pages/StartTreatment.qml
sources/gui/qml/pages/TreatmentManager.qml
+
+ sources/gui/qml/dialogs/PowerOff.qml
+
resources/images/Settings_gear_setting_tools-128.png
resources/images/Logo d 1a344d .png
@@ -15,6 +18,9 @@
sources/gui/qml/components/MainMenu.qml
+ sources/gui/qml/components/TouchRect.qml
+ sources/gui/qml/components/Title.qml
+ sources/gui/qml/components/LogoD.qml
qtquickcontrols2.conf
Index: sources/gui/qml/components/LogoD.qml
===================================================================
diff -u
--- sources/gui/qml/components/LogoD.qml (revision 0)
+++ sources/gui/qml/components/LogoD.qml (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -0,0 +1,19 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+import "qrc:/globals"
+
+Item { id : _headerLogo
+ height : Variables.headerLogoHeight
+ anchors {
+ top : parent.top
+ left : parent.left
+ right : parent.right
+ }
+ Image { id: _headerLogoImage
+ anchors.centerIn: parent
+ width : Variables.logoWidth
+ height: Variables.logoHeight
+ source: "qrc:/images/iLogoD1A344D"
+ }
+}
Index: sources/gui/qml/components/MainMenu.qml
===================================================================
diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265
--- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 11887705270e9c700e297610ed1af479bae4079e)
+++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -4,6 +4,8 @@
import "qrc:/globals"
Item {
+ property alias settingsButton: _settingsRect.button
+
height: Variables.mainMenuHeight
anchors {
right: parent.right
@@ -20,56 +22,32 @@
spacing : Variables.mainMenuButtonSpacing
leftPadding : Variables.mainMenuButtonSpacing
rightPadding: Variables.mainMenuButtonSpacing
- Rectangle { id : _treatmentRect
+ TouchRect { id : _treatmentRect
width: Variables.mainMenuButtonWidth
height: parent.height
- color: "transparent"
- Text { id: _treatmentText
- anchors.centerIn: parent
- color: Colors.textMain
- text: qsTr("Treatment")
- font.pixelSize: Fonts.fontPixelButton
+ text.text: qsTr("Treatment")
+ border.width: 0
+ button.onPressed: {
+ _highlightRect.x = _treatmentRect.x
}
- MouseArea { id: _treatmentMouseArea
- anchors.fill: parent
- onPressed: {
- _highlightRect.x = _treatmentRect.x
- }
- }
}
- Rectangle { id : _managerRect
+ TouchRect { id : _managerRect
width: Variables.mainMenuButtonWidth
height: parent.height
- color: "transparent"
- Text { id: _managerText
- anchors.centerIn: parent
- color: Colors.textMain
- text: qsTr("Manager")
- font.pixelSize: Fonts.fontPixelButton
+ text.text: qsTr("Manager")
+ border.width: 0
+ button.onPressed: {
+ _highlightRect.x = _managerRect.x
}
- MouseArea { id: _managerMouseArea
- anchors.fill: parent
- onPressed: {
- _highlightRect.x = _managerRect.x
- }
- }
}
- Rectangle { id : _settingsRect
+ TouchRect { id : _settingsRect
width: Variables.mainMenuButtonWidth
height: parent.height
- color: "transparent"
- Text { id: _settingsText
- anchors.centerIn: parent
- color: Colors.textMain
- text: qsTr("Settings")
- font.pixelSize: Fonts.fontPixelButton
+ text.text: qsTr("Settings")
+ border.width: 0
+ button.onPressed: {
+ _highlightRect.x = _settingsRect.x
}
- MouseArea { id: _settingsMouseArea
- anchors.fill: parent
- onPressed: {
- _highlightRect.x = _settingsRect.x
- }
- }
}
}
Rectangle { id : _highlightRect
Index: sources/gui/qml/components/Title.qml
===================================================================
diff -u
--- sources/gui/qml/components/Title.qml (revision 0)
+++ sources/gui/qml/components/Title.qml (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -0,0 +1,12 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+import "qrc:/globals"
+
+Text { id: _titleText
+ bottomPadding: 25
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: Colors.textMain
+ font.pixelSize: Fonts.fontPixelTitle
+}
Index: sources/gui/qml/components/TouchRect.qml
===================================================================
diff -u
--- sources/gui/qml/components/TouchRect.qml (revision 0)
+++ sources/gui/qml/components/TouchRect.qml (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -0,0 +1,26 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+import "qrc:/globals"
+
+Rectangle { id : _rect
+ property alias text : _text
+ property alias button : _mouseArea
+
+ width : Variables.touchRectWidth
+ height : Variables.touchRectHeight
+ radius : Variables.touchRectRadius
+ color: "Transparent"
+ border {
+ color: Colors.borderButton
+ width: Variables.borderWidth
+ }
+ Text { id: _text
+ anchors.centerIn: parent
+ color: Colors.textMain
+ font.pixelSize: Fonts.fontPixelButton
+ }
+ MouseArea { id: _mouseArea
+ anchors.fill: parent
+ }
+}
Index: sources/gui/qml/dialogs/PowerOff.qml
===================================================================
diff -u
--- sources/gui/qml/dialogs/PowerOff.qml (revision 0)
+++ sources/gui/qml/dialogs/PowerOff.qml (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -0,0 +1,55 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+import QtGraphicalEffects 1.12
+
+import "qrc:/globals"
+import "qrc:/components"
+
+Dialog { id : root
+ width : Variables.poweroffWidth
+ height: Variables.poweroffHeight
+ visible: false
+ anchors.centerIn: parent
+
+ enter: Transition {
+ NumberAnimation { property: "opacity"; from: 0.0; to: 1.0 }
+ }
+ exit: Transition {
+ NumberAnimation { property: "opacity"; from: 1.0; to: 0.0 }
+ }
+
+ modal: true
+ closePolicy: Popup.NoAutoClose
+ Overlay.modal : FastBlur { id : _blurEffect
+ anchors.fill: parent
+ source: _mainItem
+ radius: 25
+ }
+ background: Rectangle {
+ color: Colors.backgroundDialog
+ radius: 10
+ }
+
+ Column {
+ spacing: 20
+ anchors.centerIn: parent
+ Title { id: _titleText
+ width: parent.width
+ text: qsTr("Are you sure you want to Shutdown?")
+ }
+ TouchRect { id : _shutdownRect
+ text.text: qsTr("SHUTDOWN")
+ button.onPressed: {
+ accepted()
+ close()
+ }
+ }
+ TouchRect { id : _cancelTouch
+ text.text: qsTr("CANCEL")
+ button.onPressed: {
+ rejected()
+ close()
+ }
+ }
+ }
+}
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 11887705270e9c700e297610ed1af479bae4079e)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -3,18 +3,20 @@
QtObject {
readonly property color backgroundMain : "#1A344D"
- readonly property color backgroundButton : "#4290EC"
- readonly property color backgroundDialog : "#204465"
+ readonly property color backgroundButton : "#438FEB"
+ readonly property color backgroundDialog : "#254665"
readonly property color backgroundMenu : "#14314C"
- readonly property color backgroundMainMenu : "#052136"
- readonly property color backgroundSlider : "#135088"
+ readonly property color backgroundMainMenu : "#0D2639"
+ readonly property color backgroundDottedMenu: "#64809D"
+ readonly property color backgroundSlider : "#195187"
readonly property color textMain : "#FCFCFC"
readonly property color textButton : "#E8E8E8"
- readonly property color textTickMark : "#4290EC"
+ readonly property color textTickMark : "#438FEB"
readonly property color textDisableButton : "#607A91"
- readonly property color borderButton : "#4290EC"
+ readonly property color borderButton : "#438FEB"
readonly property color borderDisableButton : "#607A91"
+ readonly property color boderSeparatorLine : "#476982"
}
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 11887705270e9c700e297610ed1af479bae4079e)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -14,4 +14,11 @@
readonly property int logoHeight : 50
readonly property int borderWidth : 2
+
+ readonly property int touchRectWidth : 425
+ readonly property int touchRectHeight : 70
+ readonly property int touchRectRadius : 50
+
+ readonly property int poweroffWidth : 900
+ readonly property int poweroffHeight : 500
}
Index: sources/gui/qml/main.qml
===================================================================
diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265
--- sources/gui/qml/main.qml (.../main.qml) (revision 11887705270e9c700e297610ed1af479bae4079e)
+++ sources/gui/qml/main.qml (.../main.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -1,11 +1,21 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
+import QtGraphicalEffects 1.12
+
import Gui.View 0.1;
import Gui.Actions 0.1;
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.
@@ -15,7 +25,7 @@
Behrouz NematiPour, bNematiPour@Diality.com
//Revision History (optional)
*/
-Item { id: _itemWindow
+Item { id: _mainItem
visible: true
width: Variables.applicationWidth
height: Variables.applicationHeight
@@ -49,11 +59,11 @@
}
Home { id: _homeScreen
- visible: true
- startTreatmentMouseArea.onPressed: {
+ //visible: true
+ startTreatmentButton.onPressed: {
_stackView.push(_startTreatmentScreen)
}
- createTreatmentMouseArea.onPressed: {
+ createTreatmentButton.onPressed: {
_stackView.push(_treatmentMansagerScreen)
}
}
@@ -62,22 +72,31 @@
id: _stackView
initialItem: _homeScreen
anchors.fill: parent
+
}
- Item { id : _headerLogo
- height : Variables.headerLogoHeight
- anchors {
- top : parent.top
- left : parent.left
- right : parent.right
+ LogoD { id : _headerLogo }
+
+ MainMenu { id: _mainMenu
+ settingsButton.onPressed: {
+ _powerOffDialog.open()
}
- Image { id: _headerLogoImage
- anchors.centerIn: parent
- width : Variables.logoWidth
- height: Variables.logoHeight
- source: "qrc:/images/iLogoD1A344D"
- }
}
- MainMenu { id: _mainMenu }
+ PowerOff { id : _powerOffDialog }
+
+ Text { id: versionText // test code
+ 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
+ }
}
Index: sources/gui/qml/pages/Home.qml
===================================================================
diff -u -r11887705270e9c700e297610ed1af479bae4079e -rd473be913284c14f14a6e5b18446cceafc3e1265
--- sources/gui/qml/pages/Home.qml (.../Home.qml) (revision 11887705270e9c700e297610ed1af479bae4079e)
+++ sources/gui/qml/pages/Home.qml (.../Home.qml) (revision d473be913284c14f14a6e5b18446cceafc3e1265)
@@ -1,17 +1,18 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
+import QtGraphicalEffects 1.12
import "qrc:/globals"
+import "qrc:/components"
Item { id: root
- property int favoriteCount: 0
- property alias startTreatmentMouseArea: _startTreatmentMouseArea
- property alias createTreatmentMouseArea: _createTreatmentMouseArea
+ property alias startTreatmentButton : _startTreatmentRect.button
+ property alias createTreatmentButton: _createTreatmentRect.button
- width: Variables.applicationWidth
- height:Variables.applicationHeight
+ property int favoriteCount: 0
- property alias versionText: versionText
+ width : Variables.applicationWidth
+ height: Variables.applicationHeight
Rectangle { id: _backgroundRect
anchors.fill: parent
@@ -21,70 +22,15 @@
Column {
spacing: 20
anchors.centerIn: parent
- Text { id: _titleText
+ Title { id: _titleText
width: parent.width
- bottomPadding: 25
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- color: Colors.textMain
text: qsTr("Good Morning")
- font.pixelSize: Fonts.fontPixelTitle
}
- Rectangle { id : _startTreatmentRect
- width: 425
- height: 70
- radius: 50
- color: Colors.backgroundMain
- border {
- color: Colors.borderButton
- width: Variables.borderWidth
- }
- Text { id: _startTreatmentText
- anchors.centerIn: parent
- color: Colors.textMain
- text: qsTr("START TREATMENT (%1)").arg(favoriteCount)
- font.pixelSize: Fonts.fontPixelButton
- }
- MouseArea { id: _startTreatmentMouseArea
- anchors.fill: parent
- }
+ TouchRect { id : _startTreatmentRect
+ text.text: qsTr("START TREATMENT (%1)").arg(favoriteCount)
}
-
- Rectangle { id : _createTreatmentRect
- width: 425
- height: 70
- radius: 50
- color: Colors.backgroundMain
- border {
- color: Colors.borderButton
- width: Variables.borderWidth
- }
- Text { id: _createTreatmentText
- anchors.centerIn: parent
- color: Colors.textMain
- text: qsTr("CREATE TREATMENT")
- font.pixelSize: Fonts.fontPixelButton
- }
- MouseArea { id: _createTreatmentMouseArea
- anchors.fill: parent
- }
-
+ TouchRect { id : _createTreatmentRect
+ text.text: qsTr("CREATE TREATMENT")
}
}
-
- Text { id: versionText
- 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
- }
-
}