Class representing a specific type of nodes.
More...
#include <NodeType.h>
|
typedef QMap< QString, NodeType * > | Map |
| Type definition for a map with node type names as keys and pointers to node type objects as values.
|
|
typedef QPair< QString, QString > | Category |
| Type definition of a node type category data structure containing a node type category name and node type category icon name.
|
|
typedef QList< Category > | CategoryList |
| Type definition for a list of node type categories.
|
|
|
| NodeType (const QString &filename) |
| Constructor of the NodeType class.
|
|
| ~NodeType () |
| Destructor of the NodeType class.
|
|
QString | getName () const |
| Returns the name of the node type.
|
|
QString | getCategoryName () const |
| Returns the name of the category under which nodes of this type should be filed.
|
|
QColor | getColor () const |
| Returns the color associated with this node type.
|
|
bool | isAvailable () const |
| Returns whether nodes of this type can be created.
|
|
bool | isInternal () const |
| Returns whether nodes of this type are reserved for internal use.
|
|
bool | isErroneous () const |
| Returns whether errors or warnings occured while parsing the description file.
|
|
Node * | createNode (const QString &name) |
| Creates a node of this type.
|
|
|
bool | parseDescriptionFile (const QString &filename) |
| Parses the XML description file with the given name and creates the list of parameters and connectors that nodes of this type hold.
|
|
ParameterGroup * | parseParameters (QDomElement rootElement) |
| Parses the given DOM element and creates the tree of parameters that nodes of this type hold.
|
|
void | parseAffections (QDomElement rootElement) |
| Parses the given DOM element and creates the list of forward and backward affections that nodes of this type hold.
|
|
|
NodeTypeInterface * | m_nodeTypeInterface |
| Pointer to a object which implements the NodeTypeInterface. For Node Plugins.
|
|
ParameterGroup * | m_parameterRoot |
| The tree containing the parameters with default values for the node type.
|
|
QString | m_name |
| The name of the node type.
|
|
QString | m_categoryName |
| The name of the category under which nodes of this type should be filed.
|
|
QColor | m_color |
| The color associated with the node type.
|
|
bool | m_available |
| Flag that states whether this node type is available. Is set to false when parsing the XML description file failed.
|
|
bool | m_internal |
| Flag that states whether nodes of this type are reserved for internal use.
|
|
bool | m_erroneous |
| Flag that states whether errors or warnings occured while parsing the description file.
|
|
QMultiMap< QString, QString > | m_affectionMap |
| Which input pin is affecting which output pins.
|
|
|
static QMap< QString, unsigned
int > | s_nodeIndex |
| The indices of nodes created of the different node types.
|
|
Class representing a specific type of nodes.
Type definition for a map with node type names as keys and pointers to node type objects as values.
Type definition of a node type category data structure containing a node type category name and node type category icon name.
Type definition for a list of node type categories.
Frapper::NodeType::NodeType |
( |
const QString & |
filename | ) |
|
Constructor of the NodeType class.
Constructors and Destructors.
- Parameters
-
filename | The name of an XML file describing the node type. |
Constructor of the NodeType class.
- Parameters
-
filename | The name of an XML file describing the node type. |
Frapper::NodeType::~NodeType |
( |
| ) |
|
QString Frapper::NodeType::getName |
( |
| ) |
const |
Returns the name of the node type.
Public Functions.
- Returns
- The name of the node type.
Returns the name of the node type.
- Returns
- The name of the node type.
QString Frapper::NodeType::getCategoryName |
( |
| ) |
const |
Returns the name of the category under which nodes of this type should be filed.
- Returns
- The name of the category under which nodes of this type should be filed.
QColor Frapper::NodeType::getColor |
( |
| ) |
const |
Returns the color associated with this node type.
- Returns
- The color associated with this node type.
bool Frapper::NodeType::isAvailable |
( |
| ) |
const |
Returns whether nodes of this type can be created.
- Returns
- True if nodes of this type can be created, otherwise False.
bool Frapper::NodeType::isInternal |
( |
| ) |
const |
Returns whether nodes of this type are reserved for internal use.
It should not be possible to create nodes of internal node types from the framework's user interface.
- Returns
- True if nodes of this type are reserved for internal use, otherwise False.
bool Frapper::NodeType::isErroneous |
( |
| ) |
const |
Returns whether errors or warnings occured while parsing the description file.
- Returns
- True if errors or warnings occured while parsing the description file, otherwise False.
Node * Frapper::NodeType::createNode |
( |
const QString & |
name | ) |
|
Creates a node of this type.
- Parameters
-
name | The name for the new node. |
- Returns
- A pointer to a new node of this type.
bool Frapper::NodeType::parseDescriptionFile |
( |
const QString & |
filename | ) |
|
|
private |
Parses the XML description file with the given name and creates the list of parameters and connectors that nodes of this type hold.
Private Functions.
- Parameters
-
filename | The name of the XML description file to parse. |
Parses the XML description file with the given name and creates the list of parameters and connectors that nodes of this type hold.
- Parameters
-
filename | The name of the XML description file to parse. |
- Returns
- True if parsing the file succeeded, otherwise False.
ParameterGroup * Frapper::NodeType::parseParameters |
( |
QDomElement |
rootElement | ) |
|
|
private |
Parses the given DOM element and creates the tree of parameters that nodes of this type hold.
- Parameters
-
rootElement | The DOM element containing a list of <parameter> and <parameters> elements. |
- Returns
- A parameter group containing the created parameters.
- Parameters
-
rootElement | The DOM element containing a list of <parameter> and >parameters> elements. |
- Returns
- A parameter group containing the created parameters.
void Frapper::NodeType::parseAffections |
( |
QDomElement |
rootElement | ) |
|
|
private |
Parses the given DOM element and creates the list of forward and backward affections that nodes of this type hold.
- Parameters
-
rootElement | The DOM element containing a list of <connector> elements. |
rootElement | The DOM element containing a list of <connector> elements. |
A special kind of node type category used for separating categories in menus.
Public Static Data.
QMap< QString, unsigned int > Frapper::NodeType::s_nodeIndex |
|
staticprivate |
The indices of nodes created of the different node types.
Private Static Data.
- See Also
- createNode
The index of nodes created of this node type.
- See Also
- createNode
The tree containing the parameters with default values for the node type.
QString Frapper::NodeType::m_name |
|
private |
The name of the node type.
QString Frapper::NodeType::m_categoryName |
|
private |
The name of the category under which nodes of this type should be filed.
QColor Frapper::NodeType::m_color |
|
private |
The color associated with the node type.
bool Frapper::NodeType::m_available |
|
private |
bool Frapper::NodeType::m_internal |
|
private |
Flag that states whether nodes of this type are reserved for internal use.
bool Frapper::NodeType::m_erroneous |
|
private |
Flag that states whether errors or warnings occured while parsing the description file.
QMultiMap<QString, QString> Frapper::NodeType::m_affectionMap |
|
private |
Which input pin is affecting which output pins.
The documentation for this class was generated from the following files: