+
+ WMHandler wmh;
+ wmh.on_screen_updated = [launcher, root](std::vector<std::string> list) {
+ for(const auto& i : list) {
+ HMI_DEBUG("HomeScreen", "ids=%s", i.c_str());
+ }
+ int arrLen = list.size();
+ QString label = QString("");
+ for( int idx = 0; idx < arrLen; idx++)
+ {
+ label = list[idx].c_str();
+ HMI_DEBUG("HomeScreen","Event_ScreenUpdated application: %s.", label.toStdString().c_str());
+ QMetaObject::invokeMethod(launcher, "setCurrent", Qt::QueuedConnection, Q_ARG(QString, label));
+ if(label == "launcher") {
+ QMetaObject::invokeMethod(root, "turnToNormal");
+ } else {
+ QMetaObject::invokeMethod(root, "turnToFullscreen");
+ }
+ if((arrLen == 1) && (QString("restriction") != label)) {
+ QMetaObject::invokeMethod(root, "disableSplitSwitchBtn");
+ } else {
+ QMetaObject::invokeMethod(root, "enableSplitSwitchBtn");
+ }
+ }
+ };
+ homescreenHandler->setWMHandler(wmh);
+ homescreenHandler->attach(&engine);
+