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
154 model: ApplicationModel {}
155 delegate: MouseArea {
161 source: './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
164 anchors.horizontalCenter: parent.horizontalCenter
165 horizontalAlignment: Text.AlignHCenter
168 font.family: "Roboto"
170 text: '%1'.arg(model.name)
171 function myChangeLanguage() {
172 text = '%1'.arg(model.name)
173 appImage.source = './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
175 Component.onCompleted: {
176 root.languageChanged.connect(myChangeLanguage)
181 console.log("app is ", model.id)
182 pid = launcher.launch(model.id)
184 layoutHandler.makeMeVisible(pid)
186 applicationArea.visible = true
187 appLauncherAreaLauncher.visible = false
188 layoutHandler.showAppLayer(pid)
191 console.warn("app cannot be launched!")
205 name: 'Update Software'
218 anchors.bottom: parent.bottom
219 anchors.left: parent.left
220 anchors.bottomMargin: 50
221 anchors.leftMargin: 20
225 source: './images/' + model.name + '.png'
226 width: sourceSize.width
227 height: sourceSize.height
234 anchors.bottom: gridAut.top
235 anchors.bottomMargin: 10
236 anchors.left: gridAut.left
240 font.family: "Roboto"
246 width: sourceSize.width
247 height: sourceSize.height
248 anchors.bottom: parent.bottom
249 anchors.right: parent.right
250 anchors.bottomMargin: 10
251 anchors.rightMargin: 20
252 source: './images/Logout-01.png'
259 helloText.text= 'No Authenticated User'