PropertyLib::MultiProperty Class Reference
Holds a list of properties with the same name and type. More...
#include <multiproperty.h>
Collaboration diagram for PropertyLib::MultiProperty:

Public Member Functions | |
MultiProperty (Property *prop) | |
Constructs multiproperty with one property which is not connected to a property list. | |
MultiProperty (PropertyList *propertyList) | |
Constructs empty multiproperty. | |
MultiProperty (PropertyList *propertyList, Property *prop) | |
Constructs multiproperty with one Property in the list. | |
~MultiProperty () | |
bool | operator== (const MultiProperty &prop) const |
Compares two multiproperties. | |
bool | operator== (const Property &prop) const |
Compares multiproperty with property. | |
void | addProperty (Property *prop) |
Adds property to the list. | |
void | removeProperty (Property *prop) |
Removes property from the list. | |
void | addProperty (MultiProperty *prop) |
Adds all properties from the multiproperty prop. | |
void | removeProperty (MultiProperty *prop) |
Removes all properties that exists in the multiproperty prop. | |
QString | name () const |
Returns the name of a property. | |
int | type () const |
Returns the type of a property. | |
QVariant | value () const |
Returns the value of a property. | |
QString | description () const |
Returns the description of a property. | |
bool | readOnly () const |
Returns the readonly attribute of a property. | |
bool | visible () const |
Returns the visibility attribute of a property. | |
QMap< QString, QVariant > | valueList () const |
The string-to-value correspondence list of the property. | |
void | setValue (const QVariant &value) |
Sets the value of a property. | |
void | setValue (const QVariant &value, bool emitChange) |
Sets the value of a property. | |
void | setDescription (const QString &description) |
Sets the description of a property. | |
void | setValueList (const QMap< QString, QVariant > &valueList) |
Sets the list of possible values of a property. | |
QVariant | findValueDescription () const |
Finds string description for a value. | |
QVariant | findValueDescription (QVariant val) const |
Finds string description for a value. | |
bool | valid () const |
Returns true if the multiproperty has no properties in the list (i.e. | |
void | undo () |
Reverts the property value to previous setting. | |
Public Attributes | |
QValueList< ChildProperty > | details |
The list of child properties. | |
Private Attributes | |
QPtrList< Property > | list |
PropertyList * | m_propertyList |
Friends | |
class | PropertyList |
class | PropertyBuffer |
Detailed Description
Holds a list of properties with the same name and type.It is used by PropertyList to store properties. Generally, PropertyList stores a list of multiproperties instead of properties. This allows working with many properties of the same name and type at the same type.
MultiProperty is also responsible for storing detailed property editors (instances of ChildProperty class. It's too much overhead to store child properties with their parent properties. MultiProperty provides a way to store child properties only once for all properties with the same name and same type.
Definition at line 49 of file multiproperty.h.
Constructor & Destructor Documentation
|
Constructs multiproperty with one property which is not connected to a property list.
Definition at line 25 of file multiproperty.cpp. References list. |
|
Constructs empty multiproperty.
Definition at line 31 of file multiproperty.cpp. |
|
Constructs multiproperty with one Property in the list.
Definition at line 36 of file multiproperty.cpp. References list. |
|
Definition at line 42 of file multiproperty.cpp. |
Member Function Documentation
|
Adds all properties from the multiproperty prop.
Definition at line 213 of file multiproperty.cpp. References addProperty(), and list. |
|
Adds property to the list.
Definition at line 183 of file multiproperty.cpp. References list. Referenced by PropertyLib::PropertyList::addProperty(), and addProperty(). |
|
Returns the description of a property.
Definition at line 78 of file multiproperty.cpp. References PropertyLib::Property::description(), and list. |
|
Finds string description for a value.
Definition at line 241 of file multiproperty.cpp. References type(), and valueList(). |
|
Finds string description for a value.
Definition at line 227 of file multiproperty.cpp. References type(), value(), and valueList(). |
|
Returns the name of a property.
Definition at line 46 of file multiproperty.cpp. References list. Referenced by PropertyLib::PropertyList::addToGroup(), PropertyLib::PropertyEditor::machine(), PropertyLib::PropertyMachineFactory::machineForProperty(), operator==(), PropertyLib::PropertyEditor::propertyChanged(), PropertyLib::PropertyWidget::propertyName(), and PropertyLib::PropertyList::removeFromGroup(). |
|
Compares multiproperty with property.
Definition at line 204 of file multiproperty.cpp. References PropertyLib::Property::name(), name(), PropertyLib::Property::type(), and type(). |
|
Compares two multiproperties.
Definition at line 197 of file multiproperty.cpp. |
|
Returns the readonly attribute of a property.
Definition at line 96 of file multiproperty.cpp. References list, and PropertyLib::Property::readOnly(). |
|
Removes all properties that exists in the multiproperty prop.
Definition at line 220 of file multiproperty.cpp. References list, and removeProperty(). |
|
Removes property from the list.
Definition at line 188 of file multiproperty.cpp. References list. Referenced by PropertyLib::PropertyList::removeProperty(), and removeProperty(). |
|
Sets the description of a property.
Definition at line 139 of file multiproperty.cpp. References list, and PropertyLib::Property::setDescription(). |
|
Sets the value of a property.
Definition at line 165 of file multiproperty.cpp. References list, m_propertyList, PropertyLib::PropertyList::propertyValueChanged(), and PropertyLib::Property::setValue(). |
|
Sets the value of a property.
Definition at line 154 of file multiproperty.cpp. References list, m_propertyList, PropertyLib::PropertyList::propertyValueChanged(), and PropertyLib::Property::setValue(). Referenced by PropertyLib::PropertyEditor::propertyChanged(), and PropertyLib::ChildProperty::setValue(). |
|
Sets the list of possible values of a property.
Definition at line 176 of file multiproperty.cpp. References list, and PropertyLib::Property::setValueList(). |
|
Returns the type of a property.
Definition at line 53 of file multiproperty.cpp. References list. Referenced by PropertyLib::PropertyEditor::addChildProperties(), findValueDescription(), PropertyLib::PropertyEditor::machine(), PropertyLib::PropertyMachineFactory::machineForProperty(), operator==(), PropertyLib::PropertyEditor::prepareEditor(), PropertyLib::ChildProperty::setValue(), and PropertyLib::ChildProperty::value(). |
|
Reverts the property value to previous setting.
Definition at line 259 of file multiproperty.cpp. References list, m_propertyList, PropertyLib::Property::oldValue(), PropertyLib::PropertyList::propertyValueChanged(), and PropertyLib::Property::setValue(). Referenced by PropertyLib::PropertyWidget::undo(). |
|
Returns true if the multiproperty has no properties in the list (i.e. it's invalid). Definition at line 254 of file multiproperty.cpp. References list. Referenced by PropertyLib::ChildProperty::setValue(), and PropertyLib::ChildProperty::value(). |
|
Returns the value of a property.
Definition at line 60 of file multiproperty.cpp. References list, and PropertyLib::Property::value(). Referenced by findValueDescription(), PropertyLib::PropertyEditor::prepareEditor(), PropertyLib::ChildProperty::setValue(), and PropertyLib::ChildProperty::value(). |
|
The string-to-value correspondence list of the property.
Definition at line 132 of file multiproperty.cpp. References list. Referenced by findValueDescription(), PropertyLib::PropertyEditor::machine(), PropertyLib::PropertyMachineFactory::machineForProperty(), and PropertyLib::PropertyEditor::prepareEditor(). |
|
Returns the visibility attribute of a property.
Definition at line 114 of file multiproperty.cpp. References list, and PropertyLib::Property::visible(). |
Friends And Related Function Documentation
|
Definition at line 120 of file multiproperty.h. |
|
Definition at line 119 of file multiproperty.h. |
Member Data Documentation
|
The list of child properties.
Definition at line 112 of file multiproperty.h. Referenced by PropertyLib::PropertyEditor::addChildProperties(). |
|
Definition at line 115 of file multiproperty.h. Referenced by addProperty(), description(), MultiProperty(), name(), readOnly(), PropertyLib::PropertyList::removeProperty(), removeProperty(), setDescription(), setValue(), setValueList(), type(), undo(), valid(), value(), valueList(), and visible(). |
|
Definition at line 117 of file multiproperty.h. Referenced by PropertyLib::PropertyBuffer::PropertyBuffer(), setValue(), and undo(). |
The documentation for this class was generated from the following files:
- lib/widgets/propeditor/multiproperty.h
- lib/widgets/propeditor/multiproperty.cpp