44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
#include "mainwindow.h"
|
|
|
|
#include "settingsdialog.h"
|
|
#include <QApplication>
|
|
#include <QDir>
|
|
#include <QLibraryInfo>
|
|
#include <QMessageBox>
|
|
#include <QSettings>
|
|
#include <QTranslator>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
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
|
|
qTranslator.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<MainWindow>();
|
|
mainWin->show();
|
|
|
|
return kimaApp.exec();
|
|
}
|