#include "mainwindow.h" #include "settingsdialog.h" #include #include #include #include #include int main(int argc, char* argv[]) { // Q_INIT_RESOURCE(application); // Set the locale to german, so that currency is correct // std::locale german("de_DE.utf-8"); std::locale myLocale(""); std::locale::global(myLocale); QApplication kimaApp{argc, argv}; QCoreApplication::setOrganizationName("RustySoft"); QCoreApplication::setOrganizationDomain("rustysoft.de"); QCoreApplication::setApplicationName("KIMA2"); QTranslator qTranslator; QLocale german(QLocale::German); #ifdef __linux__ qTranslator.load("qt_" + german.name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); #endif #ifdef _WIN32 qtTranslator.load("qt_" + german.name(), QApplication::applicationDirPath() + QDir::separator() + "translations"); #endif kimaApp.installTranslator(&qTranslator); QSettings settings{}; while (!settings.contains("global/cashPointNo")) { QMessageBox(QMessageBox::Icon::Information, "Erster Start von KIMA2", "Es wurden keine Einstellungen gefunden. Vermutlich starteten Sie KIMA2 zum " "ersten Mal. Bitte legen Sie nun die Einstellungen fest.", QMessageBox::StandardButton::Ok) .exec(); SettingsDialog().exec(); } auto mainWin = std::make_unique(); mainWin->show(); return kimaApp.exec(); }