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

Last change on this file since 7225 was 7225, checked in by cmarqu, 12 years ago

Add some initial translation infrastructure and the beginnings of a German translation.

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