From a23962e9a3b5e12cead19ffcd02c19fffc09689b Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 8 Feb 2015 10:15:50 +0100 Subject: [PATCH] Stub for main application --- src/danbooru_client.cpp | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/danbooru_client.cpp diff --git a/src/danbooru_client.cpp b/src/danbooru_client.cpp new file mode 100644 index 0000000..d22c0dc --- /dev/null +++ b/src/danbooru_client.cpp @@ -0,0 +1,66 @@ +/* + * Copyright 2015 Luca Beltrame + * + * This file is part of Danbooru Client. + * + * Danbooru Client is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Danbooru Client is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Danbooru Client. If not, see . + */ + +#include +#include +#include +#include + +#include +#include + +#include "mainwindow.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QCoreApplication::setApplicationName(QLatin1Literal("danbooru-client")); + QCoreApplication::setApplicationVersion(QLatin1Literal("0.1")); + QCoreApplication::setOrganizationDomain(QLatin1Literal("kde.org")); + QApplication::setApplicationDisplayName(i18n("Danbooru Client")); + + KAboutData aboutData(I18N_NOOP(QLatin1Literal("danbooru-client")), + i18n("Danbooru Client"), + QLatin1Literal("0.1"), + i18n("KF5 based Danbooru client"), + KAboutLicense::GPL_V3, + i18n("(C) 2015 Luca Beltrame"), + QString(), + QLatin1Literal("https://git.dennogumi.org/kde/danbooru-client") + ); + + aboutData.addAuthor(i18n("Luca Beltrame"), i18n("Developer"), + QLatin1Literal("lbeltrame@kde.org") + ); + + KAboutData::setApplicationData(aboutData); + + QCommandLineParser cmdParser; + cmdParser.addHelpOption(); + cmdParser.addVersionOption(); + aboutData.setupCommandLine(&cmdParser); + cmdParser.process(app); + aboutData.processCommandLine(&cmdParser); + + Danbooru::DanbooruMainWindow* window = new Danbooru::DanbooruMainWindow(); + window->show(); + + return app.exec(); +} \ No newline at end of file