#include "preferences.h"
#include <QApplication>
#include <QBitmap>
#include <QLibraryInfo>
#include <QPixmap>
#include <QSplashScreen>
#include <QTranslator>
Go to the source code of this file.
◆ main()
auto main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| -> int
|
main
- Parameters
-
argc | argument count |
argv | argument vector |
- Returns
- int EXIT CODE
Definition at line 23 of file main.cpp.
25 QApplication app(argc, argv);
28 QPixmap pixmap(QStringLiteral(
":/resources/logo"));
29 QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
31 splash.setMask(pixmap.mask());
35 QApplication::setOrganizationName(QStringLiteral(
"Thomas Kais"));
36 QApplication::setApplicationName(QStringLiteral(
"FotoBox"));
37 QApplication::setApplicationVersion(QStringLiteral(
"1.4.0"));
39 QTranslator qtTranslator;
40 QTranslator appTranslator;
42 if (qtTranslator.load(QLocale(), QStringLiteral(
"qt"), QStringLiteral(
"_"),
43 #
if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
44 QLibraryInfo::path(QLibraryInfo::TranslationsPath
46 QLibraryInfo::location(QLibraryInfo::TranslationsPath
49 QApplication::installTranslator(&qtTranslator);
53 if (QLocale::system().language() == QLocale::German) {
54 result = appTranslator.load(QStringLiteral(
":/resources/translation_de"));
56 result = appTranslator.load(QStringLiteral(
":/resources/translation_en"));
59 QApplication::installTranslator(&appTranslator);
64 splash.finish(dialog);
67 return QApplication::exec();
Preference class to change and store the application settings.