File indexing completed on 2024-04-28 07:29:04

0001 /***************************************************************************
0002  *   This file is part of the Kanagram project                             *
0003  *   Copyright 2011 Sebastian Kügler <sebas@kde.org>                       *
0004  *   Copyright 2011 Marco Martin <mart@kde.org>                            *
0005  *   Copyright 2012 Laszlo Papp <lpapp@kde.org>                            *
0006  *   Copyright 2014 Jeremy Whiting <jpwhiting@kde.org>                     *
0007  *                                                                         *
0008  *   This program is free software; you can redistribute it and/or modify  *
0009  *   it under the terms of the GNU General Public License as published by  *
0010  *   the Free Software Foundation; either version 2 of the License, or     *
0011  *   (at your option) any later version.                                   *
0012  *                                                                         *
0013  *   This program is distributed in the hope that it will be useful,       *
0014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0016  *   GNU General Public License for more details.                          *
0017  *                                                                         *
0018  *   You should have received a copy of the GNU General Public License     *
0019  *   along with this program; if not, write to the                         *
0020  *   Free Software Foundation, Inc.,                                       *
0021  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
0022  ***************************************************************************/
0023 
0024 #include <QApplication>
0025 #include <QLoggingCategory>
0026 #include <QCommandLineParser>
0027 
0028 #include <KAboutData>
0029 #include <KCrash>
0030 #include <KLocalizedString>
0031 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0032 #include <Kdelibs4ConfigMigrator>
0033 #endif
0034 
0035 #include "mainwindow.h"
0036 #include "kanagram_version.h"
0037 
0038 Q_LOGGING_CATEGORY(KANAGRAM, "org.kde.kanagram")
0039 
0040 int main(int argc, char **argv)
0041 {
0042     QStringList configFiles;
0043     configFiles << QStringLiteral("kanagramrc");
0044 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0045     Kdelibs4ConfigMigrator migrator(QStringLiteral("kanagram"));
0046     migrator.setConfigFiles(configFiles);
0047     migrator.migrate();
0048 #endif
0049 
0050     QApplication app(argc, argv);
0051     KLocalizedString::setApplicationDomain("kanagram");
0052 
0053     KAboutData about(QStringLiteral("kanagram"),
0054                      i18n("Kanagram"),
0055                      QStringLiteral(KANAGRAM_VERSION_STRING),
0056                      i18n("An anagram game"),
0057                      KAboutLicense::GPL,
0058                      i18n("© 2005 Joshua Keel\n© 2005 Danny Allen\n© 2007 Jeremy Whiting\n© 2014 Debjit Mondal"),
0059                      QString(),
0060                      QStringLiteral("https://apps.kde.org/kanagram"));
0061     about.addAuthor(i18n("Joshua Keel"), i18n("Coding"), QStringLiteral("joshuakeel@gmail.com"));
0062     about.addAuthor(i18n("Danny Allen"), i18n("Design, Graphics and many Vocabularies"), QStringLiteral("danny@dannyallen.co.uk"));
0063     about.addAuthor(i18n("Jeremy Whiting"), i18n("Maintainer"), QStringLiteral("jpwhiting@kde.org"));
0064     about.addAuthor(i18n("Debjit Mondal"), i18n("Coding & Design"), QStringLiteral("debjitmondal05@gmail.com"));
0065     about.addCredit(i18n("Laszlo Papp"), i18n("Modularization and porting to Mobile"), QStringLiteral("lpapp@kde.org"));
0066     about.addCredit(i18n("Artemiy Pavlov"), i18n("Sound effects"), QString());
0067     about.addCredit(i18n("Pino Toscano"), i18n("Italian Data Files"), QStringLiteral("pino@kde.org"));
0068     about.addCredit(i18n("Kris Thomsen"), i18n("Danish Data Files"), QStringLiteral("kris@scoutzone.dk"));
0069     about.addCredit(i18n("Patrick Spendrin"), i18n("German Data Files"), QStringLiteral("patrick_spendrin@gmx.de"));
0070     about.addCredit(i18n("Eric Krüse"), i18n("British English Data Files"), QStringLiteral("bildvontux@yahoo.de"));
0071     about.addCredit(i18n("Hanna Scott"), i18n("Swedish Data Files"), QStringLiteral("hanna.et.scott@gmail.com"));
0072     about.addCredit(i18n("Jure Repinc"), i18n("Slovenian Data Files"), QStringLiteral("jlp@holodeck1.com"));
0073     about.addCredit(i18n("Yuri Chornoivan"), i18n("Ukrainian Data Files"), QLatin1String(""));
0074     about.addCredit(i18n("Kristóf Kiszel"), i18n("Hungarian Data Files"), QStringLiteral("ulysses@kubuntu.org"));
0075     about.addCredit(i18n("Souvik Das"), i18n("2-player mode"), QStringLiteral("souvikdas728@gmail.com"));
0076     about.addCredit(i18n("Sayan Biswas"), i18n("Letters turned to clickable buttons"), QStringLiteral("techsayan01@gmail.com"));
0077     about.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"), i18nc("EMAIL OF TRANSLATORS", "Your emails"));
0078 
0079     KAboutData::setApplicationData(about);
0080     QCommandLineParser parser;
0081     about.setupCommandLine(&parser);
0082     parser.process(app);
0083     about.processCommandLine(&parser);
0084 
0085     KCrash::initialize();
0086 
0087     MainWindow mainWindow;
0088     QSize size(400, 300);
0089     mainWindow.setMinimumSize(size);
0090     mainWindow.show();
0091 
0092     return app.exec();
0093 }