2 * Copyright (C) 2016 The Qt Company Ltd.
3 * Copyright (C) 2016, 2017 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.Window 2.1
20 import QtQuick.Layouts 1.1
25 flags: Qt.FramelessWindowHint
26 width: container.width * container.scale
27 height: container.height * container.scale
33 anchors.centerIn: parent
36 scale: screenInfo.scale_factor()
37 source: './images/AGL_HMI_Blue_Background_NoCar-01.png'
44 Layout.fillWidth: true
45 Layout.preferredHeight: 218
50 Layout.fillWidth: true
51 Layout.fillHeight: true
52 Layout.preferredHeight: 1920 - 218 - 215
59 Layout.fillWidth: true
60 Layout.fillHeight: true
61 Layout.preferredHeight: 215
76 target: applicationArea
91 target: applicationArea
100 transitions: Transition {
104 easing.type: "OutQuad"
110 easing.type: "OutQuad"
120 anchors.right: parent.right
121 anchors.top: parent.top
123 property bool enableSwitchBtn: true
125 anchors.right: parent.right
126 anchors.rightMargin: 20
127 anchors.top: parent.top
128 anchors.topMargin: 25
132 source: './images/normal.png'
138 if(switchBtn.enableSwitchBtn) {
139 var appName = homescreenHandler.getCurrentApplication()
140 if (container.state === 'normal') {
141 image.source = './images/fullscreen.png'
142 container.state = 'fullscreen'
143 touchArea.switchArea(1)
144 homescreenHandler.tapShortcut(appName, true)
145 container.visible = false
146 voiceBtn.visible = false
148 image.source = './images/normal.png'
149 container.state = 'normal'
150 touchArea.switchArea(0)
151 homescreenHandler.tapShortcut(appName, false)
152 container.visible = true
153 voiceBtn.visible = true
164 anchors.left: parent.left
165 anchors.top: parent.top
170 homescreenHandler.reboot();
175 function changeSwitchState(is_navigation) {
176 if(container.state === 'normal') {
178 switchBtn.enableSwitchBtn = true
179 image.source = './images/normal.png'
181 switchBtn.enableSwitchBtn = false
182 image.source = './images/normal_disable.png'
188 target: homescreenHandler
190 container.state = 'normal'
192 touchArea.switchArea(0)
193 container.opacity = 1.0
194 voiceBtn.visible = true
199 target: homescreenHandler
201 container.state = 'fullscreen'
202 image.visible = false
203 touchArea.switchArea(1)
204 container.opacity = 0.0
205 voiceBtn.visible = false
215 bottomInformation.visible = false
220 id: bottomInformation
223 anchors.bottom: parent.bottom
227 anchors.centerIn: parent
229 font.letterSpacing: 5
230 horizontalAlignment: Text.AlignHCenter
238 target: homescreenHandler
240 bottomText.text = info
241 bottomInformation.visible = true
242 informationTimer.restart()
251 onTriggered: notificationItem.visible = false
266 height: parent.height
273 anchors.left: parent.left
274 anchors.leftMargin: 20
275 anchors.verticalCenter: parent.verticalCenter
282 anchors.left: notificationIcon.right
283 anchors.leftMargin: 5
284 anchors.verticalCenter: parent.verticalCenter
292 target: homescreenHandler
293 onShowNotification: {
294 notificationIcon.source = icon_path
295 notificationtext.text = text
296 notificationItem.visible = true
297 notificationTimer.restart()
302 target: homescreenVoice
304 voiceBtn.visible = status
312 anchors.bottom: parent.bottom
313 anchors.right: parent.right
314 anchors.bottomMargin: 50
315 anchors.rightMargin: 0
319 anchors.left: parent.left
320 anchors.top: parent.top
323 source: './images/voice.png'
328 homescreenVoice.startListening();