-
Notifications
You must be signed in to change notification settings - Fork 6
/
ti-apps-launcher.qml
146 lines (139 loc) · 4.51 KB
/
ti-apps-launcher.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import QtQml 2.1
import QtQuick 2.14
import QtMultimedia 5.1
import QtQuick.Window 2.14
import QtQuick.Controls 2.1
import QtGraphicalEffects 1.12
import Qt.labs.folderlistmodel 2.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Extras 1.4
import QtQuick.Layouts 1.3
Window {
visible: true
visibility: "FullScreen"
title: qsTr("TI Apps Launcher")
Rectangle {
id: appBackground
color: "#17252A"
width: parent.width
height: parent.height
// Section1: TopBar
// This contains Texas Instruments Logo, application title
Rectangle {
id: topBarRect
width: parent.width
height: parent.height * 0.1
anchors.top: parent.top
anchors.left: parent.left
border.color: "#CCCCCC"
border.width: 2
Loader {
id: topBar
anchors.fill: parent
source: "apps/topbar.qml"
}
}
// Section2: AppsMenu
// This displays the buttons to launch applications
Rectangle {
id: appsMenuRect
width: parent.width * 0.15
height: parent.height * 0.70
anchors.top: topBarRect.bottom
anchors.left: parent.left
border.color: "#CCCCCC"
border.width: 2
Loader {
id: appsMenu
anchors.fill: parent
source: "apps/appsmenu.qml"
}
}
// Section3: AppWindow
// This displays the currently running application
Rectangle {
id: appWindowRect
width: parent.width * 0.835
height: parent.height * 0.70
anchors.top: topBarRect.bottom
anchors.left: appsMenuRect.right
anchors.rightMargin: parent.width * 0.015
border.color: "#CCCCCC"
border.width: 2
Image {
id: mainimg
visible: true
width: parent.width
height: parent.height
source: deviceinfo.getWallpaper()
anchors.fill: parent
anchors.margins: parent.border.width * 2
}
Loader {
id: appWindow
anchors.fill: parent
anchors.topMargin: 5
anchors.rightMargin: 5
anchors.leftMargin: 5
anchors.bottomMargin: 5
// asynchronous: true
visible: false
onLoaded: {
progressbar.visible = false;
visible = true
}
Component.onCompleted: {
appsmenu.cache_flush();
}
}
ProgressBar {
id: progressbar
anchors.horizontalCenter: appWindowRect.horizontalCenter
anchors.verticalCenter: appWindowRect.verticalCenter
width: parent.width / 3
indeterminate: true
visible: false
}
}
// Section4: DeviceInfo
// This section displays device info
Rectangle {
id: deviceInfoRect
anchors.horizontalCenter: appsMenuRect.horizontalCenter
anchors.top: appsMenuRect.bottom
height: parent.height * 0.15
width: parent.width * 0.15
border.color: "#CCCCCC"
border.width: 2
anchors.topMargin: parent.height * 0.025
anchors.bottomMargin: parent.height * 0.025
Loader {
id: deviceInfo
anchors.fill: parent
source: "apps/deviceinfo.qml"
}
}
// Section5: StatsWindow
// This section displays device load statistics
Rectangle {
id: statsWindowRect
width: appWindowRect.width
height: parent.height * 0.15
anchors.horizontalCenter: appWindowRect.horizontalCenter
anchors.top: appWindowRect.bottom
border.color: "#CCCCCC"
border.width: 2
anchors.topMargin: parent.height * 0.025
anchors.bottomMargin: parent.height * 0.025
Loader {
id: statsWindow
anchors.fill: parent
anchors.topMargin: 5
anchors.rightMargin: 5
anchors.leftMargin: 5
anchors.bottomMargin: 5
source: "apps/stats.qml"
}
}
}
}