Warning, file /education/khangman/src/main.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /************************************************************************************* 0002 * Copyright (C) 2001-2009 Anne-Marie Mahfouf <annma@kde.org> * 0003 * Copyright (C) 2014 Rahul Chowdhury <rahul.chowdhury@kdemail.net> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the Free Software * 0017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0018 *************************************************************************************/ 0019 0020 0021 #include "khangman.h" 0022 #include "khangman_version.h" 0023 0024 #include <KAboutData> 0025 0026 #include <KLocalizedString> 0027 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 0028 #include <Kdelibs4ConfigMigrator> 0029 #endif 0030 #include <KCrash> 0031 0032 #include <QApplication> 0033 #include <QFontDatabase> 0034 #include <QFontInfo> 0035 #include <QStandardPaths> 0036 #include <QQmlEngine> 0037 #include <QCommandLineParser> 0038 0039 int main(int argc, char **argv) 0040 { 0041 QApplication app(argc, argv); 0042 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 0043 QStringList configFiles; 0044 configFiles << QStringLiteral("khangmanrc"); 0045 Kdelibs4ConfigMigrator migrator(QStringLiteral("khangman")); 0046 migrator.setConfigFiles(configFiles); 0047 migrator.migrate(); 0048 #endif 0049 0050 KLocalizedString::setApplicationDomain("khangman"); 0051 QApplication::setApplicationName(QStringLiteral("khangman")); 0052 QApplication::setApplicationVersion(QStringLiteral(KHANGMAN_VERSION_STRING)); 0053 QApplication::setOrganizationDomain(QStringLiteral("kde.org")); 0054 QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("khangman"))); 0055 0056 app.connect(&app, &QGuiApplication::lastWindowClosed, &app, &QCoreApplication::quit); 0057 0058 KAboutData aboutData(QStringLiteral("khangman"), 0059 i18n("KHangMan"), 0060 QStringLiteral(KHANGMAN_VERSION_STRING), 0061 i18n("Classical hangman game by KDE"), 0062 KAboutLicense::GPL, 0063 i18n("(c) 2001-2011, Anne-Marie Mahfouf")); 0064 aboutData.addAuthor(i18n("Primoz Anzur"), i18n("Previous maintainer"), 0065 QStringLiteral("zerokode@gmx.net")); 0066 0067 // Write the names with accents and all and this file save with 0068 // utf8 encoding. 0069 aboutData.addAuthor(i18n("Anne-Marie Mahfouf"), i18n("Original Author"), 0070 QStringLiteral("annma@kde.org"), QStringLiteral("https://annma.blogspot.com"), QStringLiteral("annma")); 0071 aboutData.addAuthor(i18n("Rahul Chowdhury"), i18n("Developer"), 0072 QStringLiteral("rahul.chowdhury@kdemail.net"), QStringLiteral("https://rahulc93.wordpress.com/"), QStringLiteral("rahulch")); 0073 aboutData.addCredit(i18n("Stefan Böhmann"), 0074 i18n("Coding help"), QStringLiteral("kde@hilefoks.org")); 0075 aboutData.addCredit(i18n("Stefan Asserhäll"), 0076 i18n("Swedish data files, coding help, transparent pictures and i18n fixes"), 0077 QStringLiteral("stefan.asserhall@telia.com")); 0078 aboutData.addCredit(i18n("eXParTaKus"), 0079 i18n("Spanish data files"), QStringLiteral("expartakus@expartakus.com")); 0080 aboutData.addCredit(i18n("Erik Kjær Pedersenn"), 0081 i18n("Danish data files"), QStringLiteral("erik@mpim-bonn.mpg.de") ); 0082 aboutData.addCredit(i18n("Niko Lewman"), 0083 i18n("Finnish data files"), QStringLiteral("niko.lewman@edu.hel.fi") ); 0084 aboutData.addCredit(i18n("João Sebastião de Oliveira Bueno"), 0085 i18n("Brazilian Portuguese data files"), QStringLiteral("gwidion@mpc.com.br") ); 0086 aboutData.addCredit(i18n("Antoni Bella"), 0087 i18n("Catalan data files"), QStringLiteral("bella5@teleline.es")); 0088 aboutData.addCredit(i18n("Giovanni Venturi"), 0089 i18n("Italian data files"), QStringLiteral("jumpyj@tiscali.it")); 0090 aboutData.addCredit(i18n("Rinse"), 0091 i18n("Dutch data files"), QStringLiteral("rinse@kde.nl")); 0092 aboutData.addCredit(i18n("Lukáš Tinkl"), 0093 i18n("Czech data files"), QStringLiteral("lukas@kde.org")); 0094 aboutData.addCredit(i18n("Kristóf Kiszel"), 0095 i18n("Hungarian data files"), QStringLiteral("ulysses@kubuntu.org")); 0096 aboutData.addCredit(i18n("Torger Åge Sinnes"), 0097 i18n("Norwegian (Bokmål) data files"), QStringLiteral("org-a-s@online.no")); 0098 aboutData.addCredit(i18n("Roger Kovacs"), 0099 i18n("Tajik data files"), QStringLiteral("rkovacs@khujand.org")); 0100 aboutData.addCredit(i18n("Chusslove Illich"), 0101 i18n("Serbian (Cyrillic and Latin) data files"), QStringLiteral("chaslav@sezampro.yu")); 0102 aboutData.addCredit(i18n("Jure Repinc"), 0103 i18n("Slovenian data files"), QStringLiteral("jlp@holodeck1.com")); 0104 aboutData.addCredit(i18n("Pedro Morais"), 0105 i18n("Portuguese data files"), QStringLiteral("Morais@kde.org")); 0106 aboutData.addCredit(i18n("Gaute Hvoslef Kvalnes"), 0107 i18n("Norwegian (Nynorsk) data files"), QStringLiteral("gaute@verdsveven.com")); 0108 aboutData.addCredit(i18n("Mehmet Özel"), 0109 i18n("Turkish data files"), QStringLiteral("mehmet_ozel2003@hotmail.com")); 0110 aboutData.addCredit(i18n("Черепанов Андрей"), 0111 i18n("Russian data files"), QStringLiteral("sibskull@mail.ru")); 0112 aboutData.addCredit(i18n("Radostin Radnev"), 0113 i18n("Bulgarian data files"), QStringLiteral("radnev@yahoo.com")); 0114 aboutData.addCredit(i18n("Kevin Patrick Scannell"), 0115 i18n("Irish (Gaelic) data files"), QStringLiteral("scannell@slu.edu")); 0116 aboutData.addCredit(i18n("Matt Howe"), 0117 i18n("Softer Hangman Pictures"), QStringLiteral("mdhowe@bigfoot.com")); 0118 aboutData.addCredit(i18n("Benjamin Meyer"), 0119 i18n("Coding help"), QStringLiteral("ben@meyerhome.net")); 0120 aboutData.addCredit(i18n("Robert Gogolok"), 0121 i18n("Coding help"), QStringLiteral("robertgogolok@gmx.de")); 0122 aboutData.addCredit(i18n("Lubos Lunàk"), 0123 i18n("Coding help"), QStringLiteral("l.lunak@kde.org")); 0124 aboutData.addCredit(i18n("Albert Astals Cid"), 0125 i18n("Coding help, fixed a lot of things"), QStringLiteral("aacid@kde.org")); 0126 aboutData.addCredit(i18n("Peter Hedlund"), 0127 i18n("Code for generating icons for the characters toolbar"), QStringLiteral("peter.hedlund@kdemail.net")); 0128 aboutData.addCredit(i18n("Inge Wallin"), 0129 i18n("Code cleaning"), QStringLiteral("inge@lysator.liu.se")); 0130 aboutData.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"), i18nc("EMAIL OF TRANSLATORS", "Your emails")); 0131 0132 KAboutData::setApplicationData(aboutData); 0133 0134 QCommandLineParser parser; 0135 aboutData.setupCommandLine(&parser); 0136 parser.process(app); 0137 aboutData.processCommandLine(&parser); 0138 0139 KCrash::initialize(); 0140 0141 QFont f(QStringLiteral("Domestic Manners"), 12, QFont::Normal, true); 0142 if (!QFontInfo(f).exactMatch()) 0143 { 0144 QFontDatabase::addApplicationFont(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("fonts/Domestic_Manners.ttf"))); 0145 } 0146 0147 QFont fd(QStringLiteral("Dustismo Roman"), 12, QFont::Normal, true); 0148 if (!QFontInfo(fd).exactMatch()) 0149 { 0150 QFontDatabase::addApplicationFont(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("fonts/Dustismo_Roman.ttf"))); 0151 } 0152 0153 KHangMan hangman; 0154 QObject::connect(hangman.getEngine(), &QQmlEngine::quit, &app, &QCoreApplication::quit); 0155 hangman.show(); 0156 return app.exec(); 0157 } 0158 0159 // kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; 0160 // vim: set et sw=4 ts=4 cino=l1,cs,U1: 0161