KDEGames
kplayer.h
323 virtual bool forwardMessage(QDataStream &msg, int msgid, quint32 receiver = 0, quint32 sender = 0);
A collection class for KGameProperty objects.
Definition kgamepropertyhandler.h:64
void sendProperty(int msgid, QDataStream &stream, bool *sent)
Called by KGameProperty only!
Definition kplayer.cpp:424
KGameIO * findRttiIO(int rtti) const
Finds the KGameIO devies with the given rtti code.
Definition kplayer.cpp:307
KGamePropertyBase * findProperty(int id) const
Searches for a property of the player given its id.
Definition kplayer.cpp:414
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 ...
void setAsyncInput(bool a)
Set whether this player can make turns/input all the time (true) or only when it is its turn (false) ...
Definition kplayer.cpp:125
bool hasRtti(int rtti) const
Checks whether this player has a IO device of the given rtti type.
Definition kplayer.cpp:302
bool removeGameIO(KGameIO *input=nullptr, bool deleteit=true)
remove (and delete) a game IO device
Definition kplayer.cpp:278
void networkTransmission(QDataStream &stream, int msgid, quint32 sender)
Receives a message.
Definition kplayer.cpp:387
virtual bool save(QDataStream &stream)
Save a player to a file OR to network.
Definition kplayer.cpp:375
KPlayer * networkPlayer() const
Returns the player which got inactivated to allow this player to be set up via network.
Definition kplayer.cpp:252
virtual bool forwardInput(QDataStream &msg, bool transmit=true, quint32 sender=0)
Forwards input to the game object..internal use only.
Definition kplayer.cpp:173
int userId() const
Returns the user defined id of the player This value can be used arbitrary by you to have some user i...
Definition kplayer.cpp:145
virtual bool forwardMessage(QDataStream &msg, int msgid, quint32 receiver=0, quint32 sender=0)
Forwards Message to the game object..internal use only.
Definition kplayer.cpp:160
bool setTurn(bool b, bool exclusive=true)
Sets whether this player is the next to turn.
Definition kplayer.cpp:329
virtual bool load(QDataStream &stream)
Load a saved player, from file OR network.
Definition kplayer.cpp:352
void setNetworkPriority(int b)
Set whether this player can be replaced by a network player.
Definition kplayer.cpp:262
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.
int networkPriority() const
Returns whether this player can be replaced by a network connection player.
Definition kplayer.cpp:257
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QVariant property(const char *name) const const
QObject * sender() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:53:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:53:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.