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/B14-90.png'
50 anchors.left: parent.left
51 anchors.leftMargin: 20
52 anchors.top: parent.top
54 source: './images/us_flag.png'
61 anchors.right: parent.right
62 anchors.rightMargin: 20
63 anchors.top: parent.top
65 source: './images/visa.png'
69 anchors.top: parent.bottom
71 anchors.horizontalCenter: parent.horizontalCenter
72 horizontalAlignment: Text.AlignHCenter
81 anchors.horizontalCenter: parent.horizontalCenter
82 anchors.bottom: parent.bottom
83 anchors.bottomMargin: 40
87 anchors.centerIn: parent
89 text: 'No Authenticated User'
92 SequentialAnimation on font.letterSpacing {
95 NumberAnimation { from: 0; to: 50; easing.type: Easing.InQuad; duration: 3000 }
101 helloText.opacity = 1
102 helloText.font.letterSpacing = 0
107 SequentialAnimation on opacity {
111 NumberAnimation { from: 1; to: 0; duration: 2600 }
112 PauseAnimation { duration: 400 }
116 function showHello(helloString) {
117 helloText.text = helloString
118 animation1.running = true;
119 animation2.running = true;
122 function showSign90(show) {
123 sign90.visible = show
126 function showVisa(show, num) {
128 cardNumber.text = num;
130 function changeFlag(flagImage) {
131 flagLanguage.source = flagImage
133 function setUser(type, auts) {
135 authorisations.visible = false
137 authorisations.visible = true
138 labelUserType.text = type
140 for (var i=0; i<auts.length; i++) {
142 myModel.append({"name": auts[i]})
148 anchors.centerIn: parent
149 width: cellHeight * 3
150 height: cellHeight * 3
155 model: ApplicationModel {}
156 delegate: MouseArea {
162 source: './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
165 anchors.horizontalCenter: parent.horizontalCenter
166 horizontalAlignment: Text.AlignHCenter
169 font.family: "Roboto"
171 text: '%1'.arg(model.name)
172 function myChangeLanguage() {
173 text = '%1'.arg(model.name)
174 appImage.source = './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
176 Component.onCompleted: {
177 root.languageChanged.connect(myChangeLanguage)
182 console.log("app is ", model.id)
183 pid = launcher.launch(model.id)
185 layoutHandler.makeMeVisible(pid)
187 applicationArea.visible = true
188 appLauncherAreaLauncher.visible = false
189 layoutHandler.showAppLayer(pid)
192 console.warn("app cannot be launched!")
206 name: 'Update Software'
219 anchors.bottom: parent.bottom
220 anchors.left: parent.left
221 anchors.bottomMargin: 50
222 anchors.leftMargin: 20
226 source: './images/' + model.name + '.png'
227 width: sourceSize.width
228 height: sourceSize.height
235 anchors.bottom: gridAut.top
236 anchors.bottomMargin: 10
237 anchors.left: gridAut.left
241 font.family: "Roboto"
247 width: sourceSize.width
248 height: sourceSize.height
249 anchors.bottom: parent.bottom
250 anchors.right: parent.right
251 anchors.bottomMargin: 10
252 anchors.rightMargin: 20
253 source: './images/Logout-01.png'
260 helloText.text= 'No Authenticated User'