diff options
-rw-r--r-- | app/app.pro | 2 | ||||
-rw-r--r-- | app/main.cpp | 36 | ||||
-rw-r--r-- | package/config.xml | 2 |
3 files changed, 6 insertions, 34 deletions
diff --git a/app/app.pro b/app/app.pro index 41566ec..750e2f0 100644 --- a/app/app.pro +++ b/app/app.pro @@ -1,6 +1,6 @@ TARGET = navigation QT = quick qml -PKGCONFIG += qlibhomescreen qlibwindowmanager qtappfw-navigation +PKGCONFIG += qtappfw-navigation QT += positioning QT += core diff --git a/app/main.cpp b/app/main.cpp index b2b9185..8a11239 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#include <qlibwindowmanager.h> -#include <qlibhomescreen.h> #include <string> #include <QtCore/QDebug> #include <QtCore/QCommandLineParser> @@ -37,11 +35,16 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); QString graphic_role = QString("navigation"); int port = 1700; + QString token = "hello"; + QCoreApplication::setOrganizationDomain("LinuxFoundation"); QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); QCoreApplication::setApplicationName(graphic_role); QCoreApplication::setApplicationVersion("0.1.0"); + + app.setDesktopFileName(graphic_role); + QCommandLineParser parser; parser.addPositionalArgument("port", app.translate("main", "port for binding")); parser.addPositionalArgument("secret", app.translate("main", "secret for binding")); @@ -76,32 +79,6 @@ int main(int argc, char *argv[]) graphic_role.toStdString().c_str(), port, token.toStdString().c_str()); - - // QLibWM - QLibWindowmanager* qwmHandler = new QLibWindowmanager(); - int res; - if((res = qwmHandler->init(port,token)) != 0){ - fprintf(stderr, "[navigation] init qlibwm err(%d)\n", res); - return -1; - } - if((res = qwmHandler->requestSurface(graphic_role)) != 0) { - fprintf(stderr, "[navigation] request surface err(%d)\n", res); - return -1; - } - qwmHandler->set_event_handler(QLibWindowmanager::Event_SyncDraw, - [qwmHandler, &graphic_role](json_object *object) { - qwmHandler->endDraw(graphic_role); - }); - - // QLibHS - QLibHomeScreen* qhsHandler = new QLibHomeScreen(); - qhsHandler->init(port, token.toStdString().c_str()); - qhsHandler->set_event_handler(QLibHomeScreen::Event_ShowWindow, - [qwmHandler, &graphic_role](json_object *object){ - qDebug("Surface %s got showWindow\n", graphic_role.toStdString().c_str()); - qwmHandler->activateWindow(graphic_role); - }); - MarkerModel model; context->setContextProperty("markerModel", &model); @@ -109,9 +86,6 @@ int main(int argc, char *argv[]) context->setContextProperty("guidanceModule", &guidance); engine.load(QUrl(QStringLiteral("qrc:/navigation.qml"))); - QObject *root = engine.rootObjects().first(); - QQuickWindow *window = qobject_cast<QQuickWindow *>(root); - QObject::connect(window, SIGNAL(frameSwapped()), qwmHandler, SLOT(slotActivateSurface())); return app.exec(); } diff --git a/package/config.xml b/package/config.xml index 4f3f2ca..b1fbd40 100644 --- a/package/config.xml +++ b/package/config.xml @@ -7,8 +7,6 @@ <author>Qt</author> <license>APL 2.0</license> <feature name="urn:AGL:widget:required-api"> - <param name="windowmanager" value="ws"/> - <param name="homescreen" value="ws"/> <param name="navigation" value="ws"/> </feature> <feature name="urn:AGL:widget:required-permission"> |