aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/homescreenhandler.cpp
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-04-05 19:26:49 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-04-05 19:26:49 +0900
commitff86f7a823bf7b592e1011f6f31d89673ec725e6 (patch)
treefe95e5080ecefaac48140e651fabd4c43803ed4c /homescreen/src/homescreenhandler.cpp
parent281589cfc259dc413f05fb0488fbcceeaeaf06bb (diff)
add bug code
Diffstat (limited to 'homescreen/src/homescreenhandler.cpp')
-rw-r--r--homescreen/src/homescreenhandler.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp
index 3aaef26..4e3d0eb 100644
--- a/homescreen/src/homescreenhandler.cpp
+++ b/homescreen/src/homescreenhandler.cpp
@@ -23,7 +23,8 @@ void* HomescreenHandler::myThis = 0;
HomescreenHandler::HomescreenHandler(QObject *parent) :
QObject(parent),
- mp_hs(NULL)
+ mp_hs(NULL),
+ current_applciation("launcher")
{
}
@@ -79,17 +80,34 @@ void HomescreenHandler::init(int port, const char *token)
});
}
-void HomescreenHandler::tapShortcut(QString application_id)
+void HomescreenHandler::tapShortcut(QString application_id, bool is_full)
{
HMI_DEBUG("HomeScreen","tapShortcut %s", application_id.toStdString().c_str());
struct json_object* j_json = json_object_new_object();
struct json_object* value;
- value = json_object_new_string("normal");
+ if(is_full) {
+ value = json_object_new_string("fullscreen");
+ HMI_DEBUG("HomeScreen","fullscreen");
+ } else {
+ value = json_object_new_string("normal");
+ HMI_DEBUG("HomeScreen","normal");
+ }
json_object_object_add(j_json, "area", value);
-
mp_hs->showWindow(application_id.toStdString().c_str(), j_json);
}
+void HomescreenHandler::setCurrentApplication(QString application_name)
+{
+ HMI_DEBUG("HomeScreen","setCurrentApplication %s", application_name.toStdString().c_str());
+ current_applciation = application_name;
+}
+
+QString HomescreenHandler::getCurrentApplication()
+{
+ HMI_DEBUG("HomeScreen","getCurrentApplication %s", current_applciation.toStdString().c_str());
+ return current_applciation;
+}
+
void HomescreenHandler::onRep_static(struct json_object* reply_contents)
{
static_cast<HomescreenHandler*>(HomescreenHandler::myThis)->onRep(reply_contents);