X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2Fmain.cpp;h=64f674673999b619e1cc175a0b2d99536be91a1b;hb=refs%2Ftags%2F6.0.5;hp=4713fdbf2d1dc76e77158dea3813e4a14212f08c;hpb=b5acbc37299218b90908bbaf341cf971ad957c07;p=apps%2Fmediaplayer.git diff --git a/app/main.cpp b/app/main.cpp index 4713fdb..64f6746 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -28,8 +28,8 @@ #include #include #include -#include #include +#include #include @@ -72,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); @@ -98,10 +99,9 @@ int main(int argc, char *argv[]) } }); - context->setContextProperty("mediaplayer", new Mediaplayer(bindingAddress)); - context->setContextProperty("bluetooth_connection", new Bluetooth(bindingAddress)); - - usleep(300000); + 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();