SVN_SILENT made messages (.desktop file)
[kdegames.git] / libkdegames / kgamemisc.cpp
bloba441a2d8d01b99496af63c9b0cb3125c4bf363c1
1 /*
2 This file is part of the KDE games library
3 Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #include "kgamemisc.h"
22 #include <QStringList>
24 #include <krandomsequence.h>
25 #include <klocale.h>
28 class KGameMisc::KGameMiscPrivate
33 KGameMisc::KGameMisc() : d(new KGameMiscPrivate)
37 KGameMisc::~KGameMisc()
39 delete d;
42 QString KGameMisc::randomName()// do we need i18n? I think yes
44 QStringList names = QString(
45 i18nc( "A list of language typical names ( for games ), separated by spaces",
46 "Adam Alex Andreas Andrew Bart Ben Bernd Bill "
47 "Chris Chuck Daniel Don Duncan Ed Emily Eric "
48 "Gary Greg Harry Ian Jean Jeff Jan Kai Keith Ken "
49 "Kirk Marc Mike Neil Paul Rik Robert Sam Sean "
50 "Thomas Tim Walter" ) ).split( QChar(' ') );
51 KRandomSequence random;
52 return names.at( random.getLong( names.count() ) );