2021-07-17 05:09:39 +02:00
|
|
|
#include <QGuiApplication>
|
|
|
|
#include <QLoggingCategory>
|
|
|
|
#include <QQmlApplicationEngine>
|
|
|
|
#include <QQmlContext>
|
|
|
|
|
|
|
|
#include "connectionhandler.h"
|
|
|
|
#include "devicefinder.h"
|
|
|
|
#include "devicehandler.h"
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2021-07-20 02:39:01 +02:00
|
|
|
//QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
|
2021-07-17 05:09:39 +02:00
|
|
|
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
|
|
QGuiApplication app(argc, argv);
|
|
|
|
|
|
|
|
ConnectionHandler connectionHandler;
|
|
|
|
DeviceHandler deviceHandler;
|
|
|
|
|
|
|
|
qmlRegisterUncreatableType<DeviceHandler>("Shared", 1, 0, "AddressType", "Enum is not a type");
|
|
|
|
|
|
|
|
QQmlApplicationEngine engine;
|
|
|
|
engine.rootContext()->setContextProperty("connectionHandler", &connectionHandler);
|
|
|
|
engine.rootContext()->setContextProperty("deviceHandler", &deviceHandler);
|
|
|
|
|
|
|
|
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|