diff options
author | 2019-06-11 19:51:05 +0900 | |
---|---|---|
committer | 2019-06-11 19:51:05 +0900 | |
commit | 655ff6ee28103ec2373953dc60b75b2db0de0014 (patch) | |
tree | 46f73cbeaaa6219b63b6442b2647963aa3f21824 /app/main.cpp | |
parent | 5868a412fa7ff013361231ee017db7bc2afb2742 (diff) |
change hs to qhssandbox/zheng_wenlong/als2019_horizontal
Diffstat (limited to 'app/main.cpp')
-rw-r--r-- | app/main.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/app/main.cpp b/app/main.cpp index 162af79..f44dd72 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -24,8 +24,8 @@ #include "translator.h" -#ifdef HAVE_LIBHOMESCREEN -#include <libhomescreen.hpp> +#ifdef HAVE_QLIBHOMESCREEN +#include <qlibhomescreen.h> #endif #ifdef HAVE_QLIBWINDOWMANAGER #include <qlibwindowmanager.h> @@ -88,14 +88,14 @@ int main(int argc, char *argv[]) }); #endif -#ifdef HAVE_LIBHOMESCREEN - LibHomeScreen* hs = new LibHomeScreen(); +#ifdef HAVE_QLIBHOMESCREEN + QLibHomeScreen* qhs = new QLibHomeScreen(); // HomeScreen 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){ + qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow, [qwm, myname](json_object *object){ qwm->activateSurface(myname); }); #endif @@ -104,7 +104,8 @@ int main(int argc, char *argv[]) QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast<QQuickWindow *>(root); #ifdef HAVE_QLIBWINDOWMANAGER - QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateSurface())); + // QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateSurface())); + qhs->setQuickWindow(window); #else window->resize(1920, 720); window->setVisible(true); |