Stub for main application

This commit is contained in:
Luca Beltrame 2015-02-08 10:15:50 +01:00
parent 8b625da6a0
commit a23962e9a3

66
src/danbooru_client.cpp Normal file
View file

@ -0,0 +1,66 @@
/*
* Copyright 2015 Luca Beltrame <lbeltrame@kde.org>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include <QApplication>
#include <QDebug>
#include <QUrl>
#include <QCommandLineParser>
#include <KLocalizedString>
#include <KAboutData>
#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();
}