Frapper  1.0a
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
Frapper::NumberParameter Class Reference

Class representing parameters for numeric values. More...

#include <NumberParameter.h>

Inheritance diagram for Frapper::NumberParameter:
Inheritance graph
[legend]
Collaboration diagram for Frapper::NumberParameter:
Collaboration graph
[legend]

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 Types inherited from Frapper::Parameter
enum  Type {
  T_Unknown = -1, T_Bool, T_Int, T_UnsignedInt,
  T_Float, T_String, T_Filename, T_Color,
  T_Enumeration, T_TextInfo, T_Command, T_Geometry,
  T_Light, T_Camera, T_Image, T_Group,
  T_PlugIn, T_Generic, T_NumTypes
}
 Nested enumeration for the different types of parameters. More...
 
enum  Multiplicity { M_Invalid = -1, M_OneOrMore }
 Nested enumeration for special types of multiplicity. More...
 
enum  PinType { PT_None = -1, PT_Input, PT_Output }
 Nested enumeration for the different types of pins to represent parameters. More...
 
typedef unsigned int Size
 Type definition for the size of a parameter, specifying how many values of the given type the parameter can store.
 
- Public Types inherited from Frapper::AbstractParameter
typedef QHash< QString,
AbstractParameter * > 
Map
 Type definition for a map of parameters and parameter groups.
 
typedef QList
< AbstractParameter * > 
List
 Type definition for a list of parameters and parameter groups.
 

Public Member Functions

 NumberParameter (const QString &name, Type type, const QVariant &value)
 Constructor of the NumberParameter class.
 
 NumberParameter (const NumberParameter &parameter, Node *node=0)
 Copy constructor of the NumberParameter class.
 
virtual ~NumberParameter ()
 Destructor of the FilenameParameter class.
 
virtual AbstractParameterclone ()
 Creates an exact copy of the parameter.
 
virtual void setDirty (bool dirty)
 Sets whether the parameter's value has changed.
 
virtual void setEnabled (bool enabled, bool propagate)
 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 (const 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 (const 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 setUnitScale (const float scale)
 Sets the unit scale for the parameter.
 
float getUnitScale () const
 Returns the unit scale for 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 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 (const 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.
 
KeygetKey (const float &time)
 Returns the key at the given time.
 
KeygetKey (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.
 
- Public Member Functions inherited from Frapper::Parameter
 Parameter (const QString &name, Type type, const QVariant &value)
 Constructor of the Parameter class.
 
 Parameter (const Parameter &parameter)
 Copy constructor of the Parameter class.
 
virtual ~Parameter ()
 Destructor of the Parameter class.
 
virtual bool isGroup () const
 Returns whether the parameter object derived from this class is a parameter group.
 
Type getType () const
 Returns the parameter's type.
 
Size getSize () const
 Returns the parameter's size specifying how many values of the given type it stores.
 
void setSize (Size size)
 Sets the parameter's size specifying how many values of the given type it stores.
 
int getMultiplicity () const
 Returns the parameter's multiplicity specifying how many parameters of the given type can be connected to it.
 
void setMultiplicity (int multiplicity)
 Sets the parameter's multiplicity specifying how many parameters of the given type can be connected to it.
 
int getNumberOfConnections () const
 Returns the parameter's number of connections.
 
virtual const QVariantList & getValueList () const
 Returns the parameter's value list. Which contains the values of all connected parameters.
 
void setValue (const QVariant &value, bool triggerDirtying=false)
 Sets the parameter's value to the given value.
 
void setValue (int index, const QVariant &value, bool triggerDirtying=false)
 Sets the parameter's value with the given index to the given value.
 
bool hasDefaultValue () const
 Returns whether the parameter's current value is the default value.
 
void setDefaultValue (const QVariant &defaultValue)
 Sets the parameter's default value to the given value.
 
virtual void reset ()
 Resets the parameter to its default value.
 
List getAffectedParameters () const
 Returns the list of parameters that are affected when the value of this parameter is changed.
 
void addAffectedParameter (Parameter *affectedParameter)
 Adds a parameter to the list of parameters that are affected when the value of this parameter is changed.
 
void removeAffectedParameter (Parameter *affectedParameter)
 Removes a parameter from the list of parameters that are affected when the value of this parameter is changed.
 
List getAffectingParameters () const
 Returns the list of parameters that affect this parameter when their value is changed.
 
void addAffectingParameter (Parameter *affectingParameter)
 Adds a parameter to the list of parameters that are affected when the value of this parameter is changed.
 
void removeAffectingParameter (Parameter *affectingParameter)
 Removes a parameter from the list of parameters that are affected when the value of this parameter is changed.
 
QString getDescription () const
 Returns the description of the parameter.
 
void setDescription (const QString &description)
 Sets the description for the parameter.
 
PinType getPinType () const
 Returns the type of pin that should be created to represent the parameter.
 
void setPinType (PinType pinType)
 Sets the type of pin that should be created to represent the parameter.
 
Connection::Map getConnectionMap () const
 Returns all connections currently connected to this parameter.
 
void addConnection (Connection *connection)
 Adds the given connection to the list of connections.
 
void removeConnection (Connection::ID id)
 Removes the given connection from the list of connections.
 
bool isConnected () const
 Returns whether the parameter is connected to at least one other parameter.
 
ParametergetConnectedParameter () const
 Returns the first parameter connected to this parameter.
 
bool isDirty ()
 Returns whether the parameter's value has changed.
 
bool isAuxDirty ()
 Returns the auxiliary dirty flag.
 
virtual void setAuxDirty (bool dirty)
 Sets the auxiliary dirty flag.
 
bool isVisible () const
 Returns the visibility for this parameter.
 
void setVisible (bool visible)
 Sets the visibility for this parameter.
 
bool isReadOnly () const
 Returns whether the parameter can not be modified using a control in the UI.
 
void setReadOnly (bool readOnly)
 Sets whether the parameter can not be modified using a control in the UI.
 
void setSelfEvaluating (bool selfEvaluating)
 Sets whether the parameter is self-evaluating.
 
bool isSelfEvaluating () const
 Returns wether the parameter is self-evaluating.
 
void propagateDirty (bool setFirstTrue=true)
 Sets the dirty flag for all parameters that are connected with and affected by this parameter.
 
void propagateAuxDirty ()
 Sets the aux dirty flag for all parameters that are affecting this parameter..
 
void propagateEvaluation ()
 Propagates the evaluation of nodes.
 
void setChangeFunction (const char *changeFunction)
 Sets the function to call when the parameter's value changes.
 
void setProcessingFunction (const char *processingFunction)
 Sets the function to use for computing the parameter's value.
 
void setAuxProcessingFunction (const char *processingFunction)
 Sets the function to use for computing auxiliary value dependant things.
 
void setCommandFunction (const char *commandFunction)
 Sets the function to use for executing the command represented by the parameter.
 
void setOnConnectFunction (const char *onConnectFunction)
 Sets the function which should be called on parameter's connection.
 
void setOnDisconnectFunction (const char *onDisconnectFunction)
 Sets the function which should be called on parameter's disconnection.
 
void executeCommand ()
 Emits the commandExecutionRequested signal to notify connected objects that the command represented by the parameter should be executed.
 
QString getValueString ()
 Returns the parameter's value as a character string.
 
- Public Member Functions inherited from Frapper::AbstractParameter
 AbstractParameter (const QString &name)
 Constructor of the AbstractParameter class.
 
 AbstractParameter (const AbstractParameter &parameter)
 Copy constructor of the AbstractParameter class.
 
virtual ~AbstractParameter ()
 Destructor of the AbstractParameter class.
 
QString getName () const
 Returns the name of the parameter or parameter group.
 
bool isEnabled () const
 Returns whether the controls for editing the parameter or parameter group in the UI should be enabled.
 
virtual void setName (const QString &name)
 Sets name of the parameter.
 
NodegetNode () const
 Returns the node to which this parameter or parameter group belongs.
 
virtual void setNode (Node *node)
 Sets the node to which this parameter or parameter group belongs.
 

Static Public Member Functions

static InputMethod decodeInputMethod (const QString &inputMethodString)
 Decodes the given input method string to an input method value.
 
- Static Public Member Functions inherited from Frapper::Parameter
static QString getTypeName (Type type)
 Returns the name of the given parameter type.
 
static QColor getTypeColor (Type type)
 Returns the color of the given parameter type.
 
static Type getTypeByName (const QString &typeName)
 Returns the parameter type corresponding to the given name.
 
static QVariant getDefaultValue (Type type)
 Returns the default value for parameters of the given type.
 
static QColor decodeIntColor (const QString &color)
 Converts the given string to a color value. The string should contain comma-separated integer values for the red, green and blue channels respectively.
 
static QColor decodeDoubleColor (const QString &color)
 Converts the given string to a color value. The string should contain comma-separated double-precision floating point values for the red, green and blue channels respectively.
 
static Size decodeSize (const QString &size)
 Converts the given string to a size value.
 
static int decodeMultiplicity (const QString &multiplicity)
 Converts the given string to a multiplicity value.
 
static PinType decodePinType (const QString &pinTypeString)
 Converts the given string to a pin type value.
 
static Parametercreate (const QString &name, Type type, QVariant defaultValue=QVariant())
 Creates a parameter with the given name and type.
 
static Parametercreate (const QDomElement &element)
 Creates a parameter from the given XML element.
 
static Parameterclone (const Parameter &parameter)
 Creates a copy of the given parameter.
 
static QString extractFirstGroupName (QString *path)
 Extracts the name of first group found in the given parameter path.
 
static ParametercreateImageParameter (const QString &name, Ogre::TexturePtr texturePointer=Ogre::TexturePtr(0))
 Creates an image parameter with the given name.
 
static ParametercreateGroupParameter (const QString &name, ParameterGroup *parameterGroup=0)
 Creates a group parameter with the given name.
 

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.
 
float m_unitScale
 The unit scale of the numeric values.
 

Additional Inherited Members

- Signals inherited from Frapper::Parameter
void dirtied ()
 Signal that is emitted when the value of the parameter becomes dirty.
 
void valueChanged ()
 Signal that is emitted when the parameter's value has changed.
 
void valueChanged (int index)
 Signal that is emitted when the parameter's value with the given index has changed.
 
void processingRequested ()
 Signal that is emitted when the value of the parameter should be processed.
 
void auxProcessingRequested ()
 Signal that is emitted when auxiliary changes in combination with the value happen.
 
void commandExecutionRequested ()
 Signal that is emitted when a command parameter is triggered.
 
void connectionEstablished ()
 Signal that is emitted when a connection is established.
 
void connectionDestroyed ()
 Signal that is emitted when a connection is destroyed.
 
- Static Public Attributes inherited from Frapper::Parameter
static const QString PathSeparator = " > "
 The string that separates parts in parameter paths.
 
static const QString EnumerationSeparator = "---"
 The string that identifies enumeration separators.
 
- Protected Attributes inherited from Frapper::Parameter
QMutex m_mutex
 Mutex for threaded programming.
 
QStringList m_mutexList
 
Type m_type
 The type of the parameter's value.
 
int m_size
 The parameter's size specifying how many values of the given type it stores.
 
int m_multiplicity
 The parameter's multiplicity specifying how many parameters of the given type can be connected to it.
 
QVariant m_defaultValue
 The parameter's default value.
 
QVariant m_value
 The parameter's value.
 
QVariantList m_valueList
 The parameter's value.
 
QString m_description
 A description of the parameter.
 
PinType m_pinType
 The type of pin that should be created to represent the parameter.
 
Connection::Map m_connectionMap
 The map of connections that are connected to this connector with connection IDs as keys.
 
List m_affectedParameters
 A list of parameter names that are affected when the value of this parameter is changed.
 
List m_affectingParameters
 A list of parameter names that affect this parameter.
 
bool m_dirty
 Flag that states whether the parameter's value has changed.
 
bool m_auxDirty
 Auxiliary dirty flag.
 
bool m_visible
 Flag that states whether the parameter's should be visible in e.g. ParameterPanel or not.
 
bool m_readOnly
 Flag that states whether the parameter's value can not be changed using an input control in the UI.
 
bool m_selfEvaluating
 Flag that states whether the parameter is self-evaluating.
 

Detailed Description

Class representing parameters for numeric values.

Member Enumeration Documentation

Nested enumeration for the different input methods for editing number parameters.

Enumerator:
IM_SpinBox 
IM_Slider 
IM_SliderPlusSpinBox 
IM_NumInputMethods 

Constructor & Destructor Documentation

Frapper::NumberParameter::NumberParameter ( const QString &  name,
Type  type,
const QVariant &  value 
)

Constructor of the NumberParameter class.

Constructors and Destructors.

Parameters
nameThe name of the parameter.
typeThe type of the parameter's value(s).
valueThe parameter's value.
animatedThe parameter's animation status.

Constructor of the FilenameParameter class.

Parameters
nameThe name of the parameter.
typeThe type of the parameter's value(s).
valueThe parameter's value.
animatedThe parameter's animation status.
Frapper::NumberParameter::NumberParameter ( const NumberParameter parameter,
Node node = 0 
)

Copy constructor of the NumberParameter class.

Parameters
parameterThe parameter to copy.
nodeThe parent node.
Frapper::NumberParameter::~NumberParameter ( )
virtual

Destructor of the FilenameParameter class.

Member Function Documentation

NumberParameter::InputMethod Frapper::NumberParameter::decodeInputMethod ( const QString &  inputMethodString)
static

Decodes the given input method string to an input method value.

Public Static Functions.

Parameters
inputMethodStringThe input method string to decode.
Returns
An input method corresponding to the given input method string.

Decodes the given input method string to an input method value.

Parameters
inputMethodStringThe input method string to decode.
Returns
An input method corresponding to the given input method string.
AbstractParameter * Frapper::NumberParameter::clone ( )
virtual

Creates an exact copy of the parameter.

Public Functions.

Returns
An exact copy of the parameter.

Creates an exact copy of the parameter.

Returns
An exact copy of the parameter.

Reimplemented from Frapper::Parameter.

void Frapper::NumberParameter::setDirty ( bool  dirty)
virtual

Sets whether the parameter's value has changed.

Parameters
dirtyThe new value for the parameter's dirty flag.

Reimplemented from Frapper::Parameter.

void Frapper::NumberParameter::setEnabled ( bool  enabled,
bool  propagate 
)
virtual

Sets whether the controls for editing the parameter or parameter group in the UI should be enabled.

Parameters
enabledThe value for the parameter's enabled flag.

Reimplemented from Frapper::AbstractParameter.

NumberParameter::InputMethod Frapper::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.

Returns
The input method for numeric values of the parameter.
void Frapper::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.

Parameters
inputMethodThe input method for numeric values of the parameter.
stepSizeThe input method for numeric values of the parameter.
QVariant Frapper::NumberParameter::getMinValue ( ) const

Returns the lower limit for numeric values of the parameter.

Returns
The lower limit for numeric values of the parameter.
void Frapper::NumberParameter::setMinValue ( const QVariant &  minValue)

Sets the lower limit for numeric values of the parameter.

Parameters
minValueThe lower limit for numeric values of the parameter.
QVariant Frapper::NumberParameter::getMaxValue ( ) const

Returns the upper limit for numeric values of the parameter.

Returns
The upper limit for numeric values of the parameter.
float Frapper::NumberParameter::getAbsMaxValue ( ) const

Returns the absolute upper limit for numeric values of the parameter.

Returns
The absolute upper limit for numeric values of the parameter.
void Frapper::NumberParameter::setMaxValue ( const QVariant &  maxValue)

Sets the upper limit for numeric values of the parameter.

Parameters
maxValueThe upper limit for numeric values of the parameter.
QVariant Frapper::NumberParameter::getStepSize ( ) const

Returns the step size numeric values of the parameter.

Returns
The step size for numeric values of the parameter.
void Frapper::NumberParameter::setStepSize ( const QVariant &  stepSize)

Sets the step size numeric values of the parameter.

Parameters
stepSizeThe step size for numeric values of the parameter.
QString Frapper::NumberParameter::getUnit ( ) const

Returns the unit of the parameter.

Returns
The unit of the parameter (an empty string if no unit has been set).
The unit of the parameter.
void Frapper::NumberParameter::setUnitScale ( const float  scale)

Sets the unit scale for the parameter.

Parameters
scaleThe new unit scale.
float Frapper::NumberParameter::getUnitScale ( ) const

Returns the unit scale for the parameter.

Returns
The unit scale for the parameter.
void Frapper::NumberParameter::setUnit ( const QString &  unit)

Sets the unit for the parameter.

Parameters
unitThe unit for the parameter.
void Frapper::NumberParameter::setTime ( const QVariant &  timeValue)

Sets the current time for the parameter.

Parameters
timeValueThe current time for the parameter.
void Frapper::NumberParameter::calculateExtrema ( )

Calculate the limits for numeric values of the parameter.

void Frapper::NumberParameter::scaleValues ( const float &  scaleFactor)

Scales all values from the parameter.

Parameters
Thescale factor.
bool Frapper::NumberParameter::isAnimated ( ) const

Returns whether the parameter contains keys.

Public Animation Functions.

Returns
True if the parameter contains keys, otherwise False.

Returns whether the parameter contains keys.

Returns
True if the parameter contains keys, otherwise False.
void Frapper::NumberParameter::addKey ( Key key)

Adds the given parameter to the given time in the list of keys.

Parameters
keyThe key to add to the list.
keyThe key to add to the list
void Frapper::NumberParameter::addKey ( const int &  time)

Adds the actuel numberparameter value to the given time in the list of keys.

Parameters
timeThe time index to add the value to the list.
void Frapper::NumberParameter::addKey ( const QVariant &  value)

Adds the given parameter to the back of the list of keys.

Parameters
valueThe value to add to the list.
valueThe value to add to the list
void Frapper::NumberParameter::addKey ( const float &  value)

Adds the given parameter to the back of the list of keys.

Parameters
valueThe value to add to the list
void Frapper::NumberParameter::addKeyPresorted ( Key key)

Adds the given parameter to the given time in the list of keys, without sorting.

Parameters
keyThe key to add to the list
void Frapper::NumberParameter::setKeys ( const 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.

Parameters
keysThe value list to add to the key list.
keyThe value list to add to the key list
unsigned int Frapper::NumberParameter::numKeys ( ) const

Returns the number of keys in the list.

Returns the number of keys in list.

Returns
The number of keys in the list.
The number of keys.
bool Frapper::NumberParameter::isEmpty ( ) const

Returns whether the list of keys is empty.

Check for empty list.

Returns
True if the list of keys is empty, otherwise False.
True if list is empty.
void Frapper::NumberParameter::removeKey ( const float &  time)

Removes the key at the given time.

Parameters
timeThe time of the key to remove.
timeThe time for the key to remove.
void Frapper::NumberParameter::removeKey ( const int &  index)

Removes the key at the given index.

Parameters
indexThe index for the key to remove.
void Frapper::NumberParameter::removeKeys ( const float &  minTime,
const float &  maxTime 
)

Removes the keys at the given range.

Parameters
minTimeThe start time for the keys to remove.
maxTimeThe end time for the keys to remove.
void Frapper::NumberParameter::removeKeys ( const int &  minIndex,
const int &  maxIndex 
)

Removes the keys at the given range.

Parameters
minIndexThe start time for the keys to remove.
maxIndexThe end time for the keys to remove.
void Frapper::NumberParameter::clearKeys ( )

Removes all keys.

Key * Frapper::NumberParameter::getKey ( const float &  time)

Returns the key at the given time.

Parameters
timeThe time to the key.
Returns
The key at the given time.
Key * Frapper::NumberParameter::getKey ( const unsigned int &  index)

Returns the key at the given index.

Parameters
indexThe index to the Key.
Returns
The key at the given index.
QList< Key * > * Frapper::NumberParameter::getKeys ( )

Returns a pointer to the list of keys.

Returns
A pointer to the list of keys.
unsigned int Frapper::NumberParameter::getKeysSize ( ) const

Returns the size of the list of keys.

Returns
The size of the list of keys.
QVariant Frapper::NumberParameter::getKeyValueInterpol ( const QVariant &  time)
inline

Returns the interpolated value of the key at the given time.

Parameters
timeThe time of the key.
Returns
The interpolated value of the key at the given time.
QVariant Frapper::NumberParameter::getKeyValuePos ( const float &  time)

Returns the value of the key at the given time.

Parameters
timeThe time to the Key.
Returns
The value at the given time.
Parameters
timeThe time of the key.
Returns
The value at the given time.
QVariant Frapper::NumberParameter::getKeyValueIndex ( const unsigned int &  index) const

Returns the value of the key at the given index.

Parameters
indexThe index to the Key.
Returns
The value at the given index.
QVariant Frapper::NumberParameter::getValue ( bool  triggerEvaluation = false)
virtual

Returns the parameter's value while optionally triggering the evaluation chain.

Parameters
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The parameter's value.
Parameters
Triggerevaluation.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The parameter's value.

Reimplemented from Frapper::Parameter.

QList< Key * >::iterator Frapper::NumberParameter::findIndex ( const float &  pos)
inlineprotected

Returns the sorted index from keylist by evaluating the time value.

Protected Functions.

Parameters
timeThe time of the Key.
Returns
A list iterator to the index in list.

Returns the sorted index from keylist by evaluating the time value.

pos The time of the Key.

Returns
A list iterator to the index in list.
QList< Key * >::iterator Frapper::NumberParameter::findIndex ( const Key key)
inlineprotected

Returns the sorted index from keylist by evaluating the time value of the given key.

Parameters
keyThe Key to add.
Returns
A list iterator to the index in list.

key The Key to add.

Returns
A list iterator to the index in list.
bool Frapper::NumberParameter::lessThan ( const Key k1,
const Key k2 
)
inlinestaticprotected

Less than definition Function for comparing unique icon Key *.

Protected Helper Functions.

Parameters
k1The first key for comparison.
k2The second key for comparison.
Returns
A boolean as result from comparison.

Less than definition Function for comparing unique icon Key *

k1 The first key for comparison. k2 The second key for comparison.

Returns
A boolean as result from comparison.

Member Data Documentation

InputMethod Frapper::NumberParameter::m_inputMethod
private

The input method for numeric values of the parameter.

QVariant Frapper::NumberParameter::m_minValue
private

The lower limit for numeric values of the parameter.

QVariant Frapper::NumberParameter::m_maxValue
private

The upper limit for numeric values of the parameter.

QVariant Frapper::NumberParameter::m_stepSize
private

The step size for numeric values of the parameter.

QString Frapper::NumberParameter::m_unit
private

The parameter's unit (an empty string if no unit has been set).

QList<Key *> Frapper::NumberParameter::m_keys
private

The list of keys for animating the parameter's numeric value.

float Frapper::NumberParameter::m_unitScale
private

The unit scale of the numeric values.


The documentation for this class was generated from the following files: