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
31 application: 'home@0.1'
36 application: 'mediaplayer@0.1'
41 application: 'hvac@0.1'
46 application: 'navigation@0.1'
50 function languageChanged(lang) {
52 applicationModel.setProperty(0, "label", 'ACCEUIL')
53 applicationModel.setProperty(1, "label", 'MULTIMÉDIA')
54 applicationModel.setProperty(2, "label", 'CLIMATISATION')
55 applicationModel.setProperty(3, "label", 'NAVIGATION')
57 applicationModel.setProperty(0, "label", 'HOME')
58 applicationModel.setProperty(1, "label", 'MULTIMEDIA')
59 applicationModel.setProperty(2, "label", 'HVAC')
60 applicationModel.setProperty(3, "label", 'NAVIGATION')
63 property int currentIndex: -1 // TODO: to be moved to whereever right
70 model: applicationModel
71 delegate: ShortcutIcon {
72 Layout.fillWidth: true
73 Layout.fillHeight: true
75 active: model.index === root.currentIndex
77 root.currentIndex = active ? -1 : model.index
78 if (0 === model.index) {
79 appLauncherAreaLauncher.visible = true
80 applicationArea.visible = false
81 layoutHandler.hideAppLayer()
84 pid = launcher.launch(model.application)
86 applicationArea.visible = true
87 appLauncherAreaLauncher.visible = false
88 layoutHandler.makeMeVisible(pid)
89 layoutHandler.showAppLayer(pid)
92 console.warn("app cannot be launched!")