#include <NumberParameter.h>


Public Types | |
| enum | InputMethod { IM_SpinBox = 0, IM_Slider, IM_SliderPlusSpinBox, IM_NumInputMethods } |
| Nested enumeration for the different input methods for editing number parameters. More... | |
Public Member Functions | |
| NumberParameter (const QString &name, Type type, const QVariant &value) | |
| Constructor of the NumberParameter class. | |
| NumberParameter (const NumberParameter ¶meter, Node *node=0) | |
| Copy constructor of the NumberParameter class. | |
| virtual | ~NumberParameter () |
| Destructor of the FilenameParameter class. | |
| virtual AbstractParameter * | clone () |
| Creates an exact copy of the parameter. | |
| virtual void | setDirty (bool dirty) |
| Sets whether the parameter's value has changed. | |
| void | setEnabled (bool enabled) |
| Sets whether the controls for editing the parameter or parameter group in the UI should be enabled. | |
| InputMethod | getInputMethod () const |
| Returns the desired input method of numeric values of the parameter. | |
| void | setInputMethod (InputMethod inputMethod) |
| Sets the desired input method of numeric values of the parameter. | |
| QVariant | getMinValue () const |
| Returns the lower limit for numeric values of the parameter. | |
| void | setMinValue (QVariant minValue) |
| Sets the lower limit for numeric values of the parameter. | |
| QVariant | getMaxValue () const |
| Returns the upper limit for numeric values of the parameter. | |
| float | getAbsMaxValue () const |
| Returns the absolute upper limit for numeric values of the parameter. | |
| void | setMaxValue (QVariant maxValue) |
| Sets the upper limit for numeric values of the parameter. | |
| QVariant | getStepSize () const |
| Returns the step size numeric values of the parameter. | |
| void | setStepSize (const QVariant &stepSize) |
| Sets the step size numeric values of the parameter. | |
| QString | getUnit () const |
| Returns the unit of the parameter. | |
| void | setUnit (const QString &unit) |
| Sets the unit for the parameter. | |
| void | setTime (const QVariant &timeValue) |
| Sets the current time for the parameter. | |
| void | setAnimated (const bool animated) |
| Sets the current animation flag for the parameter. | |
| void | calculateExtrema () |
| Calculate the limits for numeric values of the parameter. | |
| void | scaleValues (const float &scaleFactor) |
| Scales all values from the parameter. | |
| bool | isAnimated () const |
| Returns whether the parameter contains keys. | |
| void | addKey (Key *key) |
| Adds the given parameter to the given time in the list of keys. | |
| void | addKey (const int time) |
| Adds the actuel numberparameter value to the given time in the list of keys. | |
| void | addKey (const QVariant &value) |
| Adds the given parameter to the back of the list of keys. | |
| void | addKey (const float &value) |
| Adds the given parameter to the back of the list of keys. | |
| void | addKeyPresorted (Key *key) |
| Adds the given parameter to the given time in the list of keys, without sorting. | |
| void | setKeys (QList< float > *keys) |
| Sets the given list in the given steps in the list of keys. | |
| unsigned int | numKeys () const |
| Returns the number of keys in the list. | |
| bool | isEmpty () const |
| Returns whether the list of keys is empty. | |
| void | removeKey (const float time) |
| Removes the key at the given time. | |
| void | removeKey (const int index) |
| Removes the key at the given index. | |
| void | removeKeys (const float minTime, const float maxTime) |
| Removes the keys at the given range. | |
| void | removeKeys (const int minIndex, const int maxIndex) |
| Removes the keys at the given range. | |
| void | clearKeys () |
| Removes all keys. | |
| Key * | getKey (const float &time) |
| Returns the key at the given time. | |
| Key * | getKey (const unsigned int index) |
| Returns the key at the given index. | |
| QList< Key * > * | getKeys () |
| Returns a pointer to the list of keys. | |
| unsigned int | getKeysSize () const |
| Returns the size of the list of keys. | |
| QVariant | getKeyValueInterpol (const QVariant &time) |
| Returns the interpolated value of the key at the given time. | |
| QVariant | getKeyValuePos (const float time) |
| Returns the value of the key at the given time. | |
| QVariant | getKeyValueIndex (const unsigned int index) const |
| Returns the value of the key at the given index. | |
| QVariant | getValue (bool triggerEvaluation=false) |
| Returns the parameter's value while optionally triggering the evaluation chain. | |
Static Public Member Functions | |
| static InputMethod | decodeInputMethod (const QString &inputMethodString) |
| Decodes the given input method string to an input method value. | |
Protected Member Functions | |
| QList< Key * >::iterator | findIndex (const float &time) |
| Returns the sorted index from keylist by evaluating the time value. | |
| QList< Key * >::iterator | findIndex (const Key *key) |
| Returns the sorted index from keylist by evaluating the time value of the given key. | |
Static Protected Member Functions | |
| static bool | lessThan (const Key *k1, const Key *k2) |
| Less than definition Function for comparing unique icon Key *. | |
Private Attributes | |
| InputMethod | m_inputMethod |
| The input method for numeric values of the parameter. | |
| QVariant | m_minValue |
| The lower limit for numeric values of the parameter. | |
| QVariant | m_maxValue |
| The upper limit for numeric values of the parameter. | |
| QVariant | m_stepSize |
| The step size for numeric values of the parameter. | |
| QString | m_unit |
| The parameter's unit (an empty string if no unit has been set). | |
| QList< Key * > | m_keys |
| The list of keys for animating the parameter's numeric value. | |
| NumberParameter::NumberParameter | ( | const QString & | name, | |
| Type | type, | |||
| const QVariant & | value | |||
| ) |
Constructor of the NumberParameter class.
Constructors and Destructors.
| name | The name of the parameter. | |
| type | The type of the parameter's value(s). | |
| value | The parameter's value. | |
| animated | The parameter's animation status. |
| name | The name of the parameter. | |
| type | The type of the parameter's value(s). | |
| value | The parameter's value. | |
| animated | The parameter's animation status. |
| NumberParameter::NumberParameter | ( | const NumberParameter & | parameter, | |
| Node * | node = 0 | |||
| ) |
Copy constructor of the NumberParameter class.
| parameter | The parameter to copy. | |
| node | The parent node. |
| NumberParameter::~NumberParameter | ( | ) | [virtual] |
Destructor of the FilenameParameter class.
| NumberParameter::InputMethod NumberParameter::decodeInputMethod | ( | const QString & | inputMethodString | ) | [static] |
Decodes the given input method string to an input method value.
Public Static Functions.
| inputMethodString | The input method string to decode. |
| inputMethodString | The input method string to decode. |
| AbstractParameter * NumberParameter::clone | ( | ) | [virtual] |
Creates an exact copy of the parameter.
Public Functions.
Reimplemented from Parameter.
| void NumberParameter::setDirty | ( | bool | dirty | ) | [virtual] |
Sets whether the parameter's value has changed.
| dirty | The new value for the parameter's dirty flag. |
Reimplemented from Parameter.
| void NumberParameter::setEnabled | ( | bool | enabled | ) | [virtual] |
Sets whether the controls for editing the parameter or parameter group in the UI should be enabled.
| enabled | The value for the parameter's enabled flag. |
Reimplemented from Parameter.
| NumberParameter::InputMethod NumberParameter::getInputMethod | ( | ) | const |
Returns the desired input method of numeric values of the parameter.
Returns the desired input method of numeric values of the parameter, e.g. Slider, etc.
| void NumberParameter::setInputMethod | ( | NumberParameter::InputMethod | inputMethod | ) |
Sets the desired input method of numeric values of the parameter.
Sets the desired input method of numeric values of the parameter, e.g. Slider, etc.
| inputMethod | The input method for numeric values of the parameter. | |
| stepSize | The input method for numeric values of the parameter. |
| QVariant NumberParameter::getMinValue | ( | ) | const |
Returns the lower limit for numeric values of the parameter.
| void NumberParameter::setMinValue | ( | QVariant | minValue | ) |
Sets the lower limit for numeric values of the parameter.
| minValue | The lower limit for numeric values of the parameter. |
| QVariant NumberParameter::getMaxValue | ( | ) | const |
Returns the upper limit for numeric values of the parameter.
| float NumberParameter::getAbsMaxValue | ( | ) | const |
Returns the absolute upper limit for numeric values of the parameter.
| void NumberParameter::setMaxValue | ( | QVariant | maxValue | ) |
Sets the upper limit for numeric values of the parameter.
| maxValue | The upper limit for numeric values of the parameter. |
| QVariant NumberParameter::getStepSize | ( | ) | const |
Returns the step size numeric values of the parameter.
| void NumberParameter::setStepSize | ( | const QVariant & | stepSize | ) |
Sets the step size numeric values of the parameter.
| stepSize | The step size for numeric values of the parameter. |
| QString NumberParameter::getUnit | ( | ) | const |
Returns the unit of the parameter.
The unit of the parameter.
| void NumberParameter::setUnit | ( | const QString & | unit | ) |
Sets the unit for the parameter.
| unit | The unit for the parameter. |
| void NumberParameter::setTime | ( | const QVariant & | timeValue | ) |
Sets the current time for the parameter.
| timeValue | The current time for the parameter. |
| void NumberParameter::setAnimated | ( | const bool | animated | ) |
Sets the current animation flag for the parameter.
| animated | The new animation flag status. |
| void NumberParameter::calculateExtrema | ( | ) |
Calculate the limits for numeric values of the parameter.
| void NumberParameter::scaleValues | ( | const float & | scaleFactor | ) |
Scales all values from the parameter.
| The | scale factor. |
| bool NumberParameter::isAnimated | ( | ) | const |
Returns whether the parameter contains keys.
Public Animation Functions.
| void NumberParameter::addKey | ( | Key * | key | ) |
Adds the given parameter to the given time in the list of keys.
| key | The key to add to the list. | |
| key | The key to add to the list |
| void NumberParameter::addKey | ( | const int | time | ) |
Adds the actuel numberparameter value to the given time in the list of keys.
| time | The time index to add the value to the list. |
| void NumberParameter::addKey | ( | const QVariant & | value | ) |
Adds the given parameter to the back of the list of keys.
| value | The value to add to the list. | |
| value | The value to add to the list |
| void NumberParameter::addKey | ( | const float & | value | ) |
Adds the given parameter to the back of the list of keys.
| value | The value to add to the list |
| void NumberParameter::addKeyPresorted | ( | Key * | key | ) |
Adds the given parameter to the given time in the list of keys, without sorting.
| key | The key to add to the list |
| void NumberParameter::setKeys | ( | QList< float > * | keys | ) |
Sets the given list in the given steps in the list of keys.
Sets the given List in the given steps in the list of keys.
| keys | The value list to add to the key list. | |
| key | The value list to add to the key list |
| unsigned int NumberParameter::numKeys | ( | ) | const |
Returns the number of keys in the list.
Returns the number of keys in list.
The number of keys.
| bool NumberParameter::isEmpty | ( | ) | const |
Returns whether the list of keys is empty.
Check for empty list.
True if list is empty.
| void NumberParameter::removeKey | ( | const float | time | ) |
Removes the key at the given time.
| time | The time of the key to remove. | |
| time | The time for the key to remove. |
| void NumberParameter::removeKey | ( | const int | index | ) |
Removes the key at the given index.
| index | The index for the key to remove. |
| void NumberParameter::removeKeys | ( | const float | minTime, | |
| const float | maxTime | |||
| ) |
Removes the keys at the given range.
| minTime | The start time for the keys to remove. | |
| maxTime | The end time for the keys to remove. |
| void NumberParameter::removeKeys | ( | const int | minIndex, | |
| const int | maxIndex | |||
| ) |
Removes the keys at the given range.
| minIndex | The start time for the keys to remove. | |
| maxIndex | The end time for the keys to remove. |
| void NumberParameter::clearKeys | ( | ) |
Removes all keys.
| Key * NumberParameter::getKey | ( | const float & | time | ) |
Returns the key at the given time.
| time | The time to the key. |
| Key * NumberParameter::getKey | ( | const unsigned int | index | ) |
Returns the key at the given index.
| index | The index to the Key. |
| QList< Key * > * NumberParameter::getKeys | ( | ) |
Returns a pointer to the list of keys.
| unsigned int NumberParameter::getKeysSize | ( | ) | const |
Returns the size of the list of keys.
| QVariant NumberParameter::getKeyValueInterpol | ( | const QVariant & | time | ) | [inline] |
Returns the interpolated value of the key at the given time.
| time | The time of the key. |
| QVariant NumberParameter::getKeyValuePos | ( | const float | time | ) |
Returns the value of the key at the given time.
| time | The time to the Key. |
| time | The time of the key. |
| QVariant NumberParameter::getKeyValueIndex | ( | const unsigned int | index | ) | const |
Returns the value of the key at the given index.
| index | The index to the Key. |
| QVariant NumberParameter::getValue | ( | bool | triggerEvaluation = false |
) | [virtual] |
Returns the parameter's value while optionally triggering the evaluation chain.
| triggerEvaluation | Flag to control whether to trigger the evaluation chain. |
| Trigger | evaluation. | |
| triggerEvaluation | Flag to control whether to trigger the evaluation chain. |
Reimplemented from Parameter.
| QList< Key * >::iterator NumberParameter::findIndex | ( | const float & | pos | ) | [inline, protected] |
Returns the sorted index from keylist by evaluating the time value.
Protected Functions.
| time | The time of the Key. |
pos The time of the Key.
Less than definition Function for comparing unique icon Key *.
Protected Helper Functions.
| k1 | The first key for comparison. | |
| k2 | The second key for comparison. |
k1 The first key for comparison. k2 The second key for comparison.
InputMethod NumberParameter::m_inputMethod [private] |
The input method for numeric values of the parameter.
QVariant NumberParameter::m_minValue [private] |
The lower limit for numeric values of the parameter.
QVariant NumberParameter::m_maxValue [private] |
The upper limit for numeric values of the parameter.
QVariant NumberParameter::m_stepSize [private] |
The step size for numeric values of the parameter.
QString NumberParameter::m_unit [private] |
The parameter's unit (an empty string if no unit has been set).
QList<Key *> NumberParameter::m_keys [private] |
The list of keys for animating the parameter's numeric value.
1.5.9