32 :m_propertyList(propertyList)
37 :m_propertyList(propertyList)
42MultiProperty::~MultiProperty()
48 if (list.count() >= 1)
49 return list.getFirst()->name();
55 if (list.count() >= 1)
56 return list.getFirst()->type();
57 return TQVariant::Invalid;
63 if (list.count() >= 1)
64 value = list.getFirst()->value();
66 TQPtrListIterator<Property> it(list);
68 while ((property = it.current()) != 0)
71 return TQVariant::Invalid;
81 if (list.count() >= 1)
84 TQPtrListIterator<Property> it(list);
86 while ((property = it.current()) != 0)
99 if (list.count() >= 1)
100 v = list.getFirst()->readOnly();
102 TQPtrListIterator<Property> it(list);
104 while ((property = it.current()) != 0)
117 if (list.count() >= 1)
118 v = list.getFirst()->readOnly();
120 TQPtrListIterator<Property> it(list);
122 while ((property = it.current()) != 0)
134 if (list.count() >= 1)
135 return list.getFirst()->valueList;
136 return TQStringVariantMap();
142 for (property = list.first(); property;
property = list.next())
157 for (property = list.first(); property;
property = list.next())
171 for (property = list.first(); property;
property = list.next())
174 if (emitChange && m_propertyList)
182 for (property = list.first(); property;
property = list.next())
219 for (property = prop->list.first(); property;
property = prop->list.next())
226 for (property = prop->list.first(); property;
property = prop->list.next())
232 TQVariant val =
value();
236 for (TQStringVariantMap::const_iterator it = vl.begin(); it != vl.end(); ++ it)
238 if (it.data() == val)
249 for (TQStringVariantMap::const_iterator it = vl.begin(); it != vl.end(); ++ it)
251 if (it.data() == val)
259 return list.count() != 0;
265 for (property = list.first(); property;
property = list.next())
Holds a list of properties with the same name and type.
bool operator==(const MultiProperty &prop) const
Compares two multiproperties.
int type() const
Returns the type of a property.
void setValue(const TQVariant &value)
Sets the value of a property.
MultiProperty(Property *prop)
Constructs multiproperty with one property which is not connected to a property list.
TQStringVariantMap valueList() const
The string-to-value correspondence list of the property.
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.
TQString description() const
Returns the description of a property.
TQString name() const
Returns the name of a property.
void setDescription(const TQString &description)
Sets the description of a property.
bool visible() const
Returns the visibility attribute of a property.
void setValueList(const TQMap< TQString, TQVariant > &valueList)
Sets the list of possible values of a property.
void addProperty(Property *prop)
Adds property to the list.
bool readOnly() const
Returns the readonly attribute of a property.
TQVariant findValueDescription() const
Finds string description for a value.
void removeProperty(Property *prop)
Removes property from the list.
TQVariant value() const
Returns the value of a property.
void propertyValueChanged(Property *property)
Emitted when the value of the property is changed.
virtual bool readOnly() const
Tells if the property is read only.
virtual bool visible() const
Tells if the property is visible.
virtual TQString name() const
virtual TQString description() const
virtual void setValue(const TQVariant &value, bool rememberOldValue=true)
Sets the value of the property.
virtual void setDescription(const TQString &description)
Sets the description of the property.
virtual TQVariant oldValue() const
Gets the previous property value.
virtual TQVariant value() const
virtual void setValueList(const TQStringVariantMap &list)
Sets the string-to-value correspondence list of the property.
@ ValueFromList
string value from a list
Contains PropertyLib::MultiProperty class.
Namespace which contain property editing classes.
Contains PropertyLib::PropertyList class.