X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=homescreen%2Fqml%2FShortcutArea.qml;h=d7e97f0e11696170409de31422450a9e794da6f5;hb=4667d93a852d66a57a2d7d26957c3aab6845756e;hp=9be3fd09ca697a4ee2f1664e1aac1a6ef865ff0d;hpb=69be38c5d975c96eee7adab238ffd608b99d8514;p=apps%2Fhomescreen.git diff --git a/homescreen/qml/ShortcutArea.qml b/homescreen/qml/ShortcutArea.qml index 9be3fd0..d7e97f0 100644 --- a/homescreen/qml/ShortcutArea.qml +++ b/homescreen/qml/ShortcutArea.qml @@ -1,6 +1,7 @@ /* * Copyright (C) 2016 The Qt Company Ltd. * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,18 +28,22 @@ Item { ListModel { id: applicationModel ListElement { - name: 'Home' - application: '' + appid: 'launcher' + name: 'launcher' + application: 'launcher@0.1' } ListElement { - name: 'Multimedia' + appid: 'mediaplayer' + name: 'MediaPlayer' application: 'mediaplayer@0.1' } ListElement { + appid: 'hvac' name: 'HVAC' application: 'hvac@0.1' } ListElement { + appid: 'navigation' name: 'Navigation' application: 'navigation@0.1' } @@ -55,26 +60,17 @@ Item { Layout.fillWidth: true Layout.fillHeight: true name: model.name - active: model.application === launcher.current + active: model.name === launcher.current onClicked: { - if (0 === model.index) { - appLauncherAreaLauncher.visible = true - applicationArea.visible = false - layoutHandler.hideAppLayer() - launcher.current = '' + pid = launcher.launch(model.application) + if (1 < pid) { + applicationArea.visible = true } else { - pid = launcher.launch(model.application) - if (1 < pid) { - applicationArea.visible = true - appLauncherAreaLauncher.visible = false - layoutHandler.makeMeVisible(pid) - layoutHandler.showAppLayer(model.application, pid) - } - else { - console.warn("app cannot be launched!") - } + console.warn(model.application) + console.warn("app cannot be launched!") } + homescreenHandler.tapShortcut(model.appid) } } }