Frapper  1.0a
Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
Frapper::Parameter Class Reference

Class representing a parameter of a Node. More...

#include <Parameter.h>

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

Public Types

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.
 

Signals

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.
 
- Signals inherited from Frapper::AbstractParameter
void enabledChanged ()
 Signal that is emitted when the parameter is enabled or disabled.
 

Public Member Functions

 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 AbstractParameterclone ()
 Creates an exact copy of the parameter.
 
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 QVariant getValue (bool triggerEvaluation=false)
 Returns the parameter's value while optionally triggering the evaluation chain.
 
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.
 
virtual void setDirty (bool dirty)
 Sets 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 setEnabled (bool enabled, bool propagate=true)
 Sets 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 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.
 

Static Public Attributes

static const QString PathSeparator = " > "
 The string that separates parts in parameter paths.
 
static const QString EnumerationSeparator = "---"
 The string that identifies enumeration separators.
 

Protected Attributes

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.
 
- Protected Attributes inherited from Frapper::AbstractParameter
QString m_name
 The name of the parameter or parameter group.
 
bool m_enabled
 Flag that states whether the controls for editing the parameter or parameter group in the UI should be enabled.
 
Nodem_node
 The name of the parent node that this parameter or parameter group belongs to.
 

Friends

class SceneModel
 

Detailed Description

Class representing a parameter of a Node.

Member Typedef Documentation

typedef unsigned int Frapper::Parameter::Size

Type definition for the size of a parameter, specifying how many values of the given type the parameter can store.

Member Enumeration Documentation

Nested enumeration for the different types of parameters.

Enumerator:
T_Unknown 
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 special types of multiplicity.

Enumerator:
M_Invalid 
M_OneOrMore 

Nested enumeration for the different types of pins to represent parameters.

Enumerator:
PT_None 
PT_Input 
PT_Output 

Constructor & Destructor Documentation

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

Constructor of the Parameter class.

Constructors and Destructors.

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

Constructor of the Parameter class.

Parameters
nameThe name of the parameter.
typeThe type of the parameter's value(s).
valueThe parameter's value.
Frapper::Parameter::Parameter ( const Parameter parameter)

Copy constructor of the Parameter class.

Parameters
parameterThe parameter to copy.
Frapper::Parameter::~Parameter ( )
virtual

Destructor of the Parameter class.

Member Function Documentation

QString Frapper::Parameter::getTypeName ( Parameter::Type  type)
static

Returns the name of the given parameter type.

Public Static Functions.

Parameters
typeThe type for which to return the name.
Returns
The name of the given parameter type.

Returns the name of the given parameter type.

Parameters
typeThe type for which to return the name.
Returns
The name of the given parameter type.
QColor Frapper::Parameter::getTypeColor ( Parameter::Type  type)
static

Returns the color of the given parameter type.

Parameters
typeThe type for which to return the color.
Returns
The color of the given parameter type.
Parameter::Type Frapper::Parameter::getTypeByName ( const QString &  typeName)
static

Returns the parameter type corresponding to the given name.

Parameters
typeNameThe name of a parameter type.
Returns
The parameter type corresponding to the given name.
QVariant Frapper::Parameter::getDefaultValue ( Parameter::Type  type)
static

Returns the default value for parameters of the given type.

Parameters
typeThe parameter type for which to return the default value.
Returns
The default value for parameters of the given type.
QColor Frapper::Parameter::decodeIntColor ( const QString &  color)
static

Converts the given string to a color value. The string should contain comma-separated integer values for the red, green and blue channels respectively.

Parameters
colorThe string to convert to a color.
Returns
A color value corresponding to the given string, or Black when an error occured during conversion.
Parameters
colorThe string to convert to a color.
Returns
A color value corresponding to the given string, or an invalid color when an error occured during conversion.
QColor Frapper::Parameter::decodeDoubleColor ( const QString &  color)
static

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.

Parameters
colorThe string to convert to a color.
Returns
A color value corresponding to the given string, or Black when an error occured during conversion.
Parameters
colorThe string to convert to a color.
Returns
A color value corresponding to the given string, or an invalid color when an error occured during conversion.
Parameter::Size Frapper::Parameter::decodeSize ( const QString &  size)
static

Converts the given string to a size value.

Parameters
sizeThe string to convert to a size value.
Returns
A size value corresponding to the given string.
int Frapper::Parameter::decodeMultiplicity ( const QString &  multiplicity)
static

Converts the given string to a multiplicity value.

Parameters
multiplicityThe string to convert to a multiplicity value.
Returns
A multiplicity value corresponding to the given string.
Parameter::PinType Frapper::Parameter::decodePinType ( const QString &  pinTypeString)
static

Converts the given string to a pin type value.

Parameters
pinTypeStringThe string to convert to a pin type value.
Returns
A pin type value corresponding to the given string.
Parameter * Frapper::Parameter::create ( const QString &  name,
Parameter::Type  type,
QVariant  defaultValue = QVariant() 
)
static

Creates a parameter with the given name and type.

Depending on the given type an instance of a Parameter-derived class may be returned, e.g. a NumberParameter object if type equals T_Float.

Parameters
nameThe name to use for the new parameter.
typeThe type to use for the new parameter.
defaultValueThe default value to use for the new parameter.
Returns
A new parameter with the given name and type.
Parameter * Frapper::Parameter::create ( const QDomElement &  element)
static

Creates a parameter from the given XML element.

Depending on the type described in the XML element an instance of a Parameter-derived class may be returned, e.g. a NumberParameter object if the type equals T_Float.

Parameters
elementThe element in a DOM tree containing information about the parameter to create.
Returns
A new parameter corresponding to the given XML element, or 0 if the parameter description is invalid.
Parameter * Frapper::Parameter::clone ( const Parameter parameter)
static

Creates a copy of the given parameter.

Parameters
parameterThe parameter to clone.
Returns
A new parameter with data corresponding to the given parameter.
QString Frapper::Parameter::extractFirstGroupName ( QString *  name)
static

Extracts the name of first group found in the given parameter path.

Extracts the name of first group found in the given parameter name.

Parameters
pathThe parameter path to extract the first group name from.
Returns
The name of the first group found in the given path, or an empty string if the path is a simple parameter name.
Parameters
nameThe parameter name to extract the first group name from.
Returns
The name of the first group found in the given name, or an empty string if the name contains no group name.
Parameter * Frapper::Parameter::createImageParameter ( const QString &  name,
Ogre::TexturePtr  texturePointer = Ogre::TexturePtr(0) 
)
static

Creates an image parameter with the given name.

Parameters
nameThe name to use for the parameter.
texturePointerThe texture pointer to use as the parameter's value.
Returns
A new image parameter with the given name.
Parameter * Frapper::Parameter::createGroupParameter ( const QString &  name,
ParameterGroup parameterGroup = 0 
)
static

Creates a group parameter with the given name.

Parameters
nameThe name to use for the parameter.
parameterGroupThe parameter group pointer to be contained in the parameter.
Returns
A new group parameter with the given name.
Parameters
nameThe name to use for the parameter.
parameterGroupThe parameter group to use as the parameter's value.
Returns
A new group parameter with the given name.
AbstractParameter * Frapper::Parameter::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.

Implements Frapper::AbstractParameter.

Reimplemented in Frapper::NumberParameter, Frapper::SceneNodeParameter< T >, Frapper::FilenameParameter, Frapper::GenericParameter, and Frapper::EnumerationParameter.

bool Frapper::Parameter::isGroup ( ) const
virtual

Returns whether the parameter object derived from this class is a parameter group.

Returns
True if the parameter object is a parameter group, otherwise False.

Implements Frapper::AbstractParameter.

Parameter::Type Frapper::Parameter::getType ( ) const

Returns the parameter's type.

Returns
The parameter's type.
Parameter::Size Frapper::Parameter::getSize ( ) const

Returns the parameter's size specifying how many values of the given type it stores.

Returns
The parameter's size value.
void Frapper::Parameter::setSize ( Parameter::Size  size)

Sets the parameter's size specifying how many values of the given type it stores.

Parameters
sizeThe parameter's size value.
int Frapper::Parameter::getMultiplicity ( ) const

Returns the parameter's multiplicity specifying how many parameters of the given type can be connected to it.

Returns
The parameter's multiplicity value.
void Frapper::Parameter::setMultiplicity ( int  multiplicity)

Sets the parameter's multiplicity specifying how many parameters of the given type can be connected to it.

Parameters
multiplicityThe parameter's multiplicity value.
int Frapper::Parameter::getNumberOfConnections ( ) const

Returns the parameter's number of connections.

Returns
The parameter's number of connections.
QVariant Frapper::Parameter::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 in Frapper::NumberParameter, and Frapper::GenericParameter.

const QVariantList & Frapper::Parameter::getValueList ( ) const
virtual

Returns the parameter's value list. Which contains the values of all connected parameters.

Returns
The parameter's value list.
void Frapper::Parameter::setValue ( const QVariant &  value,
bool  triggerDirtying = false 
)

Sets the parameter's value to the given value.

Parameters
valueThe new value for the parameter.
void Frapper::Parameter::setValue ( int  index,
const QVariant &  value,
bool  triggerDirtying = false 
)

Sets the parameter's value with the given index to the given value.

Convenience function that works on a list of values.

Parameters
indexThe index of the value to set.
valueThe new value for the parameter.
bool Frapper::Parameter::hasDefaultValue ( ) const

Returns whether the parameter's current value is the default value.

Returns
True if the parameter's current value is the default value, otherwise False.
void Frapper::Parameter::setDefaultValue ( const QVariant &  defaultValue)

Sets the parameter's default value to the given value.

Parameters
defaultValueThe default value to use for the parameter.
void Frapper::Parameter::reset ( )
virtual

Resets the parameter to its default value.

Implements Frapper::AbstractParameter.

AbstractParameter::List Frapper::Parameter::getAffectedParameters ( ) const

Returns the list of parameters that are affected when the value of this parameter is changed.

Returns
The list of parameters affected by this parameter.
void Frapper::Parameter::addAffectedParameter ( Parameter affectedParameter)

Adds a parameter to the list of parameters that are affected when the value of this parameter is changed.

Parameters
affectedParameterParameter that is affected when the value of this parameter is changed.
void Frapper::Parameter::removeAffectedParameter ( Parameter affectedParameter)

Removes a parameter from the list of parameters that are affected when the value of this parameter is changed.

Parameters
affectedParameterParameter that is affected when the value of this parameter is changed.
AbstractParameter::List Frapper::Parameter::getAffectingParameters ( ) const

Returns the list of parameters that affect this parameter when their value is changed.

Returns
List of parameters that affect this parameter when their value is changed.
void Frapper::Parameter::addAffectingParameter ( Parameter affectingParameter)

Adds a parameter to the list of parameters that are affected when the value of this parameter is changed.

Parameters
affectingParameterParameter that affects this parameter when its value is changed.
void Frapper::Parameter::removeAffectingParameter ( Parameter affectingParameter)

Removes a parameter from the list of parameters that are affected when the value of this parameter is changed.

Parameters
affectingParameterParameter that affects this parameter when its value is changed.
QString Frapper::Parameter::getDescription ( ) const

Returns the description of the parameter.

Returns
The description of the parameter.
void Frapper::Parameter::setDescription ( const QString &  description)

Sets the description for the parameter.

Parameters
descriptionThe description for the parameter.
Parameter::PinType Frapper::Parameter::getPinType ( ) const

Returns the type of pin that should be created to represent the parameter.

Returns
the type of pin that should be created to represent the parameter.
void Frapper::Parameter::setPinType ( PinType  pinType)

Sets the type of pin that should be created to represent the parameter.

Parameters
pinTypeThe type of pin that should be created to represent the parameter.
Connection::Map Frapper::Parameter::getConnectionMap ( ) const

Returns all connections currently connected to this parameter.

Returns
All connections currently connected to this parameter.
void Frapper::Parameter::addConnection ( Connection connection)

Adds the given connection to the list of connections.

Parameters
connectionThe connection to add to the list of connections.
void Frapper::Parameter::removeConnection ( Connection::ID  id)

Removes the given connection from the list of connections.

Parameters
idThe ID of the connection to remove from the list of connections.
bool Frapper::Parameter::isConnected ( ) const

Returns whether the parameter is connected to at least one other parameter.

Returns
True if the parameter is connected to another parameter, otherwise False.
Parameter * Frapper::Parameter::getConnectedParameter ( ) const

Returns the first parameter connected to this parameter.

Returns
The first parameter connected to this parameter or Null if no parameter is connected to this parameter.
bool Frapper::Parameter::isDirty ( )

Returns whether the parameter's value has changed.

Returns
True if the parameter's value has changed, otherwise False.
void Frapper::Parameter::setDirty ( bool  dirty)
virtual

Sets whether the parameter's value has changed.

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

Reimplemented in Frapper::NumberParameter.

bool Frapper::Parameter::isAuxDirty ( )

Returns the auxiliary dirty flag.

Returns
The auxiliary dirty flag.
void Frapper::Parameter::setAuxDirty ( bool  dirty)
virtual

Sets the auxiliary dirty flag.

Parameters
dirtyThe new value for the parameter auxiliary dirty flag.
bool Frapper::Parameter::isVisible ( ) const

Returns the visibility for this parameter.

Returns
The visibility of the parameter.
The visibility of th parameter.
void Frapper::Parameter::setVisible ( bool  visible)

Sets the visibility for this parameter.

Parameters
visibleThe visibility of the parameter.
visibleThe visibility of th parameter.
bool Frapper::Parameter::isReadOnly ( ) const

Returns whether the parameter can not be modified using a control in the UI.

Returns
True if the parameter is read-only, otherwise False.
void Frapper::Parameter::setReadOnly ( bool  readOnly)

Sets whether the parameter can not be modified using a control in the UI.

Parameters
readOnlyThe value for the parameter's read-only flag.
void Frapper::Parameter::setSelfEvaluating ( bool  selfEvaluating)

Sets whether the parameter is self-evaluating.

Parameters
selfEvaluatingTrue if the parameter is self-evaluating.
bool Frapper::Parameter::isSelfEvaluating ( ) const

Returns wether the parameter is self-evaluating.

Returns
True if the parameter is self-evaluating.
void Frapper::Parameter::propagateDirty ( bool  setFirstTrue = true)

Sets the dirty flag for all parameters that are connected with and affected by this parameter.

Sets the dirty flag for all parameters that are affected by this parameter.

Parameters
callingNodeThe node calling this function.
void Frapper::Parameter::propagateAuxDirty ( )

Sets the aux dirty flag for all parameters that are affecting this parameter..

Sets the aux dirty flag for all parameters that are affecting this parameter.

Parameters
callingNodeThe node calling this function.
void Frapper::Parameter::propagateEvaluation ( )

Propagates the evaluation of nodes.

Parameters
callingNodeThe node calling this function.
void Frapper::Parameter::setChangeFunction ( const char *  changeFunction)

Sets the function to call when the parameter's value changes.

Should only be called after the parameter has been added to a parameter group of a node so that the m_node member is already set.

Parameters
changeFunctionThe name of the function to call when the parameter's value changes.
void Frapper::Parameter::setProcessingFunction ( const char *  processingFunction)

Sets the function to use for computing the parameter's value.

Should only be called after the parameter has been added to a parameter group of a node so that the m_node member is already set.

Parameters
processingFunctionThe name of the function to use for computing the parameter's value.

Should only be called after the parameter has been added to a parameter group of a node so that the m_node member is already set.

Parameters
processingFunctionThe function to use for computing the parameter's value.
void Frapper::Parameter::setAuxProcessingFunction ( const char *  processingFunction)

Sets the function to use for computing auxiliary value dependant things.

Should only be called after the parameter has been added to a parameter group of a node so that the m_node member is already set.

Parameters
processingFunctionThe name of the function to use for computing the parameter's value.
void Frapper::Parameter::setCommandFunction ( const char *  commandFunction)

Sets the function to use for executing the command represented by the parameter.

Should only be called after the parameter has been added to a parameter group of a node so that the m_node member is already set.

Parameters
commandFunctionThe function to use for executing the command represented by the parameter.
void Frapper::Parameter::setOnConnectFunction ( const char *  onConnectFunction)

Sets the function which should be called on parameter's connection.

Parameters
onConnectFunctionThe function called on parameter's connection.
void Frapper::Parameter::setOnDisconnectFunction ( const char *  onDisconnectFunction)

Sets the function which should be called on parameter's disconnection.

Parameters
onDisconnectFunctionThe function called on parameter's disconnection.
void Frapper::Parameter::executeCommand ( )

Emits the commandExecutionRequested signal to notify connected objects that the command represented by the parameter should be executed.

QString Frapper::Parameter::getValueString ( )

Returns the parameter's value as a character string.

Returns
The parameter's value as a character string.
void Frapper::Parameter::dirtied ( )
signal

Signal that is emitted when the value of the parameter becomes dirty.

void Frapper::Parameter::valueChanged ( )
signal

Signal that is emitted when the parameter's value has changed.

void Frapper::Parameter::valueChanged ( int  index)
signal

Signal that is emitted when the parameter's value with the given index has changed.

Parameters
indexThe index of the value in a list of values.
void Frapper::Parameter::processingRequested ( )
signal

Signal that is emitted when the value of the parameter should be processed.

void Frapper::Parameter::auxProcessingRequested ( )
signal

Signal that is emitted when auxiliary changes in combination with the value happen.

void Frapper::Parameter::commandExecutionRequested ( )
signal

Signal that is emitted when a command parameter is triggered.

void Frapper::Parameter::connectionEstablished ( )
signal

Signal that is emitted when a connection is established.

void Frapper::Parameter::connectionDestroyed ( )
signal

Signal that is emitted when a connection is destroyed.

Friends And Related Function Documentation

friend class SceneModel
friend

Member Data Documentation

const QString Frapper::Parameter::PathSeparator = " > "
static

The string that separates parts in parameter paths.

const QString Frapper::Parameter::EnumerationSeparator = "---"
static

The string that identifies enumeration separators.

Public Static Constants.

QMutex Frapper::Parameter::m_mutex
protected

Mutex for threaded programming.

QStringList Frapper::Parameter::m_mutexList
protected
Type Frapper::Parameter::m_type
protected

The type of the parameter's value.

int Frapper::Parameter::m_size
protected

The parameter's size specifying how many values of the given type it stores.

int Frapper::Parameter::m_multiplicity
protected

The parameter's multiplicity specifying how many parameters of the given type can be connected to it.

QVariant Frapper::Parameter::m_defaultValue
protected

The parameter's default value.

QVariant Frapper::Parameter::m_value
protected

The parameter's value.

QVariantList Frapper::Parameter::m_valueList
protected

The parameter's value.

QString Frapper::Parameter::m_description
protected

A description of the parameter.

PinType Frapper::Parameter::m_pinType
protected

The type of pin that should be created to represent the parameter.

Connection::Map Frapper::Parameter::m_connectionMap
protected

The map of connections that are connected to this connector with connection IDs as keys.

List Frapper::Parameter::m_affectedParameters
protected

A list of parameter names that are affected when the value of this parameter is changed.

List Frapper::Parameter::m_affectingParameters
protected

A list of parameter names that affect this parameter.

bool Frapper::Parameter::m_dirty
protected

Flag that states whether the parameter's value has changed.

bool Frapper::Parameter::m_auxDirty
protected

Auxiliary dirty flag.

bool Frapper::Parameter::m_visible
protected

Flag that states whether the parameter's should be visible in e.g. ParameterPanel or not.

bool Frapper::Parameter::m_readOnly
protected

Flag that states whether the parameter's value can not be changed using an input control in the UI.

bool Frapper::Parameter::m_selfEvaluating
protected

Flag that states whether the parameter is self-evaluating.


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