From 576eb4299a00bc053db35414406f46372a0f70f2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:42:31 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdegames/kchat.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'libkdegames/kchat.cpp') 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 mPlayerMap; + TQMap 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::Iterator it; + TQMap::Iterator it; for (it = d->mPlayerMap.begin(); it != d->mPlayerMap.end(); ++it) { if (it.data() == nickname) { d->mPlayerMap.remove(it); -- cgit v1.2.1