27 #include <QGraphicsItem>
29 #include <QGraphicsSceneWheelEvent>
30 #include <QGraphicsSceneMouseEvent>
32 #include <QMouseEvent>
36 class Node :
public QGraphicsItem {
62 void addProperty(QString name,QString displayname,
bool input);
66 void setId(
unsigned int id);
77 QPainter* painter,
const QStyleOptionGraphicsItem* option,
90 unsigned int getId()
const;
void setName(QString name)
resets the name of the node
void setSelectedNode(bool s)
sets the node selected or not
int getHeight() const
node height
unsigned int _id
id of the node
bool isSelectedNode()
state of node selections
QGraphicsItem that contains nodeproperties and draws the node.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
paints the node
void addProperty(QString name, bool input)
adds a property to the node
void setClassName(QString modname)
set node class name
void changeConnectionLineColor(QColor lineColor)
change color of connected line
int _nProps
number of properties in node
Declaration of class NodeProperty.
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
handles mouse move events
QMap< QString, NodeProperty * > _properties
list of nodeproperties
This model serves to provide a model frontend to access a ParameterFile instance. ...
QString getClassName() const
get class name
NodeProperty * getProperty(QString propName) const
get node property
int getWidth() const
node width
static unsigned int _idCount
static id counter for id creation
int _height
height of the node
bool _selectedNode
state of node selection
QRectF boundingRect() const
area where node is clickable
unsigned int getId() const
get node id
Property(/Parameter) of a node.
void setActive(bool activeStatus)
changes the nodes activity
QString getInstanceName()
get node name
int _width
width of the node
const ParameterFileModel * _pFile
link to parameter file
QString _className
name of the module the node is representing
void _checkWidth(int nChars=0)
checks the node width in reference to the node name
QString _instanceName
name of the node
void setId(unsigned int id)
sets the id of the node
bool _active
state of activity
Node(const ParameterFileModel *pFile, QString title, int xpos, int ypos)
default constructor