25 #include <QPainterPath>
77 QPainter* painter,
const QStyleOptionGraphicsItem*, QWidget*) {
83 painter->setBrush(Qt::NoBrush);
88 p.setStyle(Qt::DashLine);
91 painter->setOpacity(1);
92 painter->drawPath(path);
QPointF _startPoint
point where line starts
void setEndProp(NodeProperty *endProp)
sets end property
NodeProperty * getEndProp() const
get property at end of line
QColor _lColor
store color
Declaration of class Node.
NodeProperty * getStartProp() const
get property at start of line
NodeProperty * _endProp
property where line ends
void setLineColor(const QColor &newColor)
set color connected line
NodeProperty * _startProp
property where line starts
QPointF _endPoint
point where line ends
QRectF boundingRect() const
bounding Rect, always 0 to be not selectable
Declaration of class NodeProperty.
void setStartProp(NodeProperty *startProp)
sets start property
void setStartPoint(int x, int y)
sets start point (for drawing)
Declaration of class ConnectionLine.
void moveEndPoint(qreal dx, qreal dy)
moves end point
void moveStartPoint(qreal dx, qreal dy)
moves start point
Property(/Parameter) of a node.
ConnectionLine()
Default constructor.
void setStartEndProp(NodeProperty *start, NodeProperty *end)
sets start and end property
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
paints the line
QColor lineColor() const
return line color
void setEndPoint(int x, int y)
sets end point (for drawing)