KDEGames
kgamechat.cpp
43 KGameChat::KGameChat(KGame *g, int msgid, QWidget *parent, KChatBaseModel *model, KChatBaseItemDelegate *delegate)
49 KGameChat::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;
107 qCDebug(KDEGAMESPRIVATE_KGAME_LOG) << "from:" << d->mFromPlayer->id() << "==" << d->mFromPlayer->name();
342 void KGameChat::slotReceivePrivateMessage(int msgid, const QByteArray &buffer, quint32 sender, KPlayer *me)
351 void KGameChat::slotReceiveMessage(int msgid, const QByteArray &buffer, quint32, quint32 sender)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void changeSendingEntry(const QString &text, int id)
This changes a combo box entry.
Definition: kchatbase.cpp:204
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.
const T value(const Key &key, const T &defaultValue) const const
QMap::iterator begin()
void removeSendingEntry(int id)
Removes the entry with the ID id from the combo box.
Definition: kchatbase.cpp:189
QObject * sender() const const
virtual QString comboBoxItem(const QString &name) const
Replace to customize the combo box.
Definition: kchatbase.cpp:260
Definition: kchatbaseitemdelegate.h:27
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual const QString & group() const
Query the group the player belongs to.
Definition: kplayer.cpp:212
void destroyed(QObject *obj)
QMap::iterator end()
QString i18n(const char *text, const TYPE &arg...)
bool isToGroupMessage(int id) const
Used to indicate whether a message shall be sent to a group of players.
Definition: kgamechat.cpp:158
Definition: kchatbasemodel.h:66
void signalNetworkData(int msgid, const QByteArray &buffer, quint32 receiver, quint32 sender)
We got an user defined update message.
bool isToPlayerMessage(int id) const
Used to indicate whether the message shall be sent to a single player only.
Definition: kgamechat.cpp:165
void signalPlayerLeftGame(KPlayer *player)
a player left the game because of a broken connection or so!
void returnPressed(const QString &text) override
This is called whenever the user pushed return ie wants to send a message.
Definition: kgamechat.cpp:94
const Key key(const T &value, const Key &defaultKey) const const
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
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 ...
bool addSendingEntry(const QString &text, int id)
Adds a new entry in the combo box.
Definition: kchatbase.cpp:139
QString i18nc(const char *context, const char *text, const TYPE &arg...)
virtual QString sendToPlayerEntry(const QString &name) const
Definition: kgamechat.cpp:172
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
Q_D(Todo)
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.