Subversion Repositories Projects

Rev

Rev 674 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
674 KeyOz 1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
 
20
#include <QtGui/QApplication>
908 - 21
#include <QTranslator>
674 KeyOz 22
#include "Dialogs/dlg_Main.h"
23
 
24
int main(int argc, char *argv[])
25
{
26
    QApplication App(argc, argv);
27
 
908 - 28
    QString locale = QLocale::system().name();
29
    qDebug() << "QMK-Maps_" << locale;
30
 
31
    // Enable translation service
32
    QTranslator translator;
33
 
34
    QDir dir(argv[0]);
35
    QString appPath = dir.canonicalPath().toAscii().append("_");
36
 
37
     if (!translator.load(QString(appPath).append(locale))) {
38
         qDebug() << "Error loading translation file: " << appPath << locale;
39
     }
40
 
41
    App.installTranslator(&translator);
42
 
674 KeyOz 43
    dlg_Main *MainApp = new dlg_Main();
44
 
45
    MainApp->show();
46
    MainApp->create_Map();
47
    int iReturn = App.exec();
48
 
49
    delete MainApp;
50
 
51
    return iReturn;
52
}