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.opacity = 0.0
147 image.source = './images/normal.png'
148 container.state = 'normal'
149 touchArea.switchArea(0)
150 homescreenHandler.tapShortcut(appName, false)
151 container.opacity = 1.0
162 anchors.left: parent.left
163 anchors.top: parent.top
168 homescreenHandler.reboot();
173 function changeSwitchState(is_navigation) {
174 if(container.state === 'normal') {
176 switchBtn.enableSwitchBtn = true
177 image.source = './images/normal.png'
179 switchBtn.enableSwitchBtn = false
180 image.source = './images/normal_disable.png'
186 target: homescreenHandler
188 container.state = 'normal'
190 touchArea.switchArea(0)
191 container.opacity = 1.0
196 target: homescreenHandler
198 container.state = 'fullscreen'
199 image.visible = false
200 touchArea.switchArea(1)
201 container.opacity = 0.0
211 bottomInformation.visible = false
216 id: bottomInformation
219 anchors.bottom: parent.bottom
223 anchors.centerIn: parent
225 font.letterSpacing: 5
226 horizontalAlignment: Text.AlignHCenter
234 target: homescreenHandler
236 bottomText.text = info
237 bottomInformation.visible = true
238 informationTimer.restart()
247 onTriggered: notificationItem.visible = false
262 height: parent.height
269 anchors.left: parent.left
270 anchors.leftMargin: 20
271 anchors.verticalCenter: parent.verticalCenter
278 anchors.left: notificationIcon.right
279 anchors.leftMargin: 5
280 anchors.verticalCenter: parent.verticalCenter
288 target: homescreenHandler
289 onShowNotification: {
290 notificationIcon.source = icon_path
291 notificationtext.text = text
292 notificationItem.visible = true
293 notificationTimer.restart()