From 719467a4fb813756cc6da60de2d5859ec68e1327 Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Thu, 30 May 2019 13:48:44 +0800 Subject: change for als2019 --- app/Mid.qml | 2 +- app/Shift.qml | 2 +- app/Speed.qml | 2 +- app/Tacho.qml | 2 +- app/app.pri | 2 +- app/camera.h | 2 +- app/main.cpp | 15 +++++++++------ app/main.qml | 2 +- 8 files changed, 16 insertions(+), 13 deletions(-) (limited to 'app') diff --git a/app/Mid.qml b/app/Mid.qml index 81cb672..51daf98 100644 --- a/app/Mid.qml +++ b/app/Mid.qml @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/Shift.qml b/app/Shift.qml index c27025b..7d2d017 100644 --- a/app/Shift.qml +++ b/app/Shift.qml @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/Speed.qml b/app/Speed.qml index 5d9b349..2deabc6 100644 --- a/app/Speed.qml +++ b/app/Speed.qml @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/Tacho.qml b/app/Tacho.qml index a345de9..4dd71d2 100644 --- a/app/Tacho.qml +++ b/app/Tacho.qml @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/app.pri b/app/app.pri index 590c154..d0e1f99 100644 --- a/app/app.pri +++ b/app/app.pri @@ -7,7 +7,7 @@ qtCompileTest(qlibwindowmanager) config_libhomescreen { CONFIG += link_pkgconfig - PKGCONFIG += libhomescreen + PKGCONFIG += qlibhomescreen DEFINES += HAVE_LIBHOMESCREEN } diff --git a/app/camera.h b/app/camera.h index 6890745..11b5e82 100644 --- a/app/camera.h +++ b/app/camera.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/main.cpp b/app/main.cpp index 0330858..2a57d08 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * Copyright (C) 2016 The Qt Company Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,7 +29,7 @@ #include #ifdef HAVE_LIBHOMESCREEN -#include +#include #endif #ifdef HAVE_QLIBWINDOWMANAGER #include @@ -96,18 +96,21 @@ int main(int argc, char *argv[]) #ifdef HAVE_LIBHOMESCREEN // HomeScreen - LibHomeScreen* hs = new LibHomeScreen(); + QLibHomeScreen* qhs = new QLibHomeScreen(); std::string token = secret.toStdString(); - hs->init(port, token.c_str()); + qhs->init(port, token.c_str()); // Set the event handler for Event_TapShortcut which will activate the surface for windowmanager - hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [qwm, myname](json_object *object){ - qwm->activateSurface(myname, "split.main"); + qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow, [qwm, myname](json_object *object){ + qwm->activateWindow(myname); }); #endif engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast(root); +#ifdef HAVE_LIBHOMESCREEN + qhs->setQuickWindow(window); +#endif #ifdef HAVE_QLIBWINDOWMANAGER // QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateSurface())); diff --git a/app/main.qml b/app/main.qml index 15ce24d..be756b8 100644 --- a/app/main.qml +++ b/app/main.qml @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. -- cgit 1.2.3-korg