kgameproperty.cpp
73 mFlags.bits.locked = false ; // setLocked(false); is NOT possible as it checks whether isLocked() allows to change the status
85 int KGamePropertyBase::registerData( KGamePropertyHandler* owner,PropertyPolicy p, TQString name)
91 int KGamePropertyBase::registerData(int id, KGamePropertyHandler* owner,PropertyPolicy p, TQString name)
191 kdError(11001) << k_funcinfo << ":id="<<id()<<" Cannot emitSignal because there is no handler set" << endl;
void setEmittingSignal(bool p)
Sets this property to emit a signal on value changed.
Definition: kgameproperty.h:157
bool sendProperty(TQDataStream &s)
called by a property to send itself into the datastream.
Definition: kgamepropertyhandler.cpp:322
bool sendProperty()
Forward the data to the owner of this property which then sends it over network.
Definition: kgameproperty.cpp:124
A collection class for KGameProperty objects.
Definition: kgamepropertyhandler.h:72
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:169
bool removeProperty(KGamePropertyBase *data)
Removes a property from the handler.
Definition: kgamepropertyhandler.cpp:142
void emitSignal()
Causes the parent object to emit a signal on value change.
Definition: kgameproperty.cpp:185
void setLock(bool l)
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.cpp:170
virtual void command(TQDataStream &stream, int msgid, bool isSender=false)
send a command to advanced properties like arrays
Definition: kgameproperty.cpp:195
void emitSignal(KGamePropertyBase *data)
called by a property to emit a signal This call is simply forwarded to the parent object ...
Definition: kgamepropertyhandler.cpp:303
bool unlock(bool force=false)
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.cpp:161
void setPolicy(PropertyPolicy p)
Changes the consistency policy of a property.
Definition: kgameproperty.h:145
bool isLocked() const
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.h:187
int uniquePropertyId()
returns a unique property ID starting called usually with a base of KGamePropertyBase::IdAutomatic.
Definition: kgamepropertyhandler.cpp:264
KGamePropertyBase()
Creates a KGamePropertyBase object without an owner.
Definition: kgameproperty.cpp:50
bool lock()
A locked property can only be changed by the player who has set the lock.
Definition: kgameproperty.cpp:152
int registerData(int id, KGamePropertyHandler *owner, PropertyPolicy p, TQString name=0)
You have to register a KGamePropertyBase before you can use it.
Definition: kgameproperty.cpp:91
bool addProperty(KGamePropertyBase *data, TQString name=0)
Adds a KGameProperty property to the handler.
Definition: kgamepropertyhandler.cpp:151
KGamePropertyBase::PropertyPolicy policy()
Returns the default policy for this property handler.
Definition: kgamepropertyhandler.cpp:227
KGamePropertyHandler * dataHandler() const
Returns a pointer to the KGame property handler.
Definition: kgame.cpp:689