-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
50 lines (43 loc) · 1.68 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
46
47
48
49
50
//
// by Jan Eric Kyprianidis <www.kyprianidis.com>
// Copyright (C) 2008-2011 Computer Graphics Systems Group at the
// Hasso-Plattner-Institut, Potsdam, Germany <www.hpi3d.de>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
#include "mainwindow.h"
#ifdef HAVE_QUICKTIME
#include "quicktime.h"
#endif
static const char* DEFAULT_FILE = ":/test_512x512.png";
int main(int argc, char **argv) {
QApplication::setOrganizationDomain("jkyprian.hpi3d.de");
QApplication::setOrganizationName("jkyprian");
QApplication::setApplicationName("flowabs");
QApplication app(argc, argv);
QApplication::setStyle(new QPlastiqueStyle);
QApplication::setPalette(QApplication::style()->standardPalette());
#ifndef Q_WS_WIN
QFont font = QApplication::font();
font.setPixelSize(11);
QApplication::setFont(font);
#endif
MainWindow mw;
QSettings settings;
mw.restoreGeometry(settings.value("mw").toByteArray());
mw.openSettings(":/default.ini");
mw.show();
mw.ui.glw->open(DEFAULT_FILE);
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
int result = app.exec();
settings.setValue("mw", mw.saveGeometry());
return result;
}