libkdegames/libkdegamesprivate/kgame
kgameproperty.cpp
Go to the documentation of this file.
70 mFlags.bits.locked = false ; // setLocked(false); is NOT possible as it checks whether isLocked() allows to change the status
82 int KGamePropertyBase::registerData( KGamePropertyHandler* owner,PropertyPolicy p, const QString& name)
88 int KGamePropertyBase::registerData(int id, KGamePropertyHandler* owner,PropertyPolicy p, const QString& name)
void setEmittingSignal(bool p)
Sets this property to emit a signal on value changed.
Definition: kgameproperty.h:160
int registerData(int id, KGamePropertyHandler *owner, PropertyPolicy p, const QString &name=QString())
You have to register a KGamePropertyBase before you can use it.
Definition: kgameproperty.cpp:88
bool isLocked() const
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.h:190
bool sendProperty()
Forward the data to the owner of this property which then sends it over network.
Definition: kgameproperty.cpp:121
A collection class for KGameProperty objects.
Definition: kgamepropertyhandler.h:73
void setOptimized(bool p)
Sets this property to try to optimize signal and network handling by not sending it out when the prop...
Definition: kgameproperty.h:172
bool removeProperty(KGamePropertyBase *data)
Removes a property from the handler.
Definition: kgamepropertyhandler.cpp:134
void emitSignal()
Causes the parent object to emit a signal on value change.
Definition: kgameproperty.cpp:182
static void createPropertyHeader(QDataStream &msg, int id)
Creates a property header given the property id.
Definition: kgamemessage.cpp:72
void setLock(bool l)
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.cpp:167
KGamePropertyHandler * dataHandler() const
Returns a pointer to the KGame property handler.
Definition: kgame.cpp:701
struct KGamePropertyBase::Flags::@0 bits
void emitSignal(KGamePropertyBase *data)
called by a property to emit a signal This call is simply forwarded to the parent object ...
Definition: kgamepropertyhandler.cpp:296
union KGamePropertyBase::Flags mFlags
bool unlock(bool force=false)
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.cpp:158
void setPolicy(PropertyPolicy p)
Changes the consistency policy of a property.
Definition: kgameproperty.h:148
int uniquePropertyId()
returns a unique property ID starting called usually with a base of KGamePropertyBase::IdAutomatic.
Definition: kgamepropertyhandler.cpp:257
Definition: kgameproperty.h:65
bool sendProperty(QDataStream &s)
called by a property to send itself into the datastream.
Definition: kgamepropertyhandler.cpp:315
KGamePropertyBase()
Creates a KGamePropertyBase object without an owner.
Definition: kgameproperty.cpp:47
bool lock()
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.cpp:149
bool addProperty(KGamePropertyBase *data, const QString &name=QString())
Adds a KGameProperty property to the handler.
Definition: kgamepropertyhandler.cpp:144
int writeRawData(const char *s, int len)
virtual void command(QDataStream &stream, int msgid, bool isSender=false)
send a command to advanced properties like arrays
Definition: kgameproperty.cpp:192
char * data()
static void createPropertyCommand(QDataStream &msg, int cmdid, int pid, int cmd)
Creates a property header given the property id.
Definition: kgamemessage.cpp:84
int size() const
Definition: kgameproperty.h:77
KGamePropertyBase::PropertyPolicy policy()
Returns the default policy for this property handler.
Definition: kgamepropertyhandler.cpp:220
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.