aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/main.cpp
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-30 15:33:40 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-30 15:33:40 +0900
commit79e9e0509b2b78e7175eb03121221ccb37689305 (patch)
treeb4e9bb0dfa3932b05b5a355046dae8712e456336 /homescreen/src/main.cpp
parente221104d1e51d84212d3ec131473113c8762d3e7 (diff)
disable fullscreen button if not navigation
Diffstat (limited to 'homescreen/src/main.cpp')
-rw-r--r--homescreen/src/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp
index 9b83edc..6e9dd1c 100644
--- a/homescreen/src/main.cpp
+++ b/homescreen/src/main.cpp
@@ -136,15 +136,22 @@ int main(int argc, char *argv[])
layoutHandler->set_event_handler(QLibWindowmanager::Event_ScreenUpdated, [layoutHandler, launcher, homescreenHandler, root](json_object *object) {
json_object *jarray = json_object_object_get(object, "ids");
+ HMI_DEBUG("HomeScreen","ids=%s", json_object_to_json_string(object));
int arrLen = json_object_array_length(jarray);
+ QString label = QString("");
for( int idx = 0; idx < arrLen; idx++)
{
- QString label = QString(json_object_get_string( json_object_array_get_idx(jarray, idx) ));
+ label = QString(json_object_get_string( json_object_array_get_idx(jarray, idx) ));
HMI_DEBUG("HomeScreen","Event_ScreenUpdated application11: %s.", label.toStdString().c_str());
homescreenHandler->setCurrentApplication(label);
QMetaObject::invokeMethod(launcher, "setCurrent", Qt::QueuedConnection, Q_ARG(QString, label));
- QMetaObject::invokeMethod(root, "changeSwitchState", Q_ARG(QVariant, homescreenHandler->isSplit()));
}
+ if((arrLen == 1) && (QString("navigation") == label)){
+ QMetaObject::invokeMethod(root, "changeSwitchState", Q_ARG(QVariant, true));
+ }else{
+ QMetaObject::invokeMethod(root, "changeSwitchState", Q_ARG(QVariant, false));
+ }
+
});
touchArea->setWindow(window);