-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (25 loc) · 719 Bytes
/
Copy pathmain.cpp
File metadata and controls
30 lines (25 loc) · 719 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
#include "app/logindialog.h"
#include "app/mainwindow.h"
#include "model/entity/athlete.h"
#include "model/entitymanager.h"
#include <QApplication>
#include <QTranslator>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setOrganizationName("TurnFix");
app.setApplicationName("TurnFix");
QTranslator translator;
translator.load("qt_de.qm", ":/translations/");
app.installTranslator(&translator);
EntityManager em;
auto pLoginDlg = new LoginDialog(&em);
if (pLoginDlg->exec() != 1) {
return 0;
} else {
MainWindow mw(&em, pLoginDlg->selectedEvent());
pLoginDlg->setParent(&mw);
mw.show();
return app.exec();
}
}