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.
26 anchors.topMargin: -218
27 anchors.bottomMargin: -215
28 source: './images/AGL_HMI_Background_Car-01.png'
34 anchors.centerIn: parent
42 model: ApplicationModel {}
53 // These images contain the item text at the bottom,
54 // is it possible to crop the image in QML?
60 fillMode: Image.PreserveAspectCrop
61 source: model.icon.substr(0, 5) === "file:"
63 : './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
66 // Show this rect and the text below if the image could not be loaded
76 color: pressed ? "#11bcb9" : "#202020"
77 radius: parent.width / 2 // circle'd rectangle...
78 visible: img.status == Image.Error
82 property int font_size: 26
85 font.capitalization: Font.AllUppercase
87 font.pixelSize: font_size
91 horizontalCenter: parent.horizontalCenter
93 topMargin: parent.height / 2 - font_size / 2
95 visible: img.status == Image.Error
100 console.log("app is ", model.id)
101 pid = launcher.launch(model.id)
103 layoutHandler.makeMeVisible(pid)
105 applicationArea.visible = true
106 appLauncherAreaLauncher.visible = false
107 layoutHandler.showAppLayer(pid)
110 console.warn("app cannot be launched!")