File indexing completed on 2024-04-21 03:40:43
0001 /* 0002 SPDX-FileCopyrightText: 2005-2007 Albert Astals Cid <aacid@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "blinken.h" 0008 0009 #include "blinken_version.h" 0010 0011 #include <KAboutData> 0012 #include <KLocalizedString> 0013 #include <KCrash> 0014 #include <KDBusService> 0015 0016 #include <QApplication> 0017 #include <QCommandLineParser> 0018 0019 #include <QFontDatabase> 0020 #include <QFontInfo> 0021 #include <QStandardPaths> 0022 0023 int main(int argc, char *argv[]) 0024 { 0025 KLocalizedString::setApplicationDomain(QByteArrayLiteral("blinken")); 0026 0027 QApplication app(argc, argv); 0028 KAboutData about(QStringLiteral("blinken"), i18n("Blinken"), QStringLiteral(BLINKEN_VERSION_STRING), i18n("A memory enhancement game"), KAboutLicense::GPL, i18n("© 2005-2007 Albert Astals Cid\nSPDX-FileCopyrightText: 2005-2007 Danny Allen ")); 0029 about.addAuthor(i18n("Albert Astals Cid"), i18n("Coding"), QStringLiteral("aacid@kde.org")); 0030 about.addAuthor(i18n("Danny Allen"), i18n("Design, Graphics and Sounds"), QStringLiteral("danny@dannyallen.co.uk")); 0031 about.addCredit(i18n("Steve Jordi"), i18n("GPL'ed his 'Steve' font so that we could use it"), QStringLiteral("steve@sjordi.com")); 0032 0033 KAboutData::setApplicationData(about); 0034 0035 KCrash::initialize(); 0036 0037 QCommandLineParser parser; 0038 about.setupCommandLine(&parser); 0039 parser.process(app); 0040 about.processCommandLine(&parser); 0041 0042 app.setWindowIcon(QIcon::fromTheme(QStringLiteral("blinken"))); 0043 0044 QFont f(QStringLiteral("Steve"), 12, QFont::Normal, true); 0045 // Works with Steve may need some tweaking to work with other fonts 0046 if (!QFontInfo(f).exactMatch()) 0047 { 0048 QFontDatabase::addApplicationFont(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("fonts/steve.ttf"))); 0049 } 0050 KDBusService service; 0051 new blinken(); 0052 return app.exec(); 0053 }