X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=sample-qml%2Fcalledbyqml.cpp;fp=sample-qml%2Fcalledbyqml.cpp;h=5df584a95c7b44db3d3739ae142dd28091099465;hb=f8ca548fa047968383e9275ead76eacce90fd0a8;hp=0000000000000000000000000000000000000000;hpb=75a4e94d7610db25c98f05cdda9491f4e7c0a4db;p=staging%2FHomeScreen.git diff --git a/sample-qml/calledbyqml.cpp b/sample-qml/calledbyqml.cpp new file mode 100644 index 0000000..5df584a --- /dev/null +++ b/sample-qml/calledbyqml.cpp @@ -0,0 +1,38 @@ +#include "calledbyqml.h" +#include +#include +#include +#include + + +CalledByQml::CalledByQml(QObject *parent) : + QObject(parent) +{ +} + +int CalledByQml::consoleout() +{ + qDebug("consoleout method is called"); + LibHomeScreen libHomeScreen; + libHomeScreen.hardKeyPressed(1); + return 0; +} + +int CalledByQml::showup() +{ + qDebug("showup method is called"); + QGuiApplication app2(); + QQmlApplicationEngine engine2; + QString target(getenv("AFM_APP_INSTALL_DIR")); + qDebug("AFM_APP_INSTALL_DIR is " + target.toLatin1()); + + if(NULL == target) + { + target = "."; + } + + QString load_path; + load_path = target + "/main2.qml"; + //engine2.load(QUrl(load_path)); + return 0; +}