ksquares
Go to the documentation of this file.
10 #include <KApplication>
12 #include <KCmdLineArgs>
23 I18N_NOOP(
"Take it in turns to draw lines.\nIf you complete a squares, you get another go.");
27 int main(
int argc,
char **argv)
30 KAboutData::License_GPL, ki18n(
"(C) 2006-2007 Matt Williams"), KLocalizedString(),
31 "http://games.kde.org/ksquares");
32 about.addAuthor( ki18n(
"Matt Williams"), ki18n(
"Original creator and maintainer"),
"matt@milliams.com",
"http://milliams.com" );
33 about.addCredit(ki18n(
"Fela Winkelmolen"), ki18n(
"Many patches and bugfixes"));
34 about.addCredit(ki18n(
"Tom Vincent Peters"), ki18n(
"Hard AI"));
36 KCmdLineArgs::init(argc, argv, &about);
38 KCmdLineOptions options;
39 options.add(
"demo", ki18n(
"Run game in demo (autoplay) mode"));
40 KCmdLineArgs::addCmdLineOptions( options );
41 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
44 KGlobal::locale()->insertCatalog(
QLatin1String(
"libkdegames" ));
47 KConfigGroup cg(KGlobal::config(),
"General");
48 if (cg.readEntry<
bool>(
"initializeNames",
true)) {
50 playerNames << KUser().property(KUser::FullName).toString();
51 playerNames << i18nc(
"default name of player",
"Player %1", 2);
52 playerNames << i18nc(
"default name of player",
"Player %1", 3);
53 playerNames << i18nc(
"default name of player",
"Player %1", 4);
55 cg.writeEntry(
"initializeNames",
false);
58 if (args->isSet(
"demo"))
int main(int argc, char **argv)
Mainwindow class for demonstration mode.
static void setPlayerNames(const QStringList &v)
Set Player Names.
static const char description[]
static const char version[]
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:39 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.