21 #ifndef VPROPERTYSET_H
22 #define VPROPERTYSET_H
24 #include <qcompilerdetection.h>
31 template <
class Key,
class T>
class QMap;
32 template <
typename T>
class QList;
38 class VPropertySetPrivate;
91 virtual int count()
const;
95 virtual void clear(
bool delete_properties =
true);
VPropertySet is a simple class for managing a set of properties. If you don't need all the Model-func...
VPropertySetPrivate * d_ptr
The data.
virtual void removeProperty(const QString &id)
Removes a property from the set and deletes it.
Q_REQUIRED_RESULT VPropertySet * clone() const
Clones the property set.
virtual void clear(bool delete_properties=true)
Clears the set and (optionally) deletes all properties.
virtual ~VPropertySet()
Destructor.
VProperty * getRootProperty(int row) const
Returns the root property in a certain row.
virtual bool addProperty(VProperty *property, const QString &id, const QString &parentid)
Adds the property to the model and attaches it to the parentid. Note that if the property has a paren...
virtual int count() const
Returns the number of properties with in ID that are directly accessable by getProperty()
VPropertySet()
Default constructor, creating an empty property set.
virtual QString getPropertyID(const VProperty *prop, bool look_for_parent_id=true) const
Returns the ID of the property within the set The concept of property IDs is, that the object that ma...
virtual void removePropertyFromSet(VProperty *prop)
Recursivly removes a property's child properties from the set, but not from the parent.
virtual bool hasProperty(VProperty *property) const
Checks whether a property belongs to this set and returns the result.
virtual VProperty * getProperty(const QString &id) const
Gets a property by it's ID.
void cloneProperty(VProperty *property_to_clone, VProperty *parent_property, VPropertySet *output_set) const
Clones a property into another property set.
int getRootPropertyCount() const
Returns the number of independent properties.
const QMap< QString, VProperty * > & getPropertiesMap() const
Returns a const reference to the map of properties.
const QList< VProperty * > & getRootProperties() const
Returns a const reference to the list of root properties.
virtual VProperty * takeProperty(const QString &id)
Removes a property from the set and returns it.