KDEGames
kgameproperty.h
285 int registerData(int id, KGamePropertyHandler *owner, PropertyPolicy p, const QString &name = QString());
311 int registerData(KGamePropertyHandler *owner, PropertyPolicy p = PolicyUndefined, const QString &name = QString());
620 // TODO: ID: Very ugly - better use something like parent()->propertyId() or so which assigns a free id automatically.
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:173
void setEmittingSignal(bool p)
Sets this property to emit a signal on value changed.
Definition kgameproperty.h:155
virtual void load(QDataStream &s)=0
This will read the value of this property from the stream.
void setPolicy(PropertyPolicy p)
Changes the consistency policy of a property.
Definition kgameproperty.h:137
bool sendProperty()
Forward the data to the owner of this property which then sends it over network.
Definition kgameproperty.cpp:120
void emitSignal()
Causes the parent object to emit a signal on value change.
Definition kgameproperty.cpp:181
bool isLocked() const
A locked property can only be changed by the player who has set the lock.
Definition kgameproperty.h:200
A collection class for KGameProperty objects.
Definition kgamepropertyhandler.h:64
void load(QDataStream &s) override
Reads from a stream and assigns the read value to this object.
Definition kgameproperty.h:813
const type & operator=(const type &t)
This calls setValue to change the value of the property.
Definition kgameproperty.h:840
const type & operator=(const KGameProperty &property)
This copies the data of property to the KGameProperty object.
Definition kgameproperty.h:851
void setValue(type v)
Set the value depending on the current policy (see setConsistent).
Definition kgameproperty.h:649
void changeValue(type v)
This function does both, change the local value and change the network value.
Definition kgameproperty.h:777
bool setLocal(type v)
This function sets the value of the property directly, i.e.
Definition kgameproperty.h:748
KGameProperty(int id, KGamePropertyHandler *owner)
Constructs a KGameProperty object.
Definition kgameproperty.h:621
QCA_EXPORT void init()
WriteOnly
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.