-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.cpp
45 lines (38 loc) · 1.39 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
/****************************************************************************
**
** This file is part of the Blackfriars Trading Terminal
**
** Copyright (C) 2021 Alexander Mishurov
**
** GNU General Public License Usage
** This file may be used under the terms of the GNU
** General Public License version 3. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "frontend/QFCharts/QFCharts.h"
#include "frontend/Blackfriars/Blackfriars.h"
#include <QtWidgets/QApplication>
#include <QtQml/QQmlApplicationEngine>
#include <QtQuick/QQuickWindow>
int main(int argc, char *argv[])
{
registerQFChartsTypes();
initBlackfriars();
QApplication app(argc, argv);
QQmlApplicationEngine engine;
//const QUrl url(QStringLiteral("qrc:/main.qml"));
const QUrl url = QUrl::fromLocalFile("../frontend/main.qml");
engine.load(url);
if (engine.rootObjects().isEmpty())
return -1;
// antialiasing
QQuickWindow* window = (QQuickWindow*) engine.rootObjects().first();
QSurfaceFormat format = window->format();
format.setSamples(4);
window->setFormat(format);
return app.exec();
}