24 #ifndef NODEPROPERTY_H_
25 #define NODEPROPERTY_H_
27 #include <QGraphicsItem>
46 Node* parentNode, QString name,
47 int propNr,
bool input,
59 Node* parentNode, QString name,QString displayname,
60 int propNr,
bool input,
69 void moveBy(qreal dx,qreal dy);
96 const QStyleOptionGraphicsItem* option,
QString _name
name of the property
QString _displayname
name of the property
QGraphicsItem that contains nodeproperties and draws the node.
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
update tool tip
bool _isInput
pointer to PropType of the property
bool canConnect(NodeProperty *prop)
checks if connection is possible
QPointF getSocketCenter() const
socket center including node position
void addConnection(ConnectionLine *cl)
add a connectionline to the property
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
draws the property
bool isInput() const
returns the PropType of the property
This model serves to provide a model frontend to access a ParameterFile instance. ...
QString getFullName() const
property name including node instance name
QList< ConnectionLine * > _connectionList
list of all connectionlines
static QColor _getSocketColor(QString typeName)
get color from type
void moveBy(qreal dx, qreal dy)
moves the property and if connected all connectionlines
Line that connects two slots of two different nodes.
QColor _color
Socket color.
unsigned int _propNr
number of property
Property(/Parameter) of a node.
virtual QRectF boundingRect() const
area for hover event
QRectF _getSocketRect() const
center of the socket, used to draw end and start of connectionline
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
clear color of connected line when leave hoverevent
void setColor(QColor socketColor)
Set the color of the socket.
const ParameterFileModel * _pFile
link to parameter file
QString getType() const
get property type
void changeConnectionLineColor(QColor lineColor, bool isHover=true)
change color all connected line of hovering property isHover set to true when the property was hovere...
Node * _node
pointer to parent node
NodeProperty(Node *parentNode, QString name, int propNr, bool input, const ParameterFileModel *pFile)
default constructor