kima2/src/gui/kima2.cpp

37 lines
1.1 KiB
C++
Raw Normal View History

2018-07-14 14:03:35 +02:00
#include "mainwindow.h"
2018-07-06 10:54:22 +02:00
2018-07-14 14:03:35 +02:00
#include <QApplication>
2018-07-30 13:40:58 +02:00
#include <QMessageBox>
#include <QSettings>
#include "settingsdialog.h"
2018-07-06 10:54:22 +02:00
2018-07-14 14:03:35 +02:00
int main(int argc, char* argv[])
2018-07-06 10:54:22 +02:00
{
2018-07-17 10:19:41 +02:00
// Q_INIT_RESOURCE(application);
2018-07-14 14:03:35 +02:00
2018-07-24 15:37:19 +02:00
// Set the locale to german, so that currency is correct
2018-07-30 13:40:58 +02:00
// std::locale german("de_DE.utf-8");
2018-07-24 15:37:19 +02:00
std::locale myLocale("");
std::locale::global(myLocale);
2018-07-14 14:03:35 +02:00
QApplication kimaApp{argc, argv};
2018-07-17 08:25:41 +02:00
QCoreApplication::setOrganizationName("RustySoft");
QCoreApplication::setOrganizationDomain("rustysoft.de");
QCoreApplication::setApplicationName("KIMA2");
2018-07-30 13:40:58 +02:00
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();
}
2018-07-14 15:54:11 +02:00
auto mainWin = std::make_unique<MainWindow>();
mainWin->show();
2018-07-09 13:03:43 +02:00
2018-07-14 14:03:35 +02:00
return kimaApp.exec();
2018-07-06 10:54:22 +02:00
}