summaryrefslogtreecommitdiffstats
path: root/libkdegames/kchatbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdegames/kchatbase.cpp')
-rw-r--r--libkdegames/kchatbase.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/libkdegames/kchatbase.cpp b/libkdegames/kchatbase.cpp
index 421e0224..182f96a9 100644
--- a/libkdegames/kchatbase.cpp
+++ b/libkdegames/kchatbase.cpp
@@ -73,14 +73,14 @@ void KChatBaseText::init()
void KChatBaseText::setName(const TQString& n)
{
// d->mName = n;
- d->mName = TQString("%1: ").arg(n);
- setText(TQString("%1: %2").arg(name()).arg(message())); // esp. for sorting
+ d->mName = TQString("%1: ").tqarg(n);
+ setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting
}
void KChatBaseText::setMessage(const TQString& m)
{
d->mMessage = m;
- setText(TQString("%1: %2").arg(name()).arg(message())); // esp. for sorting
+ setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting
}
const TQString& KChatBaseText::name() const
@@ -135,7 +135,7 @@ int KChatBaseText::width(TQListBox* lb) const
w += TQFontMetrics(messageFont()).width(message());
}
// int w = lb ? lb->fontMetrics().width( text() ) + 6 : 0; // QT orig
- return QMAX(w, TQApplication::globalStrut().width());
+ return TQMAX(w, TQApplication::globalStrut().width());
}
int KChatBaseText::height(TQListBox* lb) const
@@ -151,7 +151,7 @@ int KChatBaseText::height(TQListBox* lb) const
}
}
// int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0; // QT orig
- return QMAX(h, TQApplication::globalStrut().height());
+ return TQMAX(h, TQApplication::globalStrut().height());
}
@@ -182,7 +182,7 @@ public:
TQFont mSystemMessageFont;
};
-KChatBase::KChatBase(TQWidget* parent, bool noComboBox) : TQFrame(parent)
+KChatBase::KChatBase(TQWidget* tqparent, bool noComboBox) : TQFrame(tqparent)
{
init(noComboBox);
}
@@ -211,7 +211,7 @@ void KChatBase::init(bool noComboBox)
l->addWidget(d->mBox);
d->mBox->setVScrollBarMode(TQScrollView::AlwaysOn);
d->mBox->setHScrollBarMode(TQScrollView::AlwaysOff);
- d->mBox->setFocusPolicy(TQWidget::NoFocus);
+ d->mBox->setFocusPolicy(TQ_NoFocus);
// d->mBox->setSelectionMode(TQListBox::NoSelection);
d->mBox->setSelectionMode(TQListBox::Single);
@@ -236,7 +236,7 @@ void KChatBase::init(bool noComboBox)
setMaxItems(-1); // unlimited
if (kapp) {
- // kapp might be NULL as well - in case we are in Qt designer.
+ // kapp might be NULL as well - in case we are in TQt designer.
readConfig();
}
}
@@ -262,7 +262,7 @@ bool KChatBase::insertSendingEntry(const TQString& text, int id, int index)
kdWarning(11000) << "KChatBase: Cannot add an entry to the combo box" << endl;
return false;
}
- if (d->mIndex2Id.findIndex(id) != -1) {
+ if (d->mIndex2Id.tqfindIndex(id) != -1) {
kdError(11000) << "KChatBase: Cannot add more than one entry with the same ID! " << endl;
kdError(11000) << "KChatBase: Text="<<text<<endl;
return false;
@@ -324,13 +324,13 @@ void KChatBase::setSendingEntry(int id)
int KChatBase::findIndex(int id) const
{
- return d->mIndex2Id.findIndex(id);
+ return d->mIndex2Id.tqfindIndex(id);
}
int KChatBase::nextId() const
{
int i = SendToAll + 1;
- while (d->mIndex2Id.findIndex(i) != -1) {
+ while (d->mIndex2Id.tqfindIndex(i) != -1) {
i++;
}
return i;
@@ -349,26 +349,26 @@ void KChatBase::addItem(const TQListBoxItem* text)
void KChatBase::addMessage(const TQString& fromName, const TQString& text)
{
//maybe "%1 says: %2" or so
- addItem(layoutMessage(fromName, text));
+ addItem(tqlayoutMessage(fromName, text));
}
void KChatBase::addSystemMessage(const TQString& fromName, const TQString& text)
{
- addItem(layoutSystemMessage(fromName, text));
+ addItem(tqlayoutSystemMessage(fromName, text));
}
-TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString& text)
+TQListBoxItem* KChatBase::tqlayoutMessage(const TQString& fromName, const TQString& text)
{
//TODO: KChatBaseConfigure? - e.g. color
TQListBoxItem* message;
if (text.startsWith("/me ")) {
- // replace "/me" by a nice star. leave one space after the star
+ // tqreplace "/me" by a nice star. leave one space after the star
TQPixmap pix;
- pix.load(locate("data", TQString::fromLatin1("kdegames/pics/star.png")));
+ pix.load(locate("data", TQString::tqfromLatin1("kdegames/pics/star.png")));
//TODO KChatBasePixmap? Should change the font here!
- message = (TQListBoxItem*)new TQListBoxPixmap(pix, i18n("%1 %2").arg(fromName).arg(text.mid(3)));
+ message = (TQListBoxItem*)new TQListBoxPixmap(pix, i18n("%1 %2").tqarg(fromName).tqarg(text.mid(3)));
} else {
// the text is not edited in any way. just return an item
KChatBaseText* m = new KChatBaseText(fromName, text);
@@ -379,12 +379,12 @@ TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString
return message;
}
-TQListBoxItem* KChatBase::layoutSystemMessage(const TQString& fromName, const TQString& text)
+TQListBoxItem* KChatBase::tqlayoutSystemMessage(const TQString& fromName, const TQString& text)
{
//TODO: KChatBaseConfigure? - e.g. color
// no need to check for /me etc.
- KChatBaseText* m = new KChatBaseText(i18n("--- %1").arg(fromName), text);
+ KChatBaseText* m = new KChatBaseText(i18n("--- %1").tqarg(fromName), text);
m->setNameFont(&d->mSystemNameFont);
m->setMessageFont(&d->mSystemMessageFont);
return (TQListBoxItem*)m;
@@ -406,7 +406,7 @@ void KChatBase::slotReturnPressed(const TQString& text)
TQString KChatBase::comboBoxItem(const TQString& name) const
{ // TODO: such a function for "send to all" and "send to my group"
- return i18n("Send to %1").arg(name);
+ return i18n("Send to %1").tqarg(name);
}
void KChatBase::slotClear()