You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
531 lines
13 KiB
531 lines
13 KiB
15 years ago
|
/*
|
||
|
This file is part of the KDE games library
|
||
|
Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License version 2 as published by the Free Software Foundation.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#include "kchatbase.h"
|
||
|
|
||
|
#include <klineedit.h>
|
||
|
#include <klocale.h>
|
||
|
#include <kstandarddirs.h>
|
||
|
#include <kconfig.h>
|
||
|
#include <kapplication.h>
|
||
|
#include <kdebug.h>
|
||
|
|
||
15 years ago
|
#include <tqlayout.h>
|
||
|
#include <tqcombobox.h>
|
||
|
#include <tqpainter.h>
|
||
15 years ago
|
|
||
|
class KChatBaseTextPrivate
|
||
|
{
|
||
|
public:
|
||
|
KChatBaseTextPrivate()
|
||
|
{
|
||
|
mNameFont = 0;
|
||
|
mMessageFont = 0;
|
||
|
}
|
||
|
|
||
15 years ago
|
TQString mName;
|
||
|
TQString mMessage;
|
||
15 years ago
|
|
||
15 years ago
|
const TQFont* mNameFont;
|
||
|
const TQFont* mMessageFont;
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
15 years ago
|
KChatBaseText::KChatBaseText(const TQString& name, const TQString& message) : TQListBoxText()
|
||
15 years ago
|
{
|
||
|
init();
|
||
|
setName(name);
|
||
|
setMessage(message);
|
||
|
}
|
||
|
|
||
15 years ago
|
KChatBaseText::KChatBaseText(const TQString& message) : TQListBoxText()
|
||
15 years ago
|
{
|
||
|
init();
|
||
|
setMessage(message);
|
||
|
}
|
||
|
|
||
|
KChatBaseText::~KChatBaseText()
|
||
|
{
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
void KChatBaseText::init()
|
||
|
{
|
||
|
d = new KChatBaseTextPrivate;
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBaseText::setName(const TQString& n)
|
||
15 years ago
|
{
|
||
|
// d->mName = n;
|
||
14 years ago
|
d->mName = TQString("%1: ").tqarg(n);
|
||
|
setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting
|
||
15 years ago
|
}
|
||
|
|
||
15 years ago
|
void KChatBaseText::setMessage(const TQString& m)
|
||
15 years ago
|
{
|
||
|
d->mMessage = m;
|
||
14 years ago
|
setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting
|
||
15 years ago
|
}
|
||
|
|
||
15 years ago
|
const TQString& KChatBaseText::name() const
|
||
15 years ago
|
{ return d->mName; }
|
||
|
|
||
15 years ago
|
const TQString& KChatBaseText::message() const
|
||
15 years ago
|
{ return d->mMessage; }
|
||
|
|
||
15 years ago
|
TQFont KChatBaseText::nameFont() const
|
||
15 years ago
|
{
|
||
|
if (d->mNameFont) {
|
||
|
return *d->mNameFont;
|
||
|
} else if (listBox()) {
|
||
|
return listBox()->font();
|
||
|
} else {
|
||
15 years ago
|
return TQFont();
|
||
15 years ago
|
}
|
||
|
}
|
||
|
|
||
15 years ago
|
TQFont KChatBaseText::messageFont() const
|
||
15 years ago
|
{
|
||
|
if (d->mMessageFont) {
|
||
|
return *d->mMessageFont;
|
||
|
} else if (listBox()) {
|
||
|
return listBox()->font();
|
||
|
} else {
|
||
15 years ago
|
return TQFont();
|
||
15 years ago
|
}
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBaseText::setNameFont(const TQFont* f)
|
||
15 years ago
|
{ d->mNameFont = f; }
|
||
|
|
||
15 years ago
|
void KChatBaseText::setMessageFont(const TQFont* f)
|
||
15 years ago
|
{ d->mMessageFont = f; }
|
||
|
|
||
15 years ago
|
void KChatBaseText::paint(TQPainter* painter)
|
||
15 years ago
|
{
|
||
15 years ago
|
TQFontMetrics fm = painter->fontMetrics();
|
||
15 years ago
|
painter->setFont(nameFont());
|
||
|
painter->drawText(3, fm.ascent() + fm.leading()/2, name());
|
||
|
painter->setFont(messageFont());
|
||
15 years ago
|
painter->drawText(3 + TQFontMetrics(nameFont()).width(name()), fm.ascent() + fm.leading()/2, message());
|
||
15 years ago
|
}
|
||
|
|
||
15 years ago
|
int KChatBaseText::width(TQListBox* lb) const
|
||
15 years ago
|
{
|
||
|
int w = 0;
|
||
|
if (lb) {
|
||
|
w += 6;
|
||
15 years ago
|
w += TQFontMetrics(nameFont()).width(name());
|
||
|
w += TQFontMetrics(messageFont()).width(message());
|
||
15 years ago
|
}
|
||
|
// int w = lb ? lb->fontMetrics().width( text() ) + 6 : 0; // QT orig
|
||
14 years ago
|
return TQMAX(w, TQApplication::globalStrut().width());
|
||
15 years ago
|
}
|
||
|
|
||
15 years ago
|
int KChatBaseText::height(TQListBox* lb) const
|
||
15 years ago
|
{
|
||
|
int h = 0;
|
||
|
if (lb) {
|
||
|
h += 2;
|
||
|
// AB: is lineSpacing still correct?
|
||
15 years ago
|
if (TQFontMetrics(nameFont()).lineSpacing() > TQFontMetrics(messageFont()).lineSpacing()) {
|
||
|
h += TQFontMetrics(nameFont()).lineSpacing();
|
||
15 years ago
|
} else {
|
||
15 years ago
|
h += TQFontMetrics(messageFont()).lineSpacing();
|
||
15 years ago
|
}
|
||
|
}
|
||
|
// int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0; // QT orig
|
||
14 years ago
|
return TQMAX(h, TQApplication::globalStrut().height());
|
||
15 years ago
|
}
|
||
|
|
||
|
|
||
|
|
||
|
class KChatBasePrivate
|
||
|
{
|
||
|
public:
|
||
|
KChatBasePrivate()
|
||
|
{
|
||
|
mBox = 0;
|
||
|
mEdit = 0;
|
||
|
mCombo = 0;
|
||
|
|
||
|
mAcceptMessage = true;
|
||
|
mMaxItems = -1;
|
||
|
}
|
||
15 years ago
|
TQListBox* mBox;
|
||
15 years ago
|
KLineEdit* mEdit;
|
||
15 years ago
|
TQComboBox* mCombo;
|
||
15 years ago
|
bool mAcceptMessage;
|
||
|
int mMaxItems;
|
||
|
|
||
15 years ago
|
TQValueList<int> mIndex2Id;
|
||
15 years ago
|
|
||
15 years ago
|
TQFont mNameFont;
|
||
|
TQFont mMessageFont;
|
||
|
TQFont mSystemNameFont;
|
||
|
TQFont mSystemMessageFont;
|
||
15 years ago
|
};
|
||
|
|
||
13 years ago
|
KChatBase::KChatBase(TQWidget* parent, bool noComboBox) : TQFrame(parent)
|
||
15 years ago
|
{
|
||
|
init(noComboBox);
|
||
|
}
|
||
|
|
||
|
KChatBase::~KChatBase()
|
||
|
{
|
||
|
// kdDebug(11000) << "KChatBase: DESTRUCT (" << this << ")" << endl;
|
||
|
saveConfig();
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
void KChatBase::init(bool noComboBox)
|
||
|
{
|
||
|
// kdDebug(11000) << "KChatBase: INIT (" << this << ")" << endl;
|
||
|
|
||
|
d = new KChatBasePrivate;
|
||
|
|
||
|
setMinimumWidth(100);
|
||
|
setMinimumHeight(150);
|
||
|
|
||
15 years ago
|
TQVBoxLayout* l = new TQVBoxLayout(this);
|
||
15 years ago
|
|
||
15 years ago
|
d->mBox = new TQListBox(this);
|
||
|
connect(d->mBox, TQT_SIGNAL(rightButtonClicked(TQListBoxItem*, const TQPoint&)),
|
||
|
this, TQT_SIGNAL(rightButtonClicked(TQListBoxItem*, const TQPoint&)));
|
||
15 years ago
|
l->addWidget(d->mBox);
|
||
15 years ago
|
d->mBox->setVScrollBarMode(TQScrollView::AlwaysOn);
|
||
|
d->mBox->setHScrollBarMode(TQScrollView::AlwaysOff);
|
||
14 years ago
|
d->mBox->setFocusPolicy(TQ_NoFocus);
|
||
15 years ago
|
// d->mBox->setSelectionMode(TQListBox::NoSelection);
|
||
|
d->mBox->setSelectionMode(TQListBox::Single);
|
||
15 years ago
|
|
||
|
l->addSpacing(5);
|
||
|
|
||
15 years ago
|
TQHBoxLayout* h = new TQHBoxLayout(l);
|
||
15 years ago
|
d->mEdit = new KLineEdit(this);
|
||
|
d->mEdit->setHandleSignals(false);
|
||
|
d->mEdit->setTrapReturnKey(true);
|
||
|
d->mEdit->completionObject(); // add the completion object
|
||
|
d->mEdit->setCompletionMode(KGlobalSettings::CompletionNone);
|
||
15 years ago
|
connect(d->mEdit, TQT_SIGNAL(returnPressed(const TQString&)), this, TQT_SLOT(slotReturnPressed(const TQString&)));
|
||
15 years ago
|
h->addWidget(d->mEdit);
|
||
|
|
||
|
if (!noComboBox) {
|
||
15 years ago
|
d->mCombo = new TQComboBox(this);
|
||
15 years ago
|
h->addWidget(d->mCombo);
|
||
|
addSendingEntry(i18n("Send to All Players"), SendToAll);//FIXME: where to put the id?
|
||
|
}
|
||
|
|
||
|
d->mAcceptMessage = true; // by default
|
||
|
setMaxItems(-1); // unlimited
|
||
|
|
||
|
if (kapp) {
|
||
14 years ago
|
// kapp might be NULL as well - in case we are in TQt designer.
|
||
15 years ago
|
readConfig();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
bool KChatBase::acceptMessage() const
|
||
|
{ return d->mAcceptMessage; }
|
||
|
|
||
|
void KChatBase::setAcceptMessage(bool a)
|
||
|
{ d->mAcceptMessage = a; }
|
||
|
|
||
15 years ago
|
bool KChatBase::addSendingEntry(const TQString& text, int id)
|
||
15 years ago
|
{
|
||
|
//FIXME: is ID used correctly?
|
||
|
// do we need ID at all?
|
||
|
// what the hell should be here?
|
||
|
// d->mCombo->insertItem(i18n("Send to All Players"), SendToAll);
|
||
|
return insertSendingEntry(text, id);
|
||
|
}
|
||
|
|
||
15 years ago
|
bool KChatBase::insertSendingEntry(const TQString& text, int id, int index)
|
||
15 years ago
|
{
|
||
|
if (!d->mCombo) {
|
||
|
kdWarning(11000) << "KChatBase: Cannot add an entry to the combo box" << endl;
|
||
|
return false;
|
||
|
}
|
||
14 years ago
|
if (d->mIndex2Id.findIndex(id) != -1) {
|
||
15 years ago
|
kdError(11000) << "KChatBase: Cannot add more than one entry with the same ID! " << endl;
|
||
|
kdError(11000) << "KChatBase: Text="<<text<<endl;
|
||
|
return false;
|
||
|
}
|
||
|
d->mCombo->insertItem(text, index);
|
||
|
if (index < 0) {
|
||
|
d->mIndex2Id.append(id);
|
||
|
} else {
|
||
|
d->mIndex2Id.insert(d->mIndex2Id.at(index), id);
|
||
|
}
|
||
|
if (d->mIndex2Id.count() != (uint)d->mCombo->count()) {
|
||
|
kdError(11000) << "KChatBase: internal ERROR - local IDs do not match combo box entries!" << endl;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
int KChatBase::sendingEntry() const
|
||
|
{
|
||
|
if (!d->mCombo) {
|
||
|
kdWarning(11001) << "Cannot retrieve index from NULL combo box" << endl;
|
||
|
return -1;
|
||
|
}
|
||
|
int index = d->mCombo->currentItem();
|
||
|
if (d->mIndex2Id.at(index) == d->mIndex2Id.end()) {
|
||
|
kdWarning(11000) << "could not find the selected sending entry!" << endl;
|
||
|
return -1;
|
||
|
}
|
||
|
return d->mIndex2Id[index];
|
||
|
}
|
||
|
|
||
|
void KChatBase::removeSendingEntry(int id)
|
||
|
{
|
||
|
if (!d->mCombo) {
|
||
|
kdWarning(11000) << "KChatBase: Cannot remove an entry from the combo box" << endl;
|
||
|
return;
|
||
|
}
|
||
|
d->mCombo->removeItem(findIndex(id));
|
||
|
d->mIndex2Id.remove(id);
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::changeSendingEntry(const TQString& text, int id)
|
||
15 years ago
|
{
|
||
|
if (!d->mCombo) {
|
||
|
kdWarning(11000) << "KChatBase: Cannot change an entry in the combo box" << endl;
|
||
|
return;
|
||
|
}
|
||
|
int index = findIndex(id);
|
||
|
d->mCombo->changeItem(text, index);
|
||
|
}
|
||
|
|
||
|
void KChatBase::setSendingEntry(int id)
|
||
|
{
|
||
|
if (!d->mCombo) {
|
||
|
kdWarning(11000) << "KChatBase: Cannot set an entry in the combo box" << endl;
|
||
|
return;
|
||
|
}
|
||
|
d->mCombo->setCurrentItem(findIndex(id));
|
||
|
}
|
||
|
|
||
|
int KChatBase::findIndex(int id) const
|
||
|
{
|
||
14 years ago
|
return d->mIndex2Id.findIndex(id);
|
||
15 years ago
|
}
|
||
|
|
||
|
int KChatBase::nextId() const
|
||
|
{
|
||
|
int i = SendToAll + 1;
|
||
14 years ago
|
while (d->mIndex2Id.findIndex(i) != -1) {
|
||
15 years ago
|
i++;
|
||
|
}
|
||
|
return i;
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::addItem(const TQListBoxItem* text)
|
||
15 years ago
|
{
|
||
|
d->mBox->insertItem(text);
|
||
|
int index = d->mBox->count() -1;
|
||
|
d->mBox->setBottomItem(index);//FIXME: don't scroll to bottom if user scrolled down manually
|
||
|
if (maxItems() >= 0 && d->mBox->count() > (unsigned int)maxItems()) {
|
||
|
d->mBox->removeItem(0);
|
||
|
}
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::addMessage(const TQString& fromName, const TQString& text)
|
||
15 years ago
|
{
|
||
|
//maybe "%1 says: %2" or so
|
||
14 years ago
|
addItem(layoutMessage(fromName, text));
|
||
15 years ago
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::addSystemMessage(const TQString& fromName, const TQString& text)
|
||
15 years ago
|
{
|
||
14 years ago
|
addItem(layoutSystemMessage(fromName, text));
|
||
15 years ago
|
}
|
||
|
|
||
14 years ago
|
TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString& text)
|
||
15 years ago
|
{
|
||
|
//TODO: KChatBaseConfigure? - e.g. color
|
||
15 years ago
|
TQListBoxItem* message;
|
||
15 years ago
|
if (text.startsWith("/me ")) {
|
||
14 years ago
|
// replace "/me" by a nice star. leave one space after the star
|
||
15 years ago
|
TQPixmap pix;
|
||
13 years ago
|
pix.load(locate("data", TQString::tqfromLatin1("tdegames/pics/star.png")));
|
||
15 years ago
|
|
||
|
//TODO KChatBasePixmap? Should change the font here!
|
||
|
|
||
14 years ago
|
message = (TQListBoxItem*)new TQListBoxPixmap(pix, i18n("%1 %2").tqarg(fromName).tqarg(text.mid(3)));
|
||
15 years ago
|
} else {
|
||
|
// the text is not edited in any way. just return an item
|
||
|
KChatBaseText* m = new KChatBaseText(fromName, text);
|
||
|
m->setNameFont(&d->mNameFont);
|
||
|
m->setMessageFont(&d->mMessageFont);
|
||
15 years ago
|
message = (TQListBoxItem*)m;
|
||
15 years ago
|
}
|
||
|
return message;
|
||
|
}
|
||
|
|
||
14 years ago
|
TQListBoxItem* KChatBase::layoutSystemMessage(const TQString& fromName, const TQString& text)
|
||
15 years ago
|
{
|
||
|
//TODO: KChatBaseConfigure? - e.g. color
|
||
|
|
||
|
// no need to check for /me etc.
|
||
14 years ago
|
KChatBaseText* m = new KChatBaseText(i18n("--- %1").tqarg(fromName), text);
|
||
15 years ago
|
m->setNameFont(&d->mSystemNameFont);
|
||
|
m->setMessageFont(&d->mSystemMessageFont);
|
||
15 years ago
|
return (TQListBoxItem*)m;
|
||
15 years ago
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::slotReturnPressed(const TQString& text)
|
||
15 years ago
|
{
|
||
|
if (text.length() <= 0) {
|
||
|
// no text entered - probably hit return by accident
|
||
|
return;
|
||
|
} else if (!acceptMessage()) {
|
||
|
return;
|
||
|
}
|
||
|
d->mEdit->completionObject()->addItem(text);
|
||
15 years ago
|
// connect(d->mEdit, TQT_SIGNAL(returnPressed(const TQString&)), comp, TQT_SLOT(addItem(const TQString&)));
|
||
15 years ago
|
d->mEdit->clear();
|
||
|
returnPressed(text);
|
||
|
}
|
||
|
|
||
15 years ago
|
TQString KChatBase::comboBoxItem(const TQString& name) const
|
||
15 years ago
|
{ // TODO: such a function for "send to all" and "send to my group"
|
||
14 years ago
|
return i18n("Send to %1").tqarg(name);
|
||
15 years ago
|
}
|
||
|
|
||
|
void KChatBase::slotClear()
|
||
|
{
|
||
|
d->mBox->clear();
|
||
|
}
|
||
|
|
||
|
void KChatBase::setCompletionMode(KGlobalSettings::Completion mode)
|
||
|
{ d->mEdit->setCompletionMode(mode); }
|
||
|
|
||
15 years ago
|
void KChatBase::setNameFont(const TQFont& font)
|
||
15 years ago
|
{
|
||
|
d->mNameFont = font;
|
||
|
d->mBox->triggerUpdate(false);
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::setMessageFont(const TQFont& font)
|
||
15 years ago
|
{
|
||
|
d->mMessageFont = font;
|
||
|
d->mBox->triggerUpdate(false);
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::setBothFont(const TQFont& font)
|
||
15 years ago
|
{
|
||
|
setNameFont(font);
|
||
|
setMessageFont(font);
|
||
|
}
|
||
|
|
||
15 years ago
|
const TQFont& KChatBase::nameFont() const
|
||
15 years ago
|
{ return d->mNameFont; }
|
||
|
|
||
15 years ago
|
const TQFont& KChatBase::messageFont() const
|
||
15 years ago
|
{ return d->mMessageFont; }
|
||
|
|
||
15 years ago
|
void KChatBase::setSystemNameFont(const TQFont& font)
|
||
15 years ago
|
{
|
||
|
d->mSystemNameFont = font;
|
||
|
d->mBox->triggerUpdate(false);
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::setSystemMessageFont(const TQFont& font)
|
||
15 years ago
|
{
|
||
|
d->mSystemMessageFont = font;
|
||
|
d->mBox->triggerUpdate(false);
|
||
|
}
|
||
|
|
||
15 years ago
|
void KChatBase::setSystemBothFont(const TQFont& font)
|
||
15 years ago
|
{
|
||
|
setSystemNameFont(font);
|
||
|
setSystemMessageFont(font);
|
||
|
}
|
||
|
|
||
15 years ago
|
const TQFont& KChatBase::systemNameFont() const
|
||
15 years ago
|
{ return d->mSystemNameFont; }
|
||
|
|
||
15 years ago
|
const TQFont& KChatBase::systemMessageFont() const
|
||
15 years ago
|
{ return d->mSystemMessageFont; }
|
||
|
|
||
|
void KChatBase::saveConfig(KConfig* conf)
|
||
|
{
|
||
15 years ago
|
TQString oldGroup;
|
||
15 years ago
|
if (!conf) {
|
||
|
conf = kapp->config();
|
||
|
oldGroup = conf->group();
|
||
|
conf->setGroup("KChatBase");
|
||
|
}
|
||
|
|
||
|
conf->writeEntry("NameFont", nameFont());
|
||
|
conf->writeEntry("MessageFont", messageFont());
|
||
|
conf->writeEntry("SystemNameFont", systemNameFont());
|
||
|
conf->writeEntry("SystemMessageFont", systemMessageFont());
|
||
|
conf->writeEntry("MaxMessages", maxItems());
|
||
|
|
||
|
if (!oldGroup.isNull()) {
|
||
|
conf->setGroup(oldGroup);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void KChatBase::readConfig(KConfig* conf)
|
||
|
{
|
||
15 years ago
|
TQString oldGroup;
|
||
15 years ago
|
if (!conf) {
|
||
|
conf = kapp->config();
|
||
|
oldGroup = conf->group();
|
||
|
conf->setGroup("KChatBase");
|
||
|
}
|
||
|
|
||
|
setNameFont(conf->readFontEntry("NameFont"));
|
||
|
setMessageFont(conf->readFontEntry("MessageFont"));
|
||
|
setSystemNameFont(conf->readFontEntry("SystemNameFont"));
|
||
|
setSystemMessageFont(conf->readFontEntry("SystemMessageFont"));
|
||
|
setMaxItems(conf->readNumEntry("MaxMessages", -1));
|
||
|
|
||
|
if (!oldGroup.isNull()) {
|
||
|
conf->setGroup(oldGroup);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void KChatBase::clear()
|
||
|
{
|
||
|
d->mBox->clear();
|
||
|
}
|
||
|
|
||
|
void KChatBase::setMaxItems(int maxItems)
|
||
|
{
|
||
|
d->mMaxItems = maxItems;
|
||
|
//TODO cut too many messages
|
||
|
if (maxItems == 0) {
|
||
|
clear();
|
||
|
} else if (maxItems > 0) {
|
||
|
while (d->mBox->count() > (unsigned int)maxItems) {
|
||
|
d->mBox->removeItem(0);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
int KChatBase::maxItems() const
|
||
|
{ return d->mMaxItems; }
|
||
|
|
||
|
|
||
|
#include "kchatbase.moc"
|