PropertyLib::PropertyList Class Reference
The list of properties. More...
#include <propertylist.h>
Inheritance diagram for PropertyLib::PropertyList:


Signals | |
void | propertyValueChanged (Property *property) |
Emitted when the value of the property is changed. | |
void | aboutToDeleteProperty (Property *property) |
Emitted when property is about to be deleted. | |
Public Member Functions | |
PropertyList () | |
virtual | ~PropertyList () |
virtual MultiProperty * | operator[] (const QString &name) |
Accesses a property by it's name. | |
virtual void | addProperty (Property *property) |
Adds the property to the list to the "common" group. | |
virtual void | addProperty (const QString &group, Property *property) |
Adds the property to the list in group. | |
virtual void | removeProperty (Property *property) |
Removes property from the list. | |
virtual void | removeProperty (const QString &name) |
Removes property with the given name from the list. | |
virtual const QValueList< QPair< QString, QValueList< QString > > > & | propertiesOfGroup () const |
virtual const QMap< MultiProperty *, QString > & | groupOfProperty () const |
virtual void | clear () |
Clears the list of properties. | |
virtual bool | contains (const QString &name) |
Returns true if the list of properties contains property with given name. | |
QPtrList< Property > | properties (const QString &name) |
The list of properties with given name. | |
Protected Member Functions | |
PropertyList (bool propertyOwner) | |
Constructs a list which owns or does not own it's properties. | |
void | addToGroup (const QString &group, MultiProperty *property) |
Adds property to a group. | |
void | removeFromGroup (MultiProperty *property) |
Removes property from a group. | |
Private Attributes | |
QMap< QString, MultiProperty * > | m_list |
QValueList< QPair< QString, QValueList< QString > > > | m_propertiesOfGroup |
QMap< MultiProperty *, QString > | m_groupOfProperty |
bool | m_propertyOwner |
Friends | |
class | MultiProperty |
class | PropertyBuffer |
Detailed Description
The list of properties.Every object in a program should operate with properties through this list in order to:
- be informed about property changes
- allow property lists intersections
- display properties in the property editor widget (see PropertyEditor).
PropertyList is also capable of grouping properties. You can have unsorted list of groups of properties or a plain alphabetically sorted list of properties or both at the same time.
Definition at line 55 of file propertylist.h.
Constructor & Destructor Documentation
|
Definition at line 27 of file propertylist.cpp. |
|
Definition at line 37 of file propertylist.cpp. References clear(). |
|
Constructs a list which owns or does not own it's properties.
Definition at line 32 of file propertylist.cpp. |
Member Function Documentation
|
Emitted when property is about to be deleted.
Referenced by removeProperty(). |
|
Adds the property to the list in group.
Definition at line 68 of file propertylist.cpp. References PropertyLib::MultiProperty::addProperty(), addToGroup(), m_list, MultiProperty, and PropertyLib::Property::name(). |
|
Adds the property to the list to the "common" group.
Definition at line 50 of file propertylist.cpp. References PropertyLib::MultiProperty::addProperty(), addToGroup(), m_list, MultiProperty, and PropertyLib::Property::name(). |
|
Adds property to a group.
Definition at line 151 of file propertylist.cpp. References m_groupOfProperty, m_propertiesOfGroup, and PropertyLib::MultiProperty::name(). Referenced by addProperty(), PropertyLib::PropertyBuffer::PropertyBuffer(), and removeProperty(). |
|
Clears the list of properties.
Definition at line 250 of file propertylist.cpp. References m_list, and removeProperty(). Referenced by PropertyLib::PropertyEditor::clearProperties(), and ~PropertyList(). |
|
Returns true if the list of properties contains property with given name.
Definition at line 256 of file propertylist.cpp. References m_list. |
|
Definition at line 146 of file propertylist.cpp. |
|
Accesses a property by it's name. All property modifications are allowed trough this method. For example, to set a value of a property, use: /code PropertyList list; ... list["My Property"]->setValue("My Value"); /endcode
Definition at line 42 of file propertylist.cpp. References m_list, and MultiProperty. |
|
The list of properties with given name.
Definition at line 263 of file propertylist.cpp. References m_list. |
|
Definition at line 141 of file propertylist.cpp. Referenced by PropertyLib::PropertyEditor::populateProperties(). |
|
Emitted when the value of the property is changed.
Referenced by PropertyLib::MultiProperty::setValue(), and PropertyLib::MultiProperty::undo(). |
|
Removes property from a group.
Definition at line 186 of file propertylist.cpp. References m_groupOfProperty, m_propertiesOfGroup, and PropertyLib::MultiProperty::name(). Referenced by removeProperty(). |
|
Removes property with the given name from the list. Emits aboutToDeleteProperty before removing. Definition at line 112 of file propertylist.cpp. References aboutToDeleteProperty(), addToGroup(), m_groupOfProperty, m_list, PropertyLib::Property::name(), and removeFromGroup(). |
|
Removes property from the list. Emits aboutToDeleteProperty before removing. Definition at line 87 of file propertylist.cpp. References aboutToDeleteProperty(), addToGroup(), PropertyLib::MultiProperty::list, m_groupOfProperty, m_list, PropertyLib::Property::name(), removeFromGroup(), and PropertyLib::MultiProperty::removeProperty(). Referenced by clear(), and PropertyLib::PropertyBuffer::intersect(). |
Friends And Related Function Documentation
|
Definition at line 124 of file propertylist.h. Referenced by addProperty(), operator[](), and PropertyLib::PropertyBuffer::PropertyBuffer(). |
|
Definition at line 125 of file propertylist.h. |
Member Data Documentation
|
Definition at line 118 of file propertylist.h. Referenced by addToGroup(), PropertyLib::PropertyBuffer::intersect(), PropertyLib::PropertyBuffer::PropertyBuffer(), removeFromGroup(), and removeProperty(). |
|
Definition at line 112 of file propertylist.h. Referenced by addProperty(), clear(), contains(), PropertyLib::PropertyBuffer::intersect(), operator[](), properties(), PropertyLib::PropertyBuffer::PropertyBuffer(), and removeProperty(). |
|
Definition at line 116 of file propertylist.h. Referenced by addToGroup(), and removeFromGroup(). |
|
Definition at line 122 of file propertylist.h. |
The documentation for this class was generated from the following files:
- lib/widgets/propeditor/propertylist.h
- lib/widgets/propeditor/propertylist.cpp