File indexing completed on 2024-10-13 03:43:43

0001 /*
0002     SPDX-FileCopyrightText: 2003 Marco Krüger <grisuji@gmx.de>
0003     SPDX-FileCopyrightText: 2003 Ian Wadham <iandw.au@gmail.com>
0004     SPDX-FileCopyrightText: 2009 Ian Wadham <iandw.au@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #include <QApplication>
0010 #include <QCommandLineParser>
0011 
0012 #include <KAboutData>
0013 #include <KCrash>
0014 #include <KDBusService>
0015 #include <KLocalizedString>
0016 
0017 #include "kgoldrunner_debug.h"
0018 #include "kgoldrunner_version.h"
0019 #include "kgoldrunner.h"
0020 
0021 static void addCredits (KAboutData & about);
0022 
0023 int main (int argc, char **argv)
0024 {
0025     QApplication app(argc, argv);
0026 
0027     KLocalizedString::setApplicationDomain(QByteArrayLiteral("kgoldrunner"));
0028 
0029     KAboutData about (QStringLiteral("kgoldrunner"), i18n ("KGoldrunner"),
0030                      QStringLiteral(KGOLDRUNNER_VERSION_STRING),
0031                      i18n("A game of action and puzzle solving"),
0032                      KAboutLicense::GPL,
0033                      i18n ("(C) 2003 Ian Wadham and Marco Krüger"),
0034                      QString(),
0035                      QStringLiteral("https://apps.kde.org/kgoldrunner") );
0036     addCredits (about);
0037 
0038     KAboutData::setApplicationData(about);
0039 
0040     KCrash::initialize();
0041 
0042     QCommandLineParser parser;
0043     about.setupCommandLine(&parser);
0044     parser.process(app);
0045     about.processCommandLine(&parser);
0046 
0047     KDBusService service;
0048 
0049     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kgoldrunner")));
0050 
0051     // See if we are starting with session management.
0052     if (app.isSessionRestored()) {
0053         // New RESTORE (KGrController);
0054         kRestoreMainWindows<KGoldrunner>();
0055     }
0056     else {
0057         // New KGrController * controller = new KGrController();
0058         // New KGrView *       view       = new KGrView (controller);
0059         // New KGrGame *       game       = new KGrGame (view);
0060     // New controller->makeConnections (game, view);
0061         KGoldrunner * controller = new KGoldrunner();
0062         controller->show();
0063     }
0064     return app.exec();
0065 }
0066 
0067 void addCredits (KAboutData & about)
0068 {
0069     about.addAuthor (i18n ("Ian Wadham"), i18n ("Current author"),
0070                             QStringLiteral("iandw.au@gmail.com"));
0071     about.addAuthor (i18n ("Marco Krüger"), i18n ("Original author"),
0072                             QStringLiteral("grisuji@gmx.de"));
0073     about.addCredit (i18n ("Mauricio Piacentini"),
0074                      i18n ("Port to KDE4, Qt4 and KGameCanvas classes"), 
0075                             QStringLiteral("mauricio@tabuleiro.com"));
0076     about.addCredit (i18n ("Maurizio Monge"),
0077                      i18n ("KGameCanvas classes for KDE4"), 
0078                             QStringLiteral("maurizio.monge@gmail.com"));
0079     about.addCredit (i18n ("Mauricio Piacentini"),
0080                      i18n ("Artwork for runners and default theme"), 
0081                             QStringLiteral("mauricio@tabuleiro.com"));
0082     about.addCredit (i18n ("Johann Ollivier Lapeyre"),
0083                      i18n ("Artwork for bars and ladders"), 
0084                             QStringLiteral("johann.ollivierlapeyre@gmail.com"));
0085     about.addCredit (i18n ("Eugene Trounev"),
0086                      i18n ("Artwork for background of Geek City theme"), 
0087                             QStringLiteral("irs_me@hotmail.com"));
0088     about.addCredit (i18n ("Luciano Montanaro"),
0089                      i18n ("Nostalgia themes, improvements to runners, "
0090                             "multiple-backgrounds feature, fade-in/fade-out "
0091                             "feature and several other ideas"), 
0092                             QStringLiteral("mikelima@cirulla.net"));
0093     about.addCredit (i18n ("Eugene Trounev"),
0094                      i18n ("Artwork for the Treasure of Egypt theme"), 
0095                             QStringLiteral("irs_me@hotmail.com"));
0096 }