19 #ifndef __KCHATBASE_H__ 20 #define __KCHATBASE_H__ 24 #include <tqlistbox.h> 26 #include <tdeglobalsettings.h> 27 #include <tdemacros.h> 33 class KChatBaseTextPrivate;
90 const TQString&
name()
const;
96 const TQString&
message()
const;
132 virtual int width(TQListBox* )
const;
136 virtual int height(TQListBox* )
const;
141 virtual void paint(TQPainter*);
147 KChatBaseTextPrivate* d;
151 class KChatBasePrivate;
195 KChatBase(TQWidget* parent,
bool noComboBox =
false);
213 virtual const TQString& fromName()
const = 0;
226 bool addSendingEntry(
const TQString& text,
int id);
239 bool insertSendingEntry(
const TQString& text,
int id,
int index = -1);
246 void changeSendingEntry(
const TQString& text,
int id);
252 void setSendingEntry(
int id);
260 void removeSendingEntry(
int id);
269 int sendingEntry()
const;
274 int findIndex(
int id)
const;
288 virtual bool acceptMessage()
const;
293 void setCompletionMode(TDEGlobalSettings::Completion mode);
313 void setBothFont(
const TQFont& font);
319 void setSystemNameFont(
const TQFont& font);
325 void setSystemMessageFont(
const TQFont& font);
331 void setSystemBothFont(
const TQFont& font);
355 const TQFont& systemNameFont()
const;
361 const TQFont& systemMessageFont()
const;
372 virtual void saveConfig(TDEConfig* conf = 0);
379 virtual void readConfig(TDEConfig* conf = 0);
388 void setMaxItems(
int maxItems);
399 int maxItems()
const;
414 virtual void addMessage(
const TQString& fromName,
const TQString& text);
423 virtual void addSystemMessage(
const TQString& fromName,
const TQString& text);
435 virtual void addItem(
const TQListBoxItem* item);
448 void setAcceptMessage(
bool a);
455 void rightButtonClicked(TQListBoxItem*,
const TQPoint&);
469 virtual void returnPressed(
const TQString& text) = 0;
478 virtual TQString comboBoxItem(
const TQString&
name)
const;
486 virtual TQListBoxItem* layoutMessage(
const TQString& fromName,
const TQString& text);
495 virtual TQListBoxItem* layoutSystemMessage(
const TQString& fromName,
const TQString& text);
503 void slotReturnPressed(
const TQString&);
506 void init(
bool noComboBox);
A TQListBoxText implementation for KChatBase.
KChatBaseText(const TQString &player, const TQString &text)
Constructs a KChatBaseText object with the player and text part.
The base class for chat widgets.
TQFont messageFont() const
You can set the font of the message independently of the sender name.
void setName(const TQString &name)
Set the name part of a message.
virtual ~KChatBaseText()
Destruct a KChatBaseText object.
void setMessageFont(const TQFont *font)
Set the font for the message text.
const TQString & message() const
void setMessage(const TQString &message)
Set the text part of a message.
TQFont nameFont() const
You can set the font of the sender name independently of the message itself.
void setNameFont(const TQFont *font)
Set the font for the name.
const TQString & name() const