32 :m_propertyList(propertyList)
37 :m_propertyList(propertyList)
42 MultiProperty::~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)
82 description = list.getFirst()->description();
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 TQMap<TQString, TQVariant>();
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();
235 TQMap<TQString, TQVariant> vl =
valueList();
236 for (TQMap<TQString, TQVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it)
238 if (it.data() == val)
248 TQMap<TQString, TQVariant> vl =
valueList();
249 for (TQMap<TQString, TQVariant>::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())
virtual TQString description() const
void undo()
Reverts the property value to previous setting.
bool readOnly() const
Returns the readonly attribute of a property.
Namespace which contain property editing classes.
void setValueList(const TQMap< TQString, TQVariant > &valueList)
Sets the list of possible values of a property.
bool operator==(const MultiProperty &prop) const
Compares two multiproperties.
bool valid() const
Returns true if the multiproperty has no properties in the list (i.e.
TQMap< TQString, TQVariant > valueList() const
The string-to-value correspondence list of the property.
int type() const
Returns the type of a property.
virtual TQVariant oldValue() const
Gets the previous property value.
Contains PropertyLib::MultiProperty class.
virtual void setValueList(const TQMap< TQString, TQVariant > &list)
Sets the string-to-value correspondence list of the property.
void setDescription(const TQString &description)
Sets the description of a property.
virtual bool readOnly() const
Tells if the property is read only.
Contains PropertyLib::PropertyList class.
TQVariant value() const
Returns the value of a property.
TQString name() const
Returns the name of a property.
bool visible() const
Returns the visibility attribute of a property.
virtual TQVariant value() const
void removeProperty(Property *prop)
Removes property from the list.
TQString description() const
Returns the description of a property.
void propertyValueChanged(Property *property)
Emitted when the value of the property is changed.
void setValue(const TQVariant &value)
Sets the value of a property.
virtual bool visible() const
Tells if the property is visible.
virtual TQString name() const
void addProperty(Property *prop)
Adds property to the list.
TQVariant findValueDescription() const
Finds string description for a value.
Holds a list of properties with the same name and type.
virtual void setDescription(const TQString &description)
Sets the description of the property.
MultiProperty(Property *prop)
Constructs multiproperty with one property which is not connected to a property list.
virtual void setValue(const TQVariant &value, bool rememberOldValue=true)
Sets the value of the property.