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

Last change on this file since 9813 was 9813, checked in by Chris Browet, 12 years ago

ADD : names rendering in styles

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