X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2Fmain.cpp;h=381b9a2449f84603b228490ed4d0acd2d6884076;hb=69ab2870ea1fbac6808dac791e141f3009e98724;hp=007711cad218667edb9a00c911a1f82bd91fa6b9;hpb=bd47464dafd7110586163bbd6dc89a30fccd6a26;p=apps%2Fonscreenapp.git diff --git a/app/main.cpp b/app/main.cpp index 007711c..381b9a2 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -31,12 +31,18 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); +#if 0 QCoreApplication::setOrganizationDomain("LinuxFoundation"); QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); QCoreApplication::setApplicationName("Onscreenapp"); QCoreApplication::setApplicationVersion("0.1.0"); +#endif - QQuickStyle::setStyle("AGL"); + // this is necessary to identify app, setApplicationName is only for the + // title + app.setDesktopFileName(APP_ID); + + //QQuickStyle::setStyle("AGL"); QCommandLineParser parser; parser.addPositionalArgument("port", app.translate("main", "port for binding")); @@ -69,6 +75,7 @@ int main(int argc, char *argv[]) QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast(root); + QObject::connect(eventHandler, SIGNAL(updateModel(QVariant)), window, SLOT(setOnScreenModel(QVariant))); QObject::connect(eventHandler, SIGNAL(showOnScreen()), window, SLOT(showOnScreen())); QObject::connect(eventHandler, SIGNAL(hideOnScreen()), window, SLOT(hideOnScreen()));