2 * Copyright (C) 2016 The Qt Company Ltd.
3 * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 import QtQuick.Layouts 1.1
20 import QtQuick.Controls 1.0
21 import QtQuick.Controls 1.4
22 import QtQuick.Controls.Styles 1.4
28 signal languageChanged
33 anchors.topMargin: -218
34 anchors.bottomMargin: -215
35 source: './images/AGL_HMI_Background_Car-01.png'
41 anchors.horizontalCenter: parent.horizontalCenter
42 anchors.top: parent.top
44 source: './images/sign.png'
48 anchors.horizontalCenter: parent.horizontalCenter
49 anchors.verticalCenter: parent.verticalCenter
50 horizontalAlignment: Text.AlignHCenter
62 anchors.left: parent.left
63 anchors.leftMargin: 20
64 anchors.top: parent.top
66 source: './images/us_flag.png'
73 anchors.right: parent.right
74 anchors.rightMargin: 20
75 anchors.top: parent.top
77 source: './images/visa.png'
81 anchors.top: parent.bottom
83 anchors.horizontalCenter: parent.horizontalCenter
84 horizontalAlignment: Text.AlignHCenter
93 anchors.horizontalCenter: parent.horizontalCenter
94 anchors.bottom: parent.bottom
95 anchors.bottomMargin: 40
99 anchors.centerIn: parent
101 text: 'No Authenticated User'
103 font.family: 'Roboto'
104 SequentialAnimation on font.letterSpacing {
107 NumberAnimation { from: 0; to: 50; easing.type: Easing.InQuad; duration: 3000 }
113 helloText.opacity = 1
114 helloText.font.letterSpacing = 0
119 SequentialAnimation on opacity {
123 NumberAnimation { from: 1; to: 0; duration: 2600 }
124 PauseAnimation { duration: 400 }
128 function showHello(helloString) {
129 helloText.text = helloString
130 animation1.running = true;
131 animation2.running = true;
134 function showSign90(show, speed, unit) {
135 sign90.visible = show
138 speedLimit.font.pixelSize = 60
140 speedLimit.font.pixelSize = 90
141 speedLimit.text = speed
143 sign90.source = './images/B14-90.png'
144 speedLimit.visible = false
147 function showVisa(show, num) {
149 cardNumber.text = num;
151 function changeFlag(flagImage) {
152 flagLanguage.source = flagImage
154 function setUser(type, auts) {
156 authorisations.visible = false
158 authorisations.visible = true
159 labelUserType.text = type
161 for (var i=0; i<auts.length; i++) {
163 myModel.append({"name": auts[i]})
169 anchors.centerIn: parent
170 width: cellHeight * 3
171 height: cellHeight * 3
175 model: ApplicationModel {}
176 delegate: MouseArea {
182 source: './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
185 anchors.horizontalCenter: parent.horizontalCenter
186 horizontalAlignment: Text.AlignHCenter
189 font.family: "Roboto"
191 text: '%1'.arg(model.name)
192 function myChangeLanguage() {
193 text = '%1'.arg(model.name)
194 appImage.source = './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
196 Component.onCompleted: {
197 root.languageChanged.connect(myChangeLanguage)
202 console.log("app is ", model.id)
203 pid = launcher.launch(model.id)
205 layoutHandler.makeMeVisible(pid)
207 applicationArea.visible = true
208 appLauncherAreaLauncher.visible = false
209 layoutHandler.showAppLayer(pid)
212 console.warn("app cannot be launched!")
226 name: 'Update Software'
239 anchors.bottom: parent.bottom
240 anchors.left: parent.left
241 anchors.bottomMargin: 50
242 anchors.leftMargin: 20
246 source: './images/' + model.name + '.png'
247 width: sourceSize.width
248 height: sourceSize.height
255 anchors.bottom: gridAut.top
256 anchors.bottomMargin: 10
257 anchors.left: gridAut.left
261 font.family: "Roboto"
267 width: sourceSize.width
268 height: sourceSize.height
269 anchors.bottom: parent.bottom
270 anchors.right: parent.right
271 anchors.bottomMargin: 10
272 anchors.rightMargin: 20
273 source: './images/Logout-01.png'
280 helloText.text= 'No Authenticated User'