forked from chili-epfl/Carpenter-App-RoofDesigner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·34 lines (24 loc) · 1.01 KB
/
main.cpp
File metadata and controls
executable file
·34 lines (24 loc) · 1.01 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
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtQml>
#include <sketch_converter.h>
#include <sketchconstraintssolver.h>
#include <sketchlolexporter.h>
#include <displaykeyboard.h>
#include <QSharedPointer>
#include <QSharedDataPointer>
#include <QDir>
#include <QDebug>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
qmlRegisterType<SketchConverter>("SketchConverter", 1, 0, "SketchConverter");
qmlRegisterType<SketchConstraintsSolver>("SketchConstraintsSolver", 1, 0, "SketchConstraintsSolver");
qmlRegisterType<SketchLolExporter>("SketchLolExporter", 1, 0, "SketchLolExporter");
qmlRegisterType<DisplayKeyboard>("DisplayKeyboard", 1, 0, "DisplayKeyboard");
engine.rootContext()->setContextProperty("appPath", QDir().currentPath());
engine.rootContext()->setContextProperty("appUrl", QUrl::fromLocalFile(QDir().currentPath()).toString());
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}