summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-05-20 13:33:09 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-05-20 13:33:09 +0800
commitda1716f58a93552e6c367aa22eeff1c97cbed310 (patch)
treea88e910d4a2f062abb6e146f5212081230c97ff3
parentbae89510b8e8d833dc454a02285af55e7b360af9 (diff)
-rw-r--r--app/app.pro2
-rw-r--r--app/main.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/app/app.pro b/app/app.pro
index 566d2b6..c16cdb4 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -4,7 +4,7 @@ QT = quickcontrols2 websockets
SOURCES = main.cpp
CONFIG += link_pkgconfig
-PKGCONFIG += libhomescreen qlibwindowmanager qtappfw
+PKGCONFIG += qlibhomescreen qlibwindowmanager qtappfw
RESOURCES += \
settings.qrc \
diff --git a/app/main.cpp b/app/main.cpp
index 8d78b74..67f9983 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -24,7 +24,7 @@
#include <QtQml/QQmlContext>
#include <QtQuickControls2/QQuickStyle>
#include <QQuickWindow>
-#include <libhomescreen.hpp>
+#include <qlibhomescreen.h>
#include <bluetooth.h>
#include <network.h>
#include <qlibwindowmanager.h>
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
context->setContextProperty("network", new Network(bindingAddressWS, context));
std::string token = secret.toStdString();
- LibHomeScreen* hs = new LibHomeScreen();
+ QLibHomeScreen* qhs = new QLibHomeScreen();
QLibWindowmanager* qwm = new QLibWindowmanager();
// WindowManager
@@ -88,9 +88,9 @@ int main(int argc, char *argv[])
});
// HomeScreen
- hs->init(port, token.c_str());
+ qhs->init(port, token.c_str());
// Set the event handler for Event_ShowWindow which will activate the surface for windowmanager
- hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){
+ qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){
qDebug("Surface %s got showWindow\n", graphic_role.toStdString().c_str());
qwm->activateWindow(graphic_role);
});
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
engine.load(QUrl(QStringLiteral("qrc:/Settings.qml")));
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
- QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateWindow()));
+ qhs->setQuickWindow(window);
return app.exec();
}