KDEGames
kgamechat.cpp
43KGameChat::KGameChat(KGame *g, int msgid, QWidget *parent, KChatBaseModel *model, KChatBaseItemDelegate *delegate)
49KGameChat::KGameChat(KGame *g, int msgid, KPlayer *fromPlayer, QWidget *parent, KChatBaseModel *model, KChatBaseItemDelegate *delegate)
85 qCDebug(KDEGAMESPRIVATE_KGAME_LOG) << "adding message of player" << p->name() << "id=" << fromId;
342void KGameChat::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
void changeSendingEntry(const QString &text, int id)
This changes a combo box entry.
Definition kchatbase.cpp:204
virtual QString comboBoxItem(const QString &name) const
Replace to customize the combo box.
Definition kchatbase.cpp:260
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
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
void returnPressed(const QString &text) override
This is called whenever the user pushed return ie wants to send a message.
Definition kgamechat.cpp:94
virtual QString sendToPlayerEntry(const QString &name) const
Definition kgamechat.cpp:172
void signalNetworkData(int msgid, const QByteArray &buffer, quint32 receiver, quint32 sender)
We got an user defined update message.
void signalPlayerLeftGame(KPlayer *player)
a player left the game because of a broken connection or so!
void signalPropertyChanged(KGamePropertyBase *property, KPlayer *me)
This signal is emitted if a player property changes its value and the property is set to notify this ...
virtual const QString & group() const
Query the group the player belongs to.
Definition kplayer.cpp:212
void signalNetworkData(int msgid, const QByteArray &buffer, quint32 sender, KPlayer *me)
The player object got a message which was targeted at it but has no default method to process it.
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
ConstIterator
Iterator
iterator begin()
iterator end()
Key key(const T &value, const Key &defaultKey) const const
T value(const Key &key, const T &defaultValue) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void destroyed(QObject *obj)
bool disconnect(const QMetaObject::Connection &connection)
QObject * sender() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:50:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:50:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.