KDEGames
kchatbasemodel.cpp
35 KChatBaseMessage::KChatBaseMessage(const QString &sender, const QString &message, MessageType type)
bool removeRow(int row, const QModelIndex &parent)
QString readEntry(const char *key, const char *aDefault=nullptr) const
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
const QFont & nameFont() const
This font should be used for the name (the "from: " part) of a message.
Definition: kchatbasemodel.cpp:100
DisplayRole
void beginRemoveRows(const QModelIndex &parent, int first, int last)
virtual bool removeRows(int row, int count, const QModelIndex &parent)
QVariant fromValue(const T &value)
void setSystemMessageFont(const QFont &font)
Same as setMessageFont but applies only to system messages.
Definition: kchatbasemodel.cpp:115
void setMessageFont(const QFont &font)
Set the font that is used for the message part of a message.
Definition: kchatbasemodel.cpp:89
QVariant data(const QModelIndex &index, int role) const override
Reimplementation of the inherited method.
Definition: kchatbasemodel.cpp:187
virtual void addMessage(const QString &fromName, const QString &text)
Add a text in the listbox.
Definition: kchatbasemodel.cpp:207
void beginInsertRows(const QModelIndex &parent, int first, int last)
void setSystemBothFont(const QFont &font)
Same as setBothFont but applies only to system messages.
Definition: kchatbasemodel.cpp:120
virtual void addSystemMessage(const QString &fromName, const QString &text)
This works just like addMessage but adds a system message.
Definition: kchatbasemodel.cpp:222
void setSystemNameFont(const QFont &font)
Same as setNameFont but applies only to system messages.
Definition: kchatbasemodel.cpp:110
void setBothFont(const QFont &font)
This sets both - nameFont and messageFont to font.
Definition: kchatbasemodel.cpp:94
void endInsertRows()
bool isValid() const const
int row() const const
const QFont & systemMessageFont() const
Same as systemMessageFont but applies only to system messages.
Definition: kchatbasemodel.cpp:131
void endRemoveRows()
virtual void saveConfig(KConfig *conf=nullptr)
Save the configuration of the dialog to a KConfig object.
Definition: kchatbasemodel.cpp:136
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Reimplementation of the inherited method.
Definition: kchatbasemodel.cpp:199
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
void setMaxItems(int maxItems)
Set the maximum number of items in the list.
Definition: kchatbasemodel.cpp:169
const QFont & messageFont() const
This font should be used for a message.
Definition: kchatbasemodel.cpp:105
QObject * parent() const const
QString message
virtual void readConfig(KConfig *conf=nullptr)
Read the configuration from a KConfig object.
Definition: kchatbasemodel.cpp:150
The class of the elements stored in the chat list model.
Definition: kchatbasemodel.h:34
void setNameFont(const QFont &font)
Set the font that is used for the name part of a message.
Definition: kchatbasemodel.cpp:84
const QFont & systemNameFont() const
Same as systemNameFont but applies only to system messages.
Definition: kchatbasemodel.cpp:126
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:50:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:50:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.