tuchulcha  0.10.1
Graphical Workflow Configuration Editor
Node Class Reference

QGraphicsItem that contains nodeproperties and draws the node. More...

#include <Node.h>

Inheritance diagram for Node:

Public Member Functions

 Node (const ParameterFileModel *pFile, QString title, int xpos, int ypos)
 default constructor More...
 
void addProperty (QString name, bool input)
 adds a property to the node More...
 
void addProperty (QString name, QString displayname, bool input)
 adds a property to the node More...
 
QRectF boundingRect () const
 area where node is clickable
 
void changeConnectionLineColor (QColor lineColor)
 change color of connected line
 
QString getClassName () const
 get class name
 
int getHeight () const
 node height
 
unsigned int getId () const
 get node id
 
QString getInstanceName ()
 get node name
 
NodePropertygetProperty (QString propName) const
 get node property
 
int getWidth () const
 node width
 
bool isSelectedNode ()
 state of node selections More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 handles mouse move events
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 paints the node
 
void setActive (bool activeStatus)
 changes the nodes activity
 
void setClassName (QString modname)
 set node class name More...
 
void setId (unsigned int id)
 sets the id of the node More...
 
void setName (QString name)
 resets the name of the node More...
 
void setSelectedNode (bool s)
 sets the node selected or not More...
 

Private Member Functions

void _checkWidth (int nChars=0)
 checks the node width in reference to the node name
 

Private Attributes

bool _active
 state of activity
 
QString _className
 name of the module the node is representing
 
int _height
 height of the node
 
unsigned int _id
 id of the node
 
QString _instanceName
 name of the node
 
int _nProps
 number of properties in node
 
const ParameterFileModel_pFile
 link to parameter file
 
QMap< QString, NodeProperty * > _properties
 list of nodeproperties
 
bool _selectedNode
 state of node selection
 
int _width
 width of the node
 

Static Private Attributes

static unsigned int _idCount = 0
 static id counter for id creation
 

Detailed Description

Definition at line 36 of file Node.h.

Constructor & Destructor Documentation

Node::Node ( const ParameterFileModel pFile,
QString  title,
int  xpos,
int  ypos 
)
Parameters
titlename of the node
xposx coordinate of upper left corner of the node
yposy coordinate of upper left corner of the node
pFilelink to parameter file

Definition at line 35 of file Node.cpp.

Member Function Documentation

void Node::addProperty ( QString  name,
bool  input 
)
Parameters
namename of parameter
inputinput or output type of property

Definition at line 70 of file Node.cpp.

References _checkWidth(), _height, _nProps, _pFile, and _properties.

void Node::addProperty ( QString  name,
QString  displayname,
bool  input 
)
Parameters
namename of parameter
displaynamedisplay name of parameter
inputinput or output type of property

Definition at line 79 of file Node.cpp.

References _checkWidth(), _height, _nProps, _pFile, and _properties.

bool Node::isSelectedNode ( )
Returns
state of node selection

Definition at line 104 of file Node.cpp.

References _selectedNode.

void Node::setClassName ( QString  modname)
Parameters
modnamename of the module

Definition at line 183 of file Node.cpp.

References _checkWidth(), and _className.

void Node::setId ( unsigned int  id)
Parameters
idID to set

Definition at line 52 of file Node.cpp.

References _id, and _idCount.

void Node::setName ( QString  name)
Parameters
namename to set

Definition at line 61 of file Node.cpp.

References _checkWidth(), and _instanceName.

void Node::setSelectedNode ( bool  s)
Parameters
sselect state

Definition at line 94 of file Node.cpp.

References _selectedNode, and changeConnectionLineColor().


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