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

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

ADD : Area transparency (fixes #838)
ADD : Allow on-the-fly language change
ADD : Remember tag view first column size (fixes #1414)
FIX : Allow up to 999Mb for background image cache (fixes #1311)

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