KDEGames
kgamechat.h
45 KGameChat(KGame *game, int msgid, KPlayer *fromPlayer, QWidget *parent, KChatBaseModel *model = nullptr, KChatBaseItemDelegate *delegate = nullptr);
52 KGameChat(KGame *game, int msgId, QWidget *parent, KChatBaseModel *model = nullptr, KChatBaseItemDelegate *delegate = nullptr);
199 void slotReceivePrivateMessage(int msgid, const QByteArray &buffer, quint32 sender, KPlayer *me);
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
KChatBase(QWidget *parent, KChatBaseModel *model=nullptr, KChatBaseItemDelegate *delegate=nullptr, bool noComboBox=false)
Definition kchatbase.cpp:56
virtual QString fromName() const =0
virtual void addMessage(const QString &fromName, const QString &text)
Add a text in the listbox.
Definition kchatbase.cpp:396
virtual void returnPressed(const QString &text)=0
This is called whenever the user pushed return ie wants to send a message.
void slotReceivePrivateMessage(int msgid, const QByteArray &buffer, quint32 sender, KPlayer *me)
Called when KPlayer::signalNetworkData is emitted.
Definition kgamechat.cpp:342
void slotUnsetKGame()
Unsets a KGame object that has been set using setKGame before.
Definition kgamechat.cpp:274
bool isToPlayerMessage(int id) const
Used to indicate whether the message shall be sent to a single player only.
Definition kgamechat.cpp:165
KGameChat(KGame *game, int msgid, KPlayer *fromPlayer, QWidget *parent, KChatBaseModel *model=nullptr, KChatBaseItemDelegate *delegate=nullptr)
Construct a KGame chat widget on game that used msgid for the chat message.
Definition kgamechat.cpp:49
bool isToGroupMessage(int id) const
Used to indicate whether a message shall be sent to a group of players.
Definition kgamechat.cpp:158
virtual QString sendToPlayerEntry(const QString &name) const
Definition kgamechat.cpp:172
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
QObject * sender() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
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.