aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-07 10:48:43 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-07 10:48:43 +0900
commitba7475368d0b04978e912c2bec8ce2ede1d5f52a (patch)
treecc2aa3f11dbc2305263d05bd8a9a9fd6f6d9bfdc
parent471a8288f833334e38f3d999c8921c8585280dc9 (diff)
add ces2019 source
-rw-r--r--launcher/qml/Launcher.qml11
-rw-r--r--launcher/qml/images/AGL_HMI_Blue_Background_Car-01.pngbin785945 -> 824254 bytes
-rw-r--r--launcher/qml/images/browser_active.svg (renamed from launcher/qml/images/webbrowser_active.svg)0
-rw-r--r--launcher/qml/images/browser_inactive.svg (renamed from launcher/qml/images/webbrowser_inactive.svg)0
-rw-r--r--launcher/qml/images/images.qrc4
-rw-r--r--launcher/src/applicationmodel.cpp9
-rw-r--r--launcher/src/main.cpp12
7 files changed, 15 insertions, 21 deletions
diff --git a/launcher/qml/Launcher.qml b/launcher/qml/Launcher.qml
index 6d55271..6756589 100644
--- a/launcher/qml/Launcher.qml
+++ b/launcher/qml/Launcher.qml
@@ -41,7 +41,7 @@ ApplicationWindow {
GridView {
id: grid
anchors {
- topMargin: 60; bottomMargin: 0
+ topMargin: 60; bottomMargin: 0
leftMargin: 60; rightMargin: 60
fill: parent
}
@@ -67,15 +67,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,6 +83,7 @@ ApplicationWindow {
} else {
currentId = ''
}
+ homescreenHandler.tapShortcut(applicationModel.name(loc.index))
}
onPositionChanged: {
if (loc.currentId === '') return
diff --git a/launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png b/launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png
index 8c01263..5ea3a53 100644
--- a/launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png
+++ b/launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png
Binary files differ
diff --git a/launcher/qml/images/webbrowser_active.svg b/launcher/qml/images/browser_active.svg
index 70b4617..70b4617 100644
--- a/launcher/qml/images/webbrowser_active.svg
+++ b/launcher/qml/images/browser_active.svg
diff --git a/launcher/qml/images/webbrowser_inactive.svg b/launcher/qml/images/browser_inactive.svg
index 09f34c9..09f34c9 100644
--- a/launcher/qml/images/webbrowser_inactive.svg
+++ b/launcher/qml/images/browser_inactive.svg
diff --git a/launcher/qml/images/images.qrc b/launcher/qml/images/images.qrc
index cef5f21..b3a1cf6 100644
--- a/launcher/qml/images/images.qrc
+++ b/launcher/qml/images/images.qrc
@@ -25,8 +25,8 @@
<file>settings_inactive.svg</file>
<file>video_active.svg</file>
<file>video_inactive.svg</file>
- <file>webbrowser_active.svg</file>
- <file>webbrowser_inactive.svg</file>
+ <file>browser_active.svg</file>
+ <file>browser_inactive.svg</file>
<file>blank_active.svg</file>
<file>blank_inactive.svg</file>
<file>plus_active.svg</file>
diff --git a/launcher/src/applicationmodel.cpp b/launcher/src/applicationmodel.cpp
index 17e38fb..090a300 100644
--- a/launcher/src/applicationmodel.cpp
+++ b/launcher/src/applicationmodel.cpp
@@ -60,10 +60,11 @@ ApplicationModel::Private::Private()
auto const id = jso["id"].toString();
auto const icon = get_icon_name(jso);
- if ( name != "launcher" &&
- name != "homescreen-2017" &&
- name != "homescreen" &&
- name != "OnScreenApp") {
+ // Hide HomeScreen icon itself
+ if (name != "launcher" &&
+ name != "homescreen-2017" &&
+ name != "homescreen" &&
+ !name.contains("OnScreen", Qt::CaseInsensitive)) {
this->data.append(AppInfo(icon, name, id));
}
diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp
index 91a1d80..d79e880 100644
--- a/launcher/src/main.cpp
+++ b/launcher/src/main.cpp
@@ -124,16 +124,8 @@ int main(int argc, char *argv[])
homescreenHandler->init(port, token.toStdString().c_str());
homescreenHandler->set_event_handler(QLibHomeScreen::Event_TapShortcut, [layoutHandler, myname](json_object *object){
- json_object *appnameJ = nullptr;
- if(json_object_object_get_ex(object, "application_name", &appnameJ))
- {
- const char *appname = json_object_get_string(appnameJ);
- if(myname == appname)
- {
- qDebug("Surface %s got tapShortcut\n", appname);
- layoutHandler->activateSurface(myname);
- }
- }
+ qDebug("Surface launcher got tapShortcut. \n");
+ layoutHandler->activateSurface(myname);
});
QUrl bindingAddress;