source: subversion/applications/editors/merkaartor/Main.cpp @ 13163

Last change on this file since 13163 was 13163, checked in by Chris Browet, 11 years ago

ADD : Custom Qt style (skulpture by Christoph Feck) to bypass Qt expanding dock problem on linux. Enable via preferences-visual. (fixes #1482)

  • Property svn:eol-style set to native
File size: 927 bytes
Line 
1#include <QtGui/QApplication>
2#include <QtGui/QMessageBox> 
3
4#include <QLibraryInfo>
5
6#include "MainWindow.h"
7#include "Preferences/MerkaartorPreferences.h"
8
9int main(int argc, char** argv)
10{
11        QApplication app(argc,argv);
12
13        QCoreApplication::setOrganizationName("BartVanhauwaert");
14        QCoreApplication::setOrganizationDomain("www.irule.be");
15        QCoreApplication::setApplicationName("Merkaartor");
16
17#if defined(Q_OS_MAC)
18        QDir dir(QApplication::applicationDirPath());
19        dir.cdUp();
20        dir.cd("plugins");
21        QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
22#endif
23
24        MainWindow Main;
25
26#ifdef _MOBILE
27//      Main.showMaximized();
28        Main.showFullScreen();
29#else
30        Main.show();
31#endif
32        QStringList fileNames = QCoreApplication::arguments();
33        fileNames.removeFirst();
34
35        Main.loadFiles(fileNames);
36
37        if (fileNames.isEmpty())
38                QDir::setCurrent(MerkaartorPreferences::instance()->getWorkingDir());
39
40        int x = app.exec();
41        return x;
42}
43
44
Note: See TracBrowser for help on using the repository browser.