X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2Fmain.cpp;h=64f674673999b619e1cc175a0b2d99536be91a1b;hb=be875ab6df6363a0a85e75c596d876d68e9c0bb6;hp=928b825da56494018813063ddd9e1cf8746a56f2;hpb=74c70d0ac87d4674646e53d2af781d9084a7ea06;p=apps%2Fmediaplayer.git diff --git a/app/main.cpp b/app/main.cpp index 928b825..64f6746 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -29,6 +29,9 @@ #include #include #include +#include + +#include int main(int argc, char *argv[]) { @@ -69,6 +72,7 @@ int main(int argc, char *argv[]) if(qwm->init(port,secret) != 0){ exit(EXIT_FAILURE); } + AGLScreenInfo screenInfo(qwm->get_scale_factor()); // Request a surface as described in layers.json windowmanager’s file if (qwm->requestSurface(myname) != 0) { exit(EXIT_FAILURE); @@ -95,7 +99,10 @@ int main(int argc, char *argv[]) } }); - context->setContextProperty("mediaplayer", new Mediaplayer(bindingAddress)); + context->setContextProperty("mediaplayer", new Mediaplayer(bindingAddress, context)); + context->setContextProperty("radio", new Radio(bindingAddress, context)); + context->setContextProperty(QStringLiteral("screenInfo"), &screenInfo); + engine.load(QUrl(QStringLiteral("qrc:/MediaPlayer.qml"))); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast(root);