File indexing completed on 2024-04-28 07:54:18
0001 /*************************************************************************** 0002 main.cpp - description 0003 ------------------- 0004 begin : mer jui 11 22:27:28 EDT 2001 0005 copyright : (C) 2001 by Gaël de Chalendar 0006 email : Gael.de.Chalendar@free.fr 0007 0008 This is the standard main function of a KDE application simplified for KsirK 0009 0010 ***************************************************************************/ 0011 0012 /*************************************************************************** 0013 * * 0014 * This program is free software; you can redistribute it and/or modify * 0015 * it under the terms of the GNU General Public License as published by * 0016 * the Free Software Foundation; either either version 2 0017 of the License, or (at your option) any later version.of the License, or * 0018 * (at your option) any later version. * 0019 * * 0020 ***************************************************************************/ 0021 0022 #include "kgamewin.h" 0023 #include "GameLogic/gameautomaton.h" 0024 #include <KAboutData> 0025 #include <KCrash> 0026 #include "ksirk_debug.h" 0027 #include <QApplication> 0028 #include <QCommandLineParser> 0029 0030 #include "../ksirk_version.h" 0031 0032 int main(int argc, char *argv[]) 0033 { 0034 qCDebug(KSIRK_LOG) << "Hello KsirK"; 0035 0036 QApplication app(argc, argv); 0037 0038 KLocalizedString::setApplicationDomain("ksirk"); 0039 0040 KAboutData aboutData(QStringLiteral("ksirk"), 0041 i18n("KsirK"), 0042 QStringLiteral(KSIRK_VERSION_STRING), 0043 i18n("KsirK - World Domination Strategy Game"), 0044 KAboutLicense::GPL, 0045 i18n("(c) 2002-2015, Gaël de Chalendar\n"), 0046 i18n("For help and user manual, please see\nthe KsirK web site."), 0047 QStringLiteral("https://apps.kde.org/ksirk")); 0048 0049 aboutData.addAuthor(i18n("Gaël de Chalendar aka Kleag"),QStringLiteral(), QStringLiteral("kleag@free.fr")); 0050 aboutData.addAuthor(i18n("Nemanja Hirsl"),i18n("Current maintainer"), QStringLiteral("nemhirsl@gmail.com")); 0051 aboutData.addAuthor(i18n("Robin Doer")); 0052 aboutData.addAuthor(i18n("Albert Astals Cid")); 0053 aboutData.addAuthor(i18n("Michal Golunski (Polish translation)"),QStringLiteral(), QStringLiteral("michalgolunski@o2.pl")); 0054 aboutData.addAuthor(i18n("French students of the 'IUP ISI 2007-2008':")); 0055 aboutData.addAuthor(i18n(" Anthony Rey<br/> Benjamin Lucas<br/> Benjamin Moreau<br/> Gaël Clouet<br/> Guillaume Pelouas<br/> Joël Marco<br/> Laurent Dang<br/> Nicolas Linard<br/> Vincent Sac")); 0056 0057 app.setWindowIcon(QIcon::fromTheme(QStringLiteral("ksirk"))); 0058 KAboutData::setApplicationData(aboutData); 0059 KCrash::initialize(); 0060 QCommandLineParser parser; 0061 aboutData.setupCommandLine(&parser); 0062 parser.process(app); 0063 aboutData.processCommandLine(&parser); 0064 0065 if (app.isSessionRestored()) 0066 { 0067 kRestoreMainWindows<Ksirk::KGameWindow>(); 0068 } 0069 else 0070 { 0071 qCDebug(KSIRK_LOG) << "Creating main window"; 0072 Ksirk::KGameWindow *ksirk = new Ksirk::KGameWindow(); 0073 ksirk->show(); 0074 } 0075 0076 app.setWindowIcon(QIcon::fromTheme(QStringLiteral("ksirk"))); 0077 0078 qCDebug(KSIRK_LOG) << "Executing app"; 0079 return app.exec(); 0080 }