-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (32 loc) · 942 Bytes
/
main.cpp
File metadata and controls
38 lines (32 loc) · 942 Bytes
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
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QtQml>
#include <QGuiApplication>
#include <QtQuick/QQuickView>
#include "moleculardynamics.h"
#include <QSurfaceFormat>
#include <QGLFormat>
#include <QOpenGLContext>
#include <settings.h>
#include <system.h>
#include <thermostat.h>
#include <statisticssampler.h>
#include <iostream>
#include <QFontDatabase>
using namespace std;
# if defined (Q_OS_IOS)
extern "C" int qtmn (int argc, char * argv [])
#else
int main (int argc, char * argv [])
# endif
{
qmlRegisterType<MolecularDynamics>("MolecularDynamics", 1, 0, "MolecularDynamics");
QGuiApplication app(argc, argv);
QQuickView view;
QFontDatabase::addApplicationFont(":/fonts/SourceSansPro-Regular.ttf");
app.setFont(QFont("Source Sans Pro"));
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl("qrc:///Molecules.qml"));
view.show();
return app.exec();
}