diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-11-22 14:30:38 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-11-22 14:30:38 +0900 |
commit | fd1fbfdbdddaa659e8148e4ecce7ec33fb8b8ae0 (patch) | |
tree | cd90e39ae3086e7bb5041cd9f7e82bf57e6d74de /launcher/qml/Launcher.qml | |
parent | ba7475368d0b04978e912c2bec8ce2ede1d5f52a (diff) |
dynamic update applist
Diffstat (limited to 'launcher/qml/Launcher.qml')
-rw-r--r-- | launcher/qml/Launcher.qml | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/launcher/qml/Launcher.qml b/launcher/qml/Launcher.qml index 6756589..7ad3f38 100644 --- a/launcher/qml/Launcher.qml +++ b/launcher/qml/Launcher.qml @@ -59,6 +59,14 @@ ApplicationWindow { height: grid.cellHeight } + Connections { + target: appfwhandler + onApplistupdate: { + console.warn("applist update in Launcher.qml") + applicationModel.updateApplist(info); + } + } + MouseArea { id: loc anchors.fill: parent @@ -67,15 +75,15 @@ ApplicationWindow { property int index: grid.indexAt(loc.mouseX, loc.mouseY) x: 62 y: 264 - anchors.rightMargin: 0 - anchors.bottomMargin: 0 - anchors.leftMargin: 0 - anchors.topMargin: 0 onPressAndHold: currentId = applicationModel.id(newIndex = index) onReleased: { + if(loc.index < 0) { + return + } if (currentId === '') { pid = launcher.launch(applicationModel.id(loc.index)) if (1 < pid) { + homescreenHandler.tapShortcut(applicationModel.name(loc.index)) } else { console.warn("app cannot be launched!") @@ -83,7 +91,7 @@ ApplicationWindow { } else { currentId = '' } - homescreenHandler.tapShortcut(applicationModel.name(loc.index)) + //homescreenHandler.tapShortcut(applicationModel.name(loc.index)) } onPositionChanged: { if (loc.currentId === '') return |