#include <multiproperty.h>
Public Member Functions | |
MultiProperty (Property *prop) | |
MultiProperty (PropertyList *propertyList) | |
MultiProperty (PropertyList *propertyList, Property *prop) | |
bool | operator== (const MultiProperty &prop) const |
bool | operator== (const Property &prop) const |
void | addProperty (Property *prop) |
void | removeProperty (Property *prop) |
void | addProperty (MultiProperty *prop) |
void | removeProperty (MultiProperty *prop) |
TQString | name () const |
int | type () const |
TQVariant | value () const |
TQString | description () const |
bool | readOnly () const |
bool | visible () const |
TQMap< TQString, TQVariant > | valueList () const |
void | setValue (const TQVariant &value) |
void | setValue (const TQVariant &value, bool emitChange) |
void | setDescription (const TQString &description) |
void | setValueList (const TQMap< TQString, TQVariant > &valueList) |
TQVariant | findValueDescription () const |
TQVariant | findValueDescription (TQVariant val) const |
bool | valid () const |
void | undo () |
Public Attributes | |
TQValueList< ChildProperty > | details |
Friends | |
class | PropertyList |
class | PropertyBuffer |
Detailed Description
Holds a list of properties with the same name and type.
It is used by PropertyLib::PropertyList to store properties. Generally, PropertyLib::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
◆ MultiProperty() [1/3]
PropertyLib::MultiProperty::MultiProperty | ( | Property * | prop | ) |
Constructs multiproperty with one property which is not connected to a property list.
Definition at line 25 of file multiproperty.cpp.
◆ MultiProperty() [2/3]
PropertyLib::MultiProperty::MultiProperty | ( | PropertyList * | propertyList | ) |
Constructs empty multiproperty.
Definition at line 31 of file multiproperty.cpp.
◆ MultiProperty() [3/3]
PropertyLib::MultiProperty::MultiProperty | ( | PropertyList * | propertyList, |
Property * | prop | ||
) |
Constructs multiproperty with one Property in the list.
Definition at line 36 of file multiproperty.cpp.
Member Function Documentation
◆ addProperty() [1/2]
void PropertyLib::MultiProperty::addProperty | ( | Property * | prop | ) |
Adds property to the list.
Definition at line 186 of file multiproperty.cpp.
◆ addProperty() [2/2]
void PropertyLib::MultiProperty::addProperty | ( | MultiProperty * | prop | ) |
Adds all properties from the multiproperty prop.
Definition at line 216 of file multiproperty.cpp.
◆ description()
TQString PropertyLib::MultiProperty::description | ( | ) | const |
Returns the description of a property.
Definition at line 78 of file multiproperty.cpp.
◆ findValueDescription() [1/2]
TQVariant PropertyLib::MultiProperty::findValueDescription | ( | ) | const |
Finds string description for a value.
Definition at line 230 of file multiproperty.cpp.
◆ findValueDescription() [2/2]
TQVariant PropertyLib::MultiProperty::findValueDescription | ( | TQVariant | val | ) | const |
Finds string description for a value.
Definition at line 244 of file multiproperty.cpp.
◆ name()
TQString PropertyLib::MultiProperty::name | ( | ) | const |
Returns the name of a property.
Definition at line 46 of file multiproperty.cpp.
◆ operator==() [1/2]
bool PropertyLib::MultiProperty::operator== | ( | const MultiProperty & | prop | ) | const |
Compares two multiproperties.
Definition at line 200 of file multiproperty.cpp.
◆ operator==() [2/2]
bool PropertyLib::MultiProperty::operator== | ( | const Property & | prop | ) | const |
Compares multiproperty with property.
Definition at line 207 of file multiproperty.cpp.
◆ readOnly()
bool PropertyLib::MultiProperty::readOnly | ( | ) | const |
Returns the readonly attribute of a property.
Definition at line 96 of file multiproperty.cpp.
◆ removeProperty() [1/2]
void PropertyLib::MultiProperty::removeProperty | ( | Property * | prop | ) |
Removes property from the list.
Definition at line 191 of file multiproperty.cpp.
◆ removeProperty() [2/2]
void PropertyLib::MultiProperty::removeProperty | ( | MultiProperty * | prop | ) |
Removes all properties that exists in the multiproperty prop.
Definition at line 223 of file multiproperty.cpp.
◆ setDescription()
void PropertyLib::MultiProperty::setDescription | ( | const TQString & | description | ) |
Sets the description of a property.
Definition at line 139 of file multiproperty.cpp.
◆ setValue() [1/2]
void PropertyLib::MultiProperty::setValue | ( | const TQVariant & | value | ) |
Sets the value of a property.
Definition at line 154 of file multiproperty.cpp.
◆ setValue() [2/2]
void PropertyLib::MultiProperty::setValue | ( | const TQVariant & | value, |
bool | emitChange | ||
) |
Sets the value of a property.
- Parameters
-
value new value of thus multiproperty emitChange if set to true then property list which owns this multiproperty emits propertyValueChanged signal.
Definition at line 168 of file multiproperty.cpp.
◆ setValueList()
void PropertyLib::MultiProperty::setValueList | ( | const TQMap< TQString, TQVariant > & | valueList | ) |
Sets the list of possible values of a property.
Definition at line 179 of file multiproperty.cpp.
◆ type()
int PropertyLib::MultiProperty::type | ( | ) | const |
Returns the type of a property.
Definition at line 53 of file multiproperty.cpp.
◆ undo()
void PropertyLib::MultiProperty::undo | ( | ) |
Reverts the property value to previous setting.
Definition at line 262 of file multiproperty.cpp.
◆ valid()
bool PropertyLib::MultiProperty::valid | ( | ) | const |
Returns true if the multiproperty has no properties in the list (i.e.
it's invalid).
Definition at line 257 of file multiproperty.cpp.
◆ value()
TQVariant PropertyLib::MultiProperty::value | ( | ) | const |
Returns the value of a property.
Definition at line 60 of file multiproperty.cpp.
◆ valueList()
TQMap< TQString, TQVariant > PropertyLib::MultiProperty::valueList | ( | ) | const |
The string-to-value correspondence list of the property.
Definition at line 132 of file multiproperty.cpp.
◆ visible()
bool PropertyLib::MultiProperty::visible | ( | ) | const |
Returns the visibility attribute of a property.
Definition at line 114 of file multiproperty.cpp.
Member Data Documentation
◆ details
TQValueList<ChildProperty> PropertyLib::MultiProperty::details |
The list of child properties.
Definition at line 113 of file multiproperty.h.
The documentation for this class was generated from the following files: