summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/main.cpp b/app/main.cpp
index f555475..427a08c 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 <qlibwindowmanager.h>
#include <stdlib.h>
#include "PresetDataObject.h"
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
context->setContextProperty(QStringLiteral("bindingAddress"), bindingAddress);
std::string token = secret.toStdString();
- LibHomeScreen* hs = new LibHomeScreen();
+ QLibHomeScreen* qhs = new QLibHomeScreen();
QLibWindowmanager* qwm = new QLibWindowmanager();
// WindowManager
@@ -111,9 +111,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);
});
@@ -121,8 +121,7 @@ int main(int argc, char *argv[])
engine.load(QUrl(QStringLiteral("qrc:/Radio.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();
}