aheinecke@404: /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik aheinecke@404: * Software engineering by Intevation GmbH aheinecke@404: * aheinecke@404: * This file is Free Software under the GNU GPL (v>=2) aheinecke@404: * and comes with ABSOLUTELY NO WARRANTY! aheinecke@404: * See LICENSE.txt for details. aheinecke@404: */ rrenkert@333: #include "administratorwindow.h" rrenkert@333: rrenkert@333: #include rrenkert@333: #include rrenkert@333: #include rrenkert@333: #include aheinecke@420: #include aheinecke@420: #include rrenkert@333: rrenkert@333: #ifndef VERSION rrenkert@333: #define VERSION "0.0.1" rrenkert@333: #endif rrenkert@333: rrenkert@333: #ifndef APPNAME rrenkert@333: #define APPNAME "administrator" rrenkert@333: #endif rrenkert@333: rrenkert@333: #ifndef ORGANIZATION aheinecke@409: #define ORGANIZATION "BSI" rrenkert@333: #endif rrenkert@333: rrenkert@333: #ifdef Q_OS_WIN rrenkert@333: Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) rrenkert@333: #else rrenkert@333: Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) rrenkert@333: #endif rrenkert@333: rrenkert@333: int main(int argc, char **argv) rrenkert@333: { rrenkert@333: QApplication app (argc, argv); rrenkert@333: rrenkert@333: QStringList arguments = QApplication::arguments(); rrenkert@333: rrenkert@333: QApplication::setOrganizationName(QString::fromLatin1(ORGANIZATION)); rrenkert@333: QApplication::setApplicationName(QString::fromLatin1(APPNAME)); rrenkert@333: QApplication::setApplicationVersion(QString::fromLatin1(VERSION)); rrenkert@333: QSettings::setDefaultFormat(QSettings::IniFormat); rrenkert@333: aheinecke@420: QTranslator translator; aheinecke@420: if (QLocale::system().name() == "C") { aheinecke@420: /* Useful for testing / development as the primary target is german */ aheinecke@420: translator.load(":/l10n/administrator_de_DE"); aheinecke@420: } else { aheinecke@420: translator.load(":/l10n/administrator_" + QLocale::system().name()); aheinecke@420: qDebug() << "Loading translations for: " << "administrator_" + aheinecke@420: QLocale::system().name(); aheinecke@420: } aheinecke@420: app.installTranslator(&translator); aheinecke@420: rrenkert@333: AdministratorWindow adminWin; rrenkert@333: adminWin.show(); rrenkert@333: rrenkert@333: return app.exec(); rrenkert@333: }