X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=inline;f=app%2Fmain.cpp;h=255b39d833e76149e42a9f57e76d213ff7bdc13d;hb=d32d36b936cb031ba1b11c67c0d9c6afbdc280b3;hp=c0d4b5b6b53fb5a00da8adea8fadbccae443ed8f;hpb=1b8ad361e3955ee469a38486a715bc0dc615c59f;p=apps%2Fmixer.git diff --git a/app/main.cpp b/app/main.cpp index c0d4b5b..255b39d 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,8 @@ #else #include #endif -#include "mixer.h" +#include "mixer.hpp" +#include "audiorole.hpp" int main(int argc, char *argv[]) { @@ -82,7 +84,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } AGLScreenInfo screenInfo(qwm->get_scale_factor()); - engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo); + engine.rootContext()->setContextProperty(QStringLiteral("scale_factor"), screenInfo.scale_factor()); // Request a surface as described in layers.json windowmanager’s file if (qwm->requestSurface(graphic_role) != 0) { exit(EXIT_FAILURE); @@ -101,8 +103,9 @@ int main(int argc, char *argv[]) qDebug("Surface %s got tapShortcut\n", graphic_role.toStdString().c_str()); qwm->activateWindow(graphic_role); }); +#else + engine.rootContext()->setContextProperty(QStringLiteral("scale_factor"), 1.0); #endif - engine.load(QUrl(QStringLiteral("qrc:/Mixer.qml"))); // Find the instantiated model QObject and connect the signals/slots