35 #ifndef NUMBERPARAMETER_H
36 #define NUMBERPARAMETER_H
72 static InputMethod decodeInputMethod (
const QString &inputMethodString );
84 NumberParameter (
const QString &name, Type type,
const QVariant &value );
113 virtual void setDirty (
bool dirty );
121 virtual void setEnabled (
bool enabled,
bool propagate );
128 InputMethod getInputMethod ()
const;
135 void setInputMethod ( InputMethod inputMethod );
142 QVariant getMinValue ()
const;
149 void setMinValue (
const QVariant &minValue );
156 QVariant getMaxValue ()
const;
163 float getAbsMaxValue ()
const;
170 void setMaxValue (
const QVariant &maxValue );
177 QVariant getStepSize ()
const;
184 void setStepSize (
const QVariant &stepSize );
191 QString getUnit ()
const;
198 void setUnitScale (
const float scale );
205 float getUnitScale ( )
const;
212 void setUnit (
const QString &unit );
219 void setTime (
const QVariant &timeValue );
224 void calculateExtrema ();
231 void scaleValues(
const float &scaleFactor);
240 bool isAnimated ()
const;
247 void addKey (
Key *key );
254 void addKey (
const int &time );
261 void addKey (
const QVariant &value );
268 void addKey (
const float &value );
275 void addKeyPresorted (
Key *key );
282 void setKeys (
const QList<float> *keys );
289 unsigned int numKeys ()
const;
296 bool isEmpty ()
const;
303 void removeKey (
const float &time );
310 void removeKey (
const int &index );
318 void removeKeys (
const float &minTime,
const float &maxTime );
326 void removeKeys (
const int &minIndex,
const int &maxIndex );
339 Key * getKey (
const float &time );
347 Key * getKey (
const unsigned int &index );
354 QList<Key *> * getKeys ();
361 unsigned int getKeysSize ()
const;
369 inline QVariant getKeyValueInterpol (
const QVariant &time );
377 QVariant getKeyValuePos (
const float &time );
385 QVariant getKeyValueIndex (
const unsigned int &index )
const;
394 QVariant getValue (
bool triggerEvaluation =
false ) ;
406 inline QList<Key *>::iterator findIndex (
const float &time );
414 inline QList<Key *>::iterator findIndex (
const Key *key );
425 static inline bool lessThan (
const Key *k1,
const Key *k2 );