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
21 import QtQuick.Controls 2.1
22 import QtWayland.Compositor 1.0
24 import QtGraphicalEffects 1.0
29 flags: Qt.FramelessWindowHint
30 width: container.width * container.scale
31 height: container.height * container.scale
33 property alias applicationStack: applicationStack
35 property var app2item: new Object
36 property string appLaunching
41 onSurfaceDestroyed: destroy()
45 function show(shellSurface) {
46 var a2i = root.app2item
47 var item = chrome.createObject(root, {"shellSurface": shellSurface})
48 a2i[appLaunching] = item
50 shellSurface.sendConfigure(Qt.size(applicationStack.width, applicationStack.height), WlShellSurface.NoneEdge)
51 if (applicationStack.depth == 1) {
52 applicationStack.push(item)
54 applicationStack.replace(item)
63 if (current === app) return
65 if (root.appLaunching.length > 0)
68 if (applicationStack.depth == 1) {
69 applicationStack.push(app2item[app])
71 applicationStack.replace(app2item[app])
75 root.appLaunching = app
76 if (launch(app) < 0) {
77 root.appLaunching = ''
80 } else if (applicationStack.depth > 1) {
81 applicationStack.pop()
98 properties: "opacity, scale"
107 properties: "opacity"
122 anchors.centerIn: parent
126 source: './images/AGL_HMI_Background_NoCar-01.png'
133 Layout.fillWidth: true
134 Layout.preferredHeight: 218
139 Layout.fillWidth: true
140 Layout.fillHeight: true
141 Layout.preferredHeight: 1920 - 218 - 215
148 pushEnter: inTransition
149 pushExit: outTransition
150 replaceEnter: inTransition
151 replaceExit: outTransition
152 popEnter: inTransition
153 popExit: outTransition
159 Layout.fillWidth: true
160 Layout.fillHeight: true
161 Layout.preferredHeight: 215
166 notificationLayer.shown = true
174 id: notificationLayer
175 property bool shown: false
176 anchors.fill: container
177 scale: container.scale
183 onClicked: shown = false
194 when: notificationLayer.shown
196 target: notificationLayer
209 properties: 'opacity'
211 easing.type: Easing.OutExpo
217 anchors.centerIn: parent
226 anchors.centerIn: parent
240 anchors.centerIn: parent
254 onTriggered: notificationLayer.shown = false