From fd1fbfdbdddaa659e8148e4ecce7ec33fb8b8ae0 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Thu, 22 Nov 2018 14:30:38 +0900 Subject: dynamic update applist --- launcher/qml/Launcher.qml | 18 +- launcher/qml/images/images.qrc | 4 + launcher/qml/images/sdl_active.svg | 140 +++++++++++ launcher/qml/images/sdl_inactive.svg | 83 +++++++ launcher/qml/images/webbrowser_active.svg | 368 ++++++++++++++++++++++++++++ launcher/qml/images/webbrowser_inactive.svg | 311 +++++++++++++++++++++++ 6 files changed, 919 insertions(+), 5 deletions(-) create mode 100644 launcher/qml/images/sdl_active.svg create mode 100644 launcher/qml/images/sdl_inactive.svg create mode 100644 launcher/qml/images/webbrowser_active.svg create mode 100644 launcher/qml/images/webbrowser_inactive.svg (limited to 'launcher/qml') 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 diff --git a/launcher/qml/images/images.qrc b/launcher/qml/images/images.qrc index b3a1cf6..64b5f9c 100644 --- a/launcher/qml/images/images.qrc +++ b/launcher/qml/images/images.qrc @@ -27,9 +27,13 @@ video_inactive.svg browser_active.svg browser_inactive.svg + sdl_active.svg + sdl_inactive.svg blank_active.svg blank_inactive.svg plus_active.svg plus_inactive.svg + webbrowser_active.svg + webbrowser_inactive.svg diff --git a/launcher/qml/images/sdl_active.svg b/launcher/qml/images/sdl_active.svg new file mode 100644 index 0000000..efe3fe7 --- /dev/null +++ b/launcher/qml/images/sdl_active.svg @@ -0,0 +1,140 @@ + + + +image/svg+xml diff --git a/launcher/qml/images/sdl_inactive.svg b/launcher/qml/images/sdl_inactive.svg new file mode 100644 index 0000000..dcc077a --- /dev/null +++ b/launcher/qml/images/sdl_inactive.svg @@ -0,0 +1,83 @@ + + + +image/svg+xml diff --git a/launcher/qml/images/webbrowser_active.svg b/launcher/qml/images/webbrowser_active.svg new file mode 100644 index 0000000..6bb1ac5 --- /dev/null +++ b/launcher/qml/images/webbrowser_active.svg @@ -0,0 +1,368 @@ + + + +image/svg+xml diff --git a/launcher/qml/images/webbrowser_inactive.svg b/launcher/qml/images/webbrowser_inactive.svg new file mode 100644 index 0000000..e4a87aa --- /dev/null +++ b/launcher/qml/images/webbrowser_inactive.svg @@ -0,0 +1,311 @@ + + + +image/svg+xml -- cgit 1.2.3-korg