Frapper
1.0a
|
Class representing a group of parameters of a Node. More...
#include <ParameterGroup.h>
Public Member Functions | |
ParameterGroup (const QString &name="") | |
Constructor of the ParameterGroup class. | |
virtual | ~ParameterGroup () |
Destructor of the ParameterGroup class. | |
void | setValue (const QString &name, const QVariant &value, bool triggerDirtying=false) |
Sets the value of the parameter with the given name to the given value while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, bool value, bool triggerDirtying=false) |
Convenience function for setting the value of a boolean parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, int value, bool triggerDirtying=false) |
Convenience function for setting the value of an integer parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, unsigned int value, bool triggerDirtying=false) |
Convenience function for setting the value of an unsigned integer parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, double value, bool triggerDirtying=false) |
Convenience function for setting the value of a double-precision floating point parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, char *value, bool triggerDirtying=false) |
Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, const char *value, bool triggerDirtying=false) |
Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, const QString &value, bool triggerDirtying=false) |
Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, const QColor &value, bool triggerDirtying=false) |
Convenience function for setting the value of a color parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, const Ogre::Vector3 &value, bool triggerDirtying=false) |
Convenience function for setting the value of an OGRE vector parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, Ogre::SceneNode *value, bool triggerDirtying=false) |
Convenience function for setting the value of a scene node parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, const Ogre::TexturePtr value, bool triggerDirtying=false) |
Convenience function for setting the value of an OGRE texture parameter while optionally triggering the dirtying chain. | |
void | setValue (const QString &name, ParameterGroup *value, bool triggerDirtying=false) |
Convenience function for setting the value of a parameter group parameter while optionally triggering the dirtying chain. | |
void | setParameterEnabled (const QString &name, bool enabled) |
Convenience function for setting the enabled flag of a string parameter. | |
virtual void | setEnabled (bool enabled, bool propagate=true) |
Sets whether the controls for editing the parameter group in the UI should be enabled. | |
virtual void | setEnabled (bool enabled, bool propagate, bool diveInGroups) |
Sets whether the controls for editing the parameter group in the UI should be enabled. | |
virtual void | setNode (Node *node) |
Sets the node to which this parameter group belongs. | |
virtual AbstractParameter * | clone () |
Creates an exact copy of the parameter. | |
virtual bool | isGroup () const |
Returns whether the parameter object derived from this class is a parameter group. | |
virtual void | reset () |
Resets the parameters contained in the group to their default values. | |
void | disconnectParameters (QObject *receiver) |
Disconnects all signals from parameters contained in the group from slots of the given receiver object. | |
void | clear () |
Clears the parameter group by emptying the parameter data structures. | |
void | destroyAllParameters () |
Destroys all parameters in the group. | |
QList< Parameter * > | filterParameters (QString searchText, bool diveInChildGroups, bool getAll=false) const |
Returns a list of parameters whose names contain the given search text. | |
bool | containsGroup (const QString &name) const |
Returns whether the group contains a group with the given name. | |
bool | contains (const QString &name) const |
Returns whether the group contains a parameter with the given name. | |
bool | contains (Parameter *parameter) const |
Returns whether the group contains the given parameter. | |
bool | contains (Parameter::Type parameterType) const |
Returns whether the group contains parameters of the given type. | |
bool | contains (Parameter::PinType pinType) const |
Returns whether the group contains parameters of the given pin type. | |
bool | contains (Parameter::PinType pinType, bool connected) const |
Returns whether the group contains parameters of the given pin type and of the given connection status. | |
bool | isEmpty () const |
Returns whether the group contains parameters or not. | |
void | addParameter (AbstractParameter *parameter, bool prepend=false) |
Adds the given parameter to the group of parameters. | |
Parameter * | getParameter (const QString &name) const |
Returns the parameter with the given name. | |
Parameter * | removeParameter (const QString &name, bool diveInGroups=true) |
Removes and deletes the parameter with the given name from the parameter group. | |
Parameter * | removeParameter (Parameter *parameter, bool diveInGroups=true) |
Removes and deletes the given parameter from the parameter group. | |
void | removeParameterGroup (const QString &name) |
Removes and deletes the given parameter group from the parameter group. | |
ParameterGroup * | getParameterGroup (const QString &name, bool recursive=true) const |
Returns the parameter group with the given name. | |
AbstractParameter::List * | getParameterList () |
Returns a pointer to the list of parameters and parameter groups that are contained in this group. | |
AbstractParameter::Map * | getParameterMap () |
Returns a pointer to the map of parameters and parameter groups that are contained in this group. | |
![]() | |
AbstractParameter (const QString &name) | |
Constructor of the AbstractParameter class. | |
AbstractParameter (const AbstractParameter ¶meter) | |
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. | |
Node * | getNode () const |
Returns the node to which this parameter or parameter group belongs. | |
Private Attributes | |
AbstractParameter::List | m_parameterList |
The list of parameters or parameter groups contained in this group. | |
AbstractParameter::Map | m_parameterMap |
The map of parameters or parameter groups contained in this group. | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
void | enabledChanged () |
Signal that is emitted when the parameter is enabled or disabled. | |
![]() | |
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. | |
Node * | m_node |
The name of the parent node that this parameter or parameter group belongs to. | |
Class representing a group of parameters of a Node.
Frapper::ParameterGroup::ParameterGroup | ( | const QString & | name = "" | ) |
Constructor of the ParameterGroup class.
Constructors and Destructors.
name | The name of the parameter group. |
Constructor of the ParameterGroup class.
name | The name of the parameter group. |
|
virtual |
Destructor of the ParameterGroup class.
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
const QVariant & | value, | ||
bool | triggerDirtying = false |
||
) |
Sets the value of the parameter with the given name to the given value while optionally triggering the dirtying chain.
Public Functions.
name | The name of the parameter to set the value for. |
value | The new value for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
Public Value Setter Functions Sets the value of the parameter with the given name to the given value while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The new value for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
bool | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a boolean parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
int | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of an integer parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
unsigned int | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of an unsigned integer parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
double | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a double-precision floating point parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
char * | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
const char * | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
const QString & | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.
If the parameter with the given name is not a string parameter the given value will be converted according to the parameter's type.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
const QColor & | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a color parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
const Ogre::Vector3 & | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of an OGRE vector parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
Ogre::SceneNode * | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a scene node parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
const Ogre::TexturePtr | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of an OGRE texture parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setValue | ( | const QString & | name, |
ParameterGroup * | value, | ||
bool | triggerDirtying = false |
||
) |
Convenience function for setting the value of a parameter group parameter while optionally triggering the dirtying chain.
name | The name of the parameter to set the value for. |
value | The value to set for the parameter with the given name. |
triggerDirtying | Flag to control whether to trigger the dirtying chain. |
void Frapper::ParameterGroup::setParameterEnabled | ( | const QString & | name, |
bool | enabled | ||
) |
Convenience function for setting the enabled flag of a string parameter.
name | The name of the parameter to set the value for. |
enabled | The enabled flag to set for the parameter with the given name. |
|
virtual |
Sets whether the controls for editing the parameter group in the UI should be enabled.
Recursively sets the enabled state for all parameters and parameter groups contained in this group.
enabled | The value for the parameters' enabled flags. Flag to control whether to emit the enabledChanched signal. |
Reimplemented from Frapper::AbstractParameter.
|
virtual |
Sets whether the controls for editing the parameter group in the UI should be enabled.
Recursively sets the enabled state for all parameters and parameter groups contained in this group.
enabled | The value for the parameters' enabled flags. Flag to control whether to emit the enabledChanched signal. Flag to control whether to also process childs. |
Recursively sets the enabled state for all parameters and parameter groups contained in this group.
enabled | The value for the parameters' enabled flags. Flag to control whether to also process childs. Flag to control whether to emit the enabledChanched signal. |
|
virtual |
Sets the node to which this parameter group belongs.
Recursively sets the node for all parameters and parameter groups contained in this group.
node | The node to which the parameter group belongs. |
Reimplemented from Frapper::AbstractParameter.
|
virtual |
Creates an exact copy of the parameter.
Implements Frapper::AbstractParameter.
|
virtual |
Returns whether the parameter object derived from this class is a parameter group.
Implements Frapper::AbstractParameter.
|
virtual |
Resets the parameters contained in the group to their default values.
Implements Frapper::AbstractParameter.
void Frapper::ParameterGroup::disconnectParameters | ( | QObject * | receiver | ) |
Disconnects all signals from parameters contained in the group from slots of the given receiver object.
receiver | The object to disconnect the contained parameters from. |
void Frapper::ParameterGroup::clear | ( | ) |
Clears the parameter group by emptying the parameter data structures.
void Frapper::ParameterGroup::destroyAllParameters | ( | ) |
Destroys all parameters in the group.
QList< Parameter * > Frapper::ParameterGroup::filterParameters | ( | QString | searchText, |
bool | diveInChildGroups, | ||
bool | getAll = false |
||
) | const |
Returns a list of parameters whose names contain the given search text.
searchText | The text to match the parameter names against. |
diveInChildGroups | Flag to control whether to also process child groups. |
getAll | Retrieves all parameters. |
searchText | The text to match the parameter names against. |
diveInChildGroups | Flag to control whether to also process child groups. |
bool Frapper::ParameterGroup::containsGroup | ( | const QString & | name | ) | const |
Returns whether the group contains a group with the given name.
name | The group name to find in the group. |
bool Frapper::ParameterGroup::contains | ( | const QString & | name | ) | const |
Returns whether the group contains a parameter with the given name.
name | The parameter name to find in the group. |
bool Frapper::ParameterGroup::contains | ( | Parameter * | parameter | ) | const |
Returns whether the group contains the given parameter.
parameter | The parameter to find in the group. |
bool Frapper::ParameterGroup::contains | ( | Parameter::Type | parameterType | ) | const |
Returns whether the group contains parameters of the given type.
parameterType | The parameter type to find in the group. |
bool Frapper::ParameterGroup::contains | ( | Parameter::PinType | pinType | ) | const |
Returns whether the group contains parameters of the given pin type.
pinType | The pin type of parameters to look for in the group. |
bool Frapper::ParameterGroup::contains | ( | Parameter::PinType | pinType, |
bool | connected | ||
) | const |
Returns whether the group contains parameters of the given pin type and of the given connection status.
pinType | The pin type of parameters to look for in the group. |
connected | The connection status of parameters to look for in the group. |
bool Frapper::ParameterGroup::isEmpty | ( | ) | const |
Returns whether the group contains parameters or not.
void Frapper::ParameterGroup::addParameter | ( | AbstractParameter * | parameter, |
bool | prepend = false |
||
) |
Adds the given parameter to the group of parameters.
Adds the given parameter to the list of parameters.
parameter | The parameter to add. |
prepend | Flag to control whether to insert the parameter at the beginning of the parameter list. |
Parameter * Frapper::ParameterGroup::getParameter | ( | const QString & | name | ) | const |
Returns the parameter with the given name.
name | The name of the parameter to return. |
Parameter * Frapper::ParameterGroup::removeParameter | ( | const QString & | name, |
bool | diveInGroups = true |
||
) |
Removes and deletes the parameter with the given name from the parameter group.
name | The name of the parameter to remove and delete. |
Parameter * Frapper::ParameterGroup::removeParameter | ( | Parameter * | parameter, |
bool | diveInGroups = true |
||
) |
Removes and deletes the given parameter from the parameter group.
parameter | The parameter to remove and delete. |
void Frapper::ParameterGroup::removeParameterGroup | ( | const QString & | name | ) |
Removes and deletes the given parameter group from the parameter group.
parameter | The parameter group to remove and delete. |
ParameterGroup * Frapper::ParameterGroup::getParameterGroup | ( | const QString & | name, |
bool | recursive = true |
||
) | const |
Returns the parameter group with the given name.
name | The name of the parameter group to return. |
AbstractParameter::List * Frapper::ParameterGroup::getParameterList | ( | ) |
Returns a pointer to the list of parameters and parameter groups that are contained in this group.
AbstractParameter::Map * Frapper::ParameterGroup::getParameterMap | ( | ) |
Returns a pointer to the map of parameters and parameter groups that are contained in this group.
|
private |
The list of parameters or parameter groups contained in this group.
|
private |
The map of parameters or parameter groups contained in this group.