comparison base/PropertyContainer.h @ 277:3b8008d09541

* Add a colour database, and Add New Colour function to the colour combo in property box. The colour property is only correctly handled in the waveform layer so far. * Add en_GB translation, to translate those annoying Color texts in the Qt colour picker dialog.
author Chris Cannam
date Wed, 11 Jul 2007 17:21:37 +0000
parents 4cd620bd4c61
children 516819f2b97b
comparison
equal deleted inserted replaced
276:657825878970 277:3b8008d09541
37 37
38 enum PropertyType { 38 enum PropertyType {
39 ToggleProperty, // on or off 39 ToggleProperty, // on or off
40 RangeProperty, // range of integers 40 RangeProperty, // range of integers
41 ValueProperty, // range of integers given string labels 41 ValueProperty, // range of integers given string labels
42 ColourProperty, // colours, get/set as qRgb 42 ColourProperty, // colours, get/set as ColourDatabase indices
43 UnitsProperty, // unit from UnitDatabase, get/set unit id 43 UnitsProperty, // unit from UnitDatabase, get/set unit id
44 InvalidProperty, // property not found! 44 InvalidProperty, // property not found!
45 }; 45 };
46 46
47 /** 47 /**
105 105
106 public slots: 106 public slots:
107 /** 107 /**
108 * Set a property. This is used for all property types. For 108 * Set a property. This is used for all property types. For
109 * boolean properties, zero is false and non-zero true; for 109 * boolean properties, zero is false and non-zero true; for
110 * colours, the integer value should be treated as a qRgb. 110 * colours, the integer value is an index into the colours in the
111 * global ColourDatabase.
111 */ 112 */
112 virtual void setProperty(const PropertyName &, int value); 113 virtual void setProperty(const PropertyName &, int value);
113 114
114 /** 115 /**
115 * Set a property using a command, supporting undo and redo. 116 * Set a property using a command, supporting undo and redo.