KDEGames
kchatbase.h
76 explicit KChatBase(QWidget *parent, KChatBaseModel *model = nullptr, KChatBaseItemDelegate *delegate = nullptr, bool noComboBox = false);
A delegate (see the Qt Model/View module for details) to paint the lines of the KChatBase list model ...
Definition kchatbaseitemdelegate.h:28
The model used to store messages displayed in the chat dialog messages list.
Definition kchatbasemodel.h:70
void setBothFont(const QFont &font)
This sets both - nameFont and messageFont to font.
Definition kchatbase.cpp:368
KChatBase(QWidget *parent, KChatBaseModel *model=nullptr, KChatBaseItemDelegate *delegate=nullptr, bool noComboBox=false)
Definition kchatbase.cpp:56
virtual QString fromName() const =0
bool insertSendingEntry(const QString &text, int id, int index=-1)
Inserts a new entry in the combo box.
Definition kchatbase.cpp:148
void setNameFont(const QFont &font)
Set the font that is used for the name part of a message.
Definition kchatbase.cpp:354
virtual void addSystemMessage(const QString &fromName, const QString &text)
This works just like addMessage but adds a system message.
Definition kchatbase.cpp:403
QFont systemMessageFont() const
Same as systemMessageFont but applies only to system messages.
Definition kchatbase.cpp:347
void changeSendingEntry(const QString &text, int id)
This changes a combo box entry.
Definition kchatbase.cpp:204
void setSystemNameFont(const QFont &font)
Same as setNameFont but applies only to system messages.
Definition kchatbase.cpp:375
void setSystemBothFont(const QFont &font)
Same as setBothFont but applies only to system messages.
Definition kchatbase.cpp:389
void setSystemMessageFont(const QFont &font)
Same as setMessageFont but applies only to system messages.
Definition kchatbase.cpp:382
void setMessageFont(const QFont &font)
Set the font that is used for the message part of a message.
Definition kchatbase.cpp:361
virtual void addMessage(const QString &fromName, const QString &text)
Add a text in the listbox.
Definition kchatbase.cpp:396
virtual QString comboBoxItem(const QString &name) const
Replace to customize the combo box.
Definition kchatbase.cpp:260
void setCompletionMode(KCompletion::CompletionMode mode)
See KLineEdit::setCompletionMode.
Definition kchatbase.cpp:270
virtual void returnPressed(const QString &text)=0
This is called whenever the user pushed return ie wants to send a message.
virtual void saveConfig(KConfig *conf=nullptr)
Save the configuration of the dialog to a KConfig object.
Definition kchatbase.cpp:277
virtual void readConfig(KConfig *conf=nullptr)
Read the configuration from a KConfig object.
Definition kchatbase.cpp:287
QFont systemNameFont() const
Same as systemNameFont but applies only to system messages.
Definition kchatbase.cpp:340
QFont nameFont() const
This font should be used for the name (the "from: " part) of a message.
Definition kchatbase.cpp:326
bool addSendingEntry(const QString &text, int id)
Adds a new entry in the combo box.
Definition kchatbase.cpp:139
void removeSendingEntry(int id)
Removes the entry with the ID id from the combo box.
Definition kchatbase.cpp:189
QModelIndex indexAt(QPoint pos) const
Returns the model index of the message at the viewport coordinates point.
Definition kchatbase.cpp:107
void setMaxItems(int maxItems)
Set the maximum number of items in the list.
Definition kchatbase.cpp:304
CompletionMode
QFrame(QWidget *parent, Qt::WindowFlags f)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
font
pos
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.