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

Last change on this file since 7369 was 7369, checked in by Dirk Stoecker, 12 years ago

fixed i18n issues, unified version handling, removed compiler warnings

  • Property svn:eol-style set to native
File size: 955 bytes
Line 
1#include <QtGui/QApplication>
2#include <QtGui/QMessageBox> 
3
4#include <QTranslator>
5#include <QLocale>
6
7#include "MainWindow.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        QTranslator qtTranslator;
18        qtTranslator.load("qt_" + QLocale::system().name()
19#ifdef TRANSDIR_SYSTEM
20        , TRANSDIR_SYSTEM
21#endif
22        );
23        app.installTranslator(&qtTranslator);
24
25        QTranslator merkaartorTranslator;
26        merkaartorTranslator.load("merkaartor_" + QLocale::system().name()
27#ifdef TRANSDIR_MERKAARTOR
28        , TRANSDIR_MERKAARTOR
29#endif
30        );
31        app.installTranslator(&merkaartorTranslator);
32
33        MainWindow Main;
34
35        const QStringList & params = QCoreApplication::arguments();
36        if (params.size() == 2)
37                Main.loadFile(params.at(1));
38       
39        Main.show();
40
41        return app.exec();
42}
43
44
Note: See TracBrowser for help on using the repository browser.