granatier
playersettings.cpp
Go to the documentation of this file.
31 KGlobal::dirs()->findAllResources("players", "*.desktop", KStandardDirs::Recursive, playersAvailable);
40 KConfig desktopFile(KStandardDirs::locate("appdata", "players/" + settings.strPlayerID), KConfig::SimpleConfig);
44 settings.strPlayerGraphicsFile = desktopFile.group("KGameTheme").readEntry<QString>("FileName", "");
61 strPlayerID = granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("PlayerID", "");
64 m_playerSettings.find(strPlayerID).value().strPlayerName = granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("Name", "");
65 m_playerSettings.find(strPlayerID).value().enabled = granatierConfig.group("Player").group(playersGroupList[i]).readEntry<int>("Enabled", 0);
71 m_playerSettings.find(strPlayerID).value().keyUp = QKeySequence(granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("KeyUp", ""));
72 m_playerSettings.find(strPlayerID).value().keyRight = QKeySequence(granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("KeyRight", ""));
73 m_playerSettings.find(strPlayerID).value().keyDown = QKeySequence(granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("KeyDown", ""));
74 m_playerSettings.find(strPlayerID).value().keyLeft = QKeySequence(granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("KeyLeft", ""));
75 m_playerSettings.find(strPlayerID).value().keyPutBomb = QKeySequence(granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("KeyPutBomb", ""));
187 strPlayerIDList.append(granatierConfig.group("Player").group(playersGroupList[i]).readEntry<QString>("PlayerID", ""));
222 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("PlayerID", i.value().strPlayerID);
223 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("Name", i.value().strPlayerName);
224 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("Enabled", (i.value().enabled ? 1 : 0));
226 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyUp", i.value().keyUp.toString());
227 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyRight", i.value().keyRight.toString());
228 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyDown", i.value().keyDown.toString());
229 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyLeft", i.value().keyLeft.toString());
230 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyPutBomb", i.value().keyPutBomb.toString());
241 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("PlayerID", i.value().strPlayerID);
242 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("Name", i.value().strPlayerName);
243 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("Enabled", (i.value().enabled ? 1 : 0));
245 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyUp", i.value().keyUp.toString());
246 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyRight", i.value().keyRight.toString());
247 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyDown", i.value().keyDown.toString());
248 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyLeft", i.value().keyLeft.toString());
249 granatierConfig.group("Player").group(QString("%1").arg(nPlayersGroupIndex)).writeEntry("KeyPutBomb", i.value().keyPutBomb.toString());
const QString playerDesktopFilePath(const QString &strPlayerID) const
Definition: playersettings.cpp:134
bool contains(const Key &key) const
const QKeySequence keyUp(const QString &strPlayerID) const
Definition: playersettings.cpp:149
int removeDuplicates()
const_iterator constBegin() const
const QString playerName(const QString &strPlayerID) const
Definition: playersettings.cpp:129
void setKeyLeft(const QString &strPlayerID, const QKeySequence &key)
Definition: playersettings.cpp:307
const QKeySequence keyRight(const QString &strPlayerID) const
Definition: playersettings.cpp:154
void discardUnsavedSettings()
Definition: playersettings.cpp:257
bool enabled(const QString &strPlayerID) const
Definition: playersettings.cpp:144
const QKeySequence keyDown(const QString &strPlayerID) const
Definition: playersettings.cpp:159
void setKeyDown(const QString &strPlayerID, const QKeySequence &key)
Definition: playersettings.cpp:298
QList< Key > keys() const
const QKeySequence keyPutBomb(const QString &strPlayerID) const
Definition: playersettings.cpp:169
int count(const T &value) const
void append(const T &value)
const_iterator constEnd() const
void setKeyPutBomb(const QString &strPlayerID, const QKeySequence &key)
Definition: playersettings.cpp:316
iterator end()
iterator begin()
const QString playerGraphicsFile(const QString &strPlayerID) const
Definition: playersettings.cpp:139
void setKeyUp(const QString &strPlayerID, const QKeySequence &key)
Definition: playersettings.cpp:280
const Key key(const T &value) const
void setKeyRight(const QString &strPlayerID, const QKeySequence &key)
Definition: playersettings.cpp:289
void sort()
int indexOf(const QRegExp &rx, int from) const
iterator insert(const Key &key, const T &value)
const QKeySequence keyLeft(const QString &strPlayerID) const
Definition: playersettings.cpp:164
void setEnabled(const QString &strPlayerID, const bool enabled)
Definition: playersettings.cpp:271
iterator find(const Key &key)
void setPlayerName(const QString &strPlayerID, const QString &strName)
Definition: playersettings.cpp:262
const T value(const Key &key) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.