aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-06-07 10:22:09 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-06-07 10:22:09 +0900
commit8d4b3274086f658d7cd2bfa344491bfeb66b1a1e (patch)
tree0112e841ef10f70308acb6096362ad86138bc5e9
parent1199ce7d48d25cf7d75ba3460cd6288f3719422e (diff)
add sendtohud
-rw-r--r--launcher/qml/Launcher.qml3
-rw-r--r--launcher/src/homescreenhandler.cpp12
-rw-r--r--launcher/src/homescreenhandler.h1
3 files changed, 15 insertions, 1 deletions
diff --git a/launcher/qml/Launcher.qml b/launcher/qml/Launcher.qml
index bab1933..034e05a 100644
--- a/launcher/qml/Launcher.qml
+++ b/launcher/qml/Launcher.qml
@@ -166,7 +166,8 @@ ApplicationWindow {
console.log("sendAppToMeter", currentId)
homescreenHandler.sendAppToMeter(currentId)
} else if (loc.mouseX >= 270 && loc.mouseX < 540 ) {
-
+ console.log("sendAppToHud", currentId)
+ homescreenHandler.sendAppToHud(currentId)
} else if (loc.mouseX >= 540 && loc.mouseX < 810 ) {
} else if (loc.mouseX >= 810) {
diff --git a/launcher/src/homescreenhandler.cpp b/launcher/src/homescreenhandler.cpp
index fb85cbd..2450ccb 100644
--- a/launcher/src/homescreenhandler.cpp
+++ b/launcher/src/homescreenhandler.cpp
@@ -210,6 +210,18 @@ void HomescreenHandler::sendAppToMeter(QString application_id)
mp_qhs->showWindow(application_id.section('@', 0, 0).toStdString().c_str(), j_json);
}
+void HomescreenHandler::sendAppToHud(QString application_id)
+{
+ HMI_DEBUG("Launcher","sendAppToHud %s", application_id.toStdString().c_str());
+ struct json_object* j_json = json_object_new_object();
+ struct json_object* value;
+ value = json_object_new_string("hud.normal.full");
+ json_object_object_add(j_json, "area", value);
+
+ mp_qhs->showWindow(application_id.section('@', 0, 0).toStdString().c_str(), j_json);
+}
+
+
void HomescreenHandler::getRunnables(void)
{
mp_qhs->getRunnables();
diff --git a/launcher/src/homescreenhandler.h b/launcher/src/homescreenhandler.h
index e612331..a34a2a9 100644
--- a/launcher/src/homescreenhandler.h
+++ b/launcher/src/homescreenhandler.h
@@ -41,6 +41,7 @@ public:
Q_INVOKABLE void registerShortcut(QString shortcut_id, QString shortcut_name, QString position);
Q_INVOKABLE int uninstallApplication(QString application_id);
Q_INVOKABLE void sendAppToMeter(QString application_id);
+ Q_INVOKABLE void sendAppToHud(QString application_id);
void onRep(struct json_object* reply_contents);