-
Notifications
You must be signed in to change notification settings - Fork 19
/
main.cpp
32 lines (23 loc) · 790 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <QtQuick>
//#include <QtGui>
//#include <QtPlugin>
#include "mainview.h"
#include "options.h"
#include "handler.h"
Q_IMPORT_PLUGIN(QsgEpaperPlugin)
int main(int argc, char *argv[])
{
qputenv("QMLSCENE_DEVICE", "epaper");
qputenv("QT_QPA_PLATFORM", "epaper:enable_fonts");
qputenv("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS", "rotate=180");
system("/usr/bin/button-capture &");
QGuiApplication app(argc, argv);
MainView view;
srand(time(NULL));
view.rootContext()->setContextProperty("screenGeometry", app.primaryScreen()->geometry());
view.engine()->addImportPath(QStringLiteral(DEPLOYMENT_PATH));
view.setSource(QDir(DEPLOYMENT_PATH).filePath("qml/Main.qml"));
Options options(&view, &app);
view.show();
return app.exec();
}