Code Review
/
apps
/
hvac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
change hs to qhs
[apps/hvac.git]
/
app
/
main.cpp
diff --git
a/app/main.cpp
b/app/main.cpp
index
0bfdd52
..
f44dd72
100644
(file)
--- a/
app/main.cpp
+++ b/
app/main.cpp
@@
-24,8
+24,8
@@
#include "translator.h"
#include "translator.h"
-#ifdef HAVE_LIBHOMESCREEN
-#include <
libhomescreen.hpp
>
+#ifdef HAVE_
Q
LIBHOMESCREEN
+#include <
qlibhomescreen.h
>
#endif
#ifdef HAVE_QLIBWINDOWMANAGER
#include <qlibwindowmanager.h>
#endif
#ifdef HAVE_QLIBWINDOWMANAGER
#include <qlibwindowmanager.h>
@@
-88,15
+88,14
@@
int main(int argc, char *argv[])
});
#endif
});
#endif
-#ifdef HAVE_LIBHOMESCREEN
-
LibHomeScreen* hs = new
LibHomeScreen();
+#ifdef HAVE_
Q
LIBHOMESCREEN
+
QLibHomeScreen* qhs = new Q
LibHomeScreen();
// HomeScreen
std::string token = secret.toStdString();
// HomeScreen
std::string token = secret.toStdString();
- hs->init(port, token.c_str());
+
q
hs->init(port, token.c_str());
// Set the event handler for Event_TapShortcut which will activate the surface for windowmanager
// 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){
- qDebug("Surface %s got tapShortcut\n", myname.toStdString().c_str());
+ qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow, [qwm, myname](json_object *object){
qwm->activateSurface(myname);
});
#endif
qwm->activateSurface(myname);
});
#endif
@@
-105,9
+104,10
@@
int main(int argc, char *argv[])
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
#ifdef HAVE_QLIBWINDOWMANAGER
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
#else
- window->resize(1
080, 1920 - 218 - 215
);
+ window->resize(1
920, 720
);
window->setVisible(true);
#endif
window->setVisible(true);
#endif