comparison base/PropertyContainer.h @ 387:7aa1de571880

* juggle some files around in order to free audioio, base, and system libraries from dependency on QtGui
author Chris Cannam
date Wed, 12 Mar 2008 17:42:56 +0000
parents 516819f2b97b
children 57857a57a03a
comparison
equal deleted inserted replaced
386:e6d11871e4c9 387:7aa1de571880
116 * global ColourDatabase. 116 * global ColourDatabase.
117 */ 117 */
118 virtual void setProperty(const PropertyName &, int value); 118 virtual void setProperty(const PropertyName &, int value);
119 119
120 /** 120 /**
121 * Set a property using a command, supporting undo and redo. 121 * Obtain a command that sets the given property, which can be
122 * The default implementation should work for most subclasses. 122 * added to the command history for undo/redo. Returns NULL
123 * if the property is already set to the given value.
123 */ 124 */
124 virtual void setPropertyWithCommand(const PropertyName &, int value); 125 virtual Command *getSetPropertyCommand(const PropertyName &, int value);
125 126
126 /** 127 /**
127 * Set a property using a fuzzy match. Compare nameString with 128 * Set a property using a fuzzy match. Compare nameString with
128 * the property labels and underlying names, and if it matches one 129 * the property labels and underlying names, and if it matches one
129 * (with preference given to labels), try to convert valueString 130 * (with preference given to labels), try to convert valueString
139 * The default implementation should work for most subclasses. 140 * The default implementation should work for most subclasses.
140 */ 141 */
141 virtual void setProperty(QString nameString, QString valueString); 142 virtual void setProperty(QString nameString, QString valueString);
142 143
143 /** 144 /**
144 * As above, but using a command. 145 * As above, but returning a command.
145 */ 146 */
146 virtual void setPropertyWithCommand(QString nameString, QString valueString); 147 virtual Command *getSetPropertyCommand(QString nameString, QString valueString);
147 148
148 protected: 149 protected:
149 150
150 class SetPropertyCommand : public Command 151 class SetPropertyCommand : public Command
151 { 152 {