KDEGames
kgamepropertyhandler.h
81 KGamePropertyHandler(int id, const QObject *receiver, const char *sendf, const char *emitf, QObject *parent = nullptr);
310 void signalSendMessage(int msgid, QDataStream &, bool *sent); // AB shall we change bool* into bool& again?
bool sendProperty(QDataStream &s)
called by a property to send itself into the datastream.
Definition kgamepropertyhandler.cpp:300
void setId(int id)
Use id as new ID for this KGamePropertyHandler.
Definition kgamepropertyhandler.cpp:70
void signalRequestValue(KGamePropertyBase *property, QString &value)
If you call propertyValue with a non-standard KGameProperty it is possible that the value cannot auto...
void setPolicy(KGamePropertyBase::PropertyPolicy p, bool userspace=true)
Set the policy for all kgame variables which are currently registered in the KGame property handler.
Definition kgamepropertyhandler.cpp:215
void registerHandler(int id, const QObject *receiver, const char *send, const char *emit)
Register the handler with a parent.
Definition kgamepropertyhandler.cpp:75
void lockProperties()
Calls KGamePropertyBase::setReadOnly(true) for all properties of this handler.
Definition kgamepropertyhandler.cpp:238
int uniquePropertyId()
returns a unique property ID starting called usually with a base of KGamePropertyBase::IdAutomatic.
Definition kgamepropertyhandler.cpp:247
QString propertyValue(KGamePropertyBase *property)
In several situations you just want to have a QString of a KGameProperty object.
Definition kgamepropertyhandler.cpp:335
bool removeProperty(KGamePropertyBase *data)
Removes a property from the handler.
Definition kgamepropertyhandler.cpp:124
virtual bool save(QDataStream &stream)
Saves properties into the datastream.
Definition kgamepropertyhandler.cpp:193
QMultiHash< int, KGamePropertyBase * > & dict() const
Reference to the internal dictionary.
Definition kgamepropertyhandler.cpp:330
void flush()
Sends all properties which are marked dirty over the network.
Definition kgamepropertyhandler.cpp:252
bool addProperty(KGamePropertyBase *data, const QString &name=QString())
Adds a KGameProperty property to the handler.
Definition kgamepropertyhandler.cpp:134
void unlockProperties()
Calls KGamePropertyBase::setReadOnly(false) for all properties of this player.
Definition kgamepropertyhandler.cpp:229
virtual bool load(QDataStream &stream)
Loads properties from the datastream.
Definition kgamepropertyhandler.cpp:171
void unlockDirectEmit()
Removes the lock from the emitting of property signals.
Definition kgamepropertyhandler.cpp:271
void lockDirectEmit()
Called by the KGame or KPlayer object or the handler itself to delay emitting of signals.
Definition kgamepropertyhandler.cpp:266
KGamePropertyHandler(QObject *parent=nullptr)
Construct an unregistered KGamePropertyHandler.
Definition kgamepropertyhandler.cpp:52
void emitSignal(KGamePropertyBase *data)
called by a property to emit a signal This call is simply forwarded to the parent object
Definition kgamepropertyhandler.cpp:284
void signalPropertyChanged(KGamePropertyBase *)
This is emitted by a property.
bool processMessage(QDataStream &stream, int id, bool isSender)
Main message process function.
Definition kgamepropertyhandler.cpp:86
KGamePropertyBase::PropertyPolicy policy()
Returns the default policy for this property handler.
Definition kgamepropertyhandler.cpp:210
void signalSendMessage(int msgid, QDataStream &, bool *sent)
This signal is emitted when a property needs to be sent.
QString propertyName(int id) const
Definition kgamepropertyhandler.cpp:155
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
QVariant property(const char *name) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.