YODAU 1.0
YEAR OF THE DEPEND ADULT UNDERGARMENT
Loading...
Searching...
No Matches
frontend/src/main.cpp
Go to the documentation of this file.
1#include <QApplication>
2#include <QCommandLineParser>
3#include <QCoreApplication>
4#include <memory>
5
6#include "helpers/str_label.hpp"
8
9#ifdef KC_KDE
10#include <KAboutData>
11#include <KLocalizedString>
12#endif
13
14int main(int argc, char* argv[]) {
15 const QApplication app(argc, argv);
16
17#ifdef KC_KDE
18 KLocalizedString::setApplicationDomain("yodau");
19
20 KAboutData about_data(
21 str_label("yodau"), str_label("yodau"), str_label("1.0"),
22 str_label("YEAR OF THE DEPEND ADULT UNDERGARMENT"), KAboutLicense::MIT,
23 str_label("(c) 2025, Yaroslav Riabtsev"), QString(),
24 str_label("https://github.com/ninjaro/yodau"),
25 str_label("yaroslav.riabtsev@rwth-aachen.de")
26 );
27
28 about_data.addAuthor(
29 str_label("Yaroslav Riabtsev"), str_label("Original author"),
30 str_label("yaroslav.riabtsev@rwth-aachen.de"),
31 str_label("https://github.com/ninjaro"), str_label("ninjaro")
32 );
33
34 KAboutData::setApplicationData(about_data);
35
36 QCommandLineParser parser;
37 about_data.setupCommandLine(&parser);
38 parser.process(app);
39 about_data.processCommandLine(&parser);
40#else
41 QCoreApplication::setApplicationName(str_label("yodau"));
42 QCoreApplication::setOrganizationName(str_label("yodau"));
43 QCoreApplication::setApplicationVersion(str_label("1.0"));
44
45 QCommandLineParser parser;
46 parser.setApplicationDescription(
47 str_label("YEAR OF THE DEPEND ADULT UNDERGARMENT")
48 );
49 parser.addHelpOption();
50 parser.addVersionOption();
51 parser.process(app);
52#endif
53
54 auto window = std::make_unique<main_window>();
55 window->show();
56
57 const int result = QApplication::exec();
58 window.reset();
59 return result;
60}
main_window(QWidget *parent=nullptr)
Construct the main window and create all core UI components.
int main(int argc, char *argv[])
#define str_label(text)
Create a user-visible localized label.
Definition str_label.hpp:29