X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2Fmain.cpp;h=64f674673999b619e1cc175a0b2d99536be91a1b;hb=c0e3cb70d4c9ddd70ce9a6a74152820293b227d9;hp=8fa8117e7cd005a0c2db07d27ca3804264b9acba;hpb=13bb3fad73f1933e75ea17e101c5f8a3d2c2f561;p=apps%2Fmediaplayer.git diff --git a/app/main.cpp b/app/main.cpp index 8fa8117..64f6746 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -28,8 +28,10 @@ #include #include #include -#include #include +#include + +#include int main(int argc, char *argv[]) { @@ -70,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); @@ -96,8 +99,10 @@ int main(int argc, char *argv[]) } }); - context->setContextProperty("mediaplayer", new Mediaplayer(bindingAddress)); - context->setContextProperty("bluetooth_connection", new Bluetooth(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);