-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (34 loc) · 1.2 KB
/
Copy pathmain.cpp
File metadata and controls
42 lines (34 loc) · 1.2 KB
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
33
34
35
36
37
38
39
40
41
42
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <QtCore/QDebug>
#include <iostream>
#include "cpp_src/ProtocolFSM.hpp"
#include "cpp_src/backend.h"
#include <QQmlComponent>
#include <QQmlProperty>
#include <QQmlContext>
#include "protobuf/Protocol_Commands.pb.h"
QT_USE_NAMESPACE
int main(int argc, char *argv[])
{
//GOOGLE_PROTOBUF_VERIFY_VERSION;
qmlRegisterType<Backend>("Backend", 1, 0, "Backend");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
qDebug() << "Starting smart glass application.";
// Backend da aplicação gráfica
// Backend backend;
// engine.rootContext()->setContextProperty("backend", &backend);
// QObject *rootObject = engine.rootObjects().first();
// QObject *homePage = rootObject->findChild<QObject*>("homePage");
// qDebug() << homePage;
// qDebug() << homePage->property("infoPaneText");
app.exec();
//google::protobuf::ShutdownProtobufLibrary();
}