-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.qml
107 lines (89 loc) · 2.1 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import Style 1.0
import "./Component"
import "./Pages"
ApplicationWindow {
id:root
width: 1920
height: 1080
visible: true
color: Style.background
title: qsTr("Eagle Theme")
background: Item{
anchors.fill: parent
Image{
anchors.fill: parent
visible: Style.isDark
source: "qrc:/Icons/dark/background.png"
}
}
Component.onCompleted: root.showMaximized()
header: Header{}
footer: Footer{
id:footerLayout
onSettingsClicked: {
mainLoader.item.replace(null,settingsPage)
}
onMusicClicked: mainLoader.item.replace(null,musicPage)
onCallingClicked: mainLoader.item.replace(null,callingPage)
onHomeClicked: mainLoader.item.replace(null,homePage)
onChargeClicked: mainLoader.item.replace(null,chargingPage)
onMapClicked: mainLoader.item.replace(null,mapPage)
}
Component{
id:chargingPage
Charing{
}
}
Component{
id:mapPage
MapPage{
}
}
Component{
id:homePage
HomePage{
}
}
Component{
id:callingPage
Callling{
}
}
Component{
id:musicPage
MusicPage{
}
}
Component{
id:settingsPage
SettingsPage{
objectName: "SettingsPage"
onBackToHome: {
mainLoader.item.replace(null,homePage)
}
}
}
contentData:Loader{
id:mainLoader
anchors.fill: parent
sourceComponent:StackView{
id:mainStack
initialItem:homePage
onCurrentItemChanged: {
var footer = footerlayout()
if(currentItem.objectName == "SettingsPage"){
footer.visible = false
}else{
footer.visible = true
}
}
}
}
function footerlayout(){
return footerLayout
}
}