diff options
Diffstat (limited to 'libkdegames/kchat.cpp')
-rw-r--r-- | libkdegames/kchat.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libkdegames/kchat.cpp b/libkdegames/kchat.cpp index d4ffd7ec..2a9c3913 100644 --- a/libkdegames/kchat.cpp +++ b/libkdegames/kchat.cpp @@ -31,12 +31,12 @@ public: bool mAutoAddMessages; - QMap<int, QString> mPlayerMap; + TQMap<int, TQString> mPlayerMap; int mPlayerId; int mFromId; }; -KChat::KChat(QWidget* parent, bool twoPlayerGame) : KChatBase(parent, twoPlayerGame) +KChat::KChat(TQWidget* parent, bool twoPlayerGame) : KChatBase(parent, twoPlayerGame) { init(); } @@ -56,9 +56,9 @@ void KChat::init() d->mFromId = 1; } -void KChat::setFromNickname(const QString& n) +void KChat::setFromNickname(const TQString& n) { d->mFromId = addPlayer(n); } -const QString& KChat::fromName() const +const TQString& KChat::fromName() const { return player(fromId()); } void KChat::setAutoAddMessages(bool add) { d->mAutoAddMessages = add; } @@ -68,10 +68,10 @@ int KChat::uniqueId() { return d->mPlayerId++; } int KChat::fromId() const { return d->mFromId; } -const QString& KChat::player(int id) const +const TQString& KChat::player(int id) const { return d->mPlayerMap[id]; } -void KChat::returnPressed(const QString& text) +void KChat::returnPressed(const TQString& text) { int id = fromId(); if (id < 0) { @@ -80,7 +80,7 @@ void KChat::returnPressed(const QString& text) } emit signalSendMessage(id, text); if (autoAddMessages()) { - QString p = player(id); + TQString p = player(id); if (p.isNull()) { p = i18n("Unknown"); } @@ -89,7 +89,7 @@ void KChat::returnPressed(const QString& text) } } -int KChat::addPlayer(const QString& nickname) +int KChat::addPlayer(const TQString& nickname) { int id = uniqueId(); d->mPlayerMap.insert(id, nickname); @@ -101,9 +101,9 @@ void KChat::removePlayer(int id) d->mPlayerMap.remove(id); } -void KChat::removePlayer(const QString& nickname) +void KChat::removePlayer(const TQString& nickname) { - QMap<int, QString>::Iterator it; + TQMap<int, TQString>::Iterator it; for (it = d->mPlayerMap.begin(); it != d->mPlayerMap.end(); ++it) { if (it.data() == nickname) { d->mPlayerMap.remove(it); |