comparison base/View.h @ 94:5b8392e80ed6

* Add property labels to property containers (so i18n() won't affect file format)
author Chris Cannam
date Wed, 03 May 2006 16:48:03 +0000
parents c983dda79f72
children c30728d5625c
comparison
equal deleted inserted replaced
93:27d726916ab3 94:5b8392e80ed6
202 // We implement the PropertyContainer API, although we don't 202 // We implement the PropertyContainer API, although we don't
203 // actually subclass PropertyContainer. We have our own 203 // actually subclass PropertyContainer. We have our own
204 // PropertyContainer that we can return on request that just 204 // PropertyContainer that we can return on request that just
205 // delegates back to us. 205 // delegates back to us.
206 virtual PropertyContainer::PropertyList getProperties() const; 206 virtual PropertyContainer::PropertyList getProperties() const;
207 virtual QString getPropertyLabel(const PropertyName &) const;
207 virtual PropertyContainer::PropertyType getPropertyType(const PropertyName &) const; 208 virtual PropertyContainer::PropertyType getPropertyType(const PropertyName &) const;
208 virtual int getPropertyRangeAndValue(const PropertyName &, 209 virtual int getPropertyRangeAndValue(const PropertyName &,
209 int *min, int *max) const; 210 int *min, int *max) const;
210 virtual QString getPropertyValueLabel(const PropertyName &, 211 virtual QString getPropertyValueLabel(const PropertyName &,
211 int value) const; 212 int value) const;
326 Q_OBJECT 327 Q_OBJECT
327 328
328 public: 329 public:
329 ViewPropertyContainer(View *v); 330 ViewPropertyContainer(View *v);
330 PropertyList getProperties() const { return m_v->getProperties(); } 331 PropertyList getProperties() const { return m_v->getProperties(); }
332 QString getPropertyLabel(const PropertyName &n) const {
333 return m_v->getPropertyLabel(n);
334 }
331 PropertyType getPropertyType(const PropertyName &n) const { 335 PropertyType getPropertyType(const PropertyName &n) const {
332 return m_v->getPropertyType(n); 336 return m_v->getPropertyType(n);
333 } 337 }
334 int getPropertyRangeAndValue(const PropertyName &n, int *min, int *max) const { 338 int getPropertyRangeAndValue(const PropertyName &n, int *min, int *max) const {
335 return m_v->getPropertyRangeAndValue(n, min, max); 339 return m_v->getPropertyRangeAndValue(n, min, max);