19 #include <QGraphicsScene>
24 : QGraphicsPathItem(parent), m_port1(0), m_port2(0)
26 setFlag(QGraphicsItem::ItemIsSelectable,
true);
27 setPen(QPen(Qt::darkGray, 2));
28 setBrush(Qt::NoBrush);
79 QPointF ctr1(
pos1.x() + dx * 0.25,
pos1.y());
80 QPointF ctr2(
pos2.x() - dx * 0.25,
pos2.y());
81 p.cubicTo(ctr1, ctr2,
pos2);
113 painter->setPen(QPen(Qt::darkGray, 2));
114 painter->setBrush(Qt::NoBrush);
117 painter->setPen(Qt::DashLine);
120 painter->drawPath(path());
Defines the macro ASSERT.
#define ASSERT(condition)
Defines class ConnectableView.
Defines class NodeEditorConnection.
view of ISampleNode's with rectangular shape and node functionality
void setPort2(NodeEditorPort *p)
ConnectableView * getChildView()
returns child view, i.e. the view which owns output port of given connection
NodeEditorPort * inputPort()
void updatePosFromPorts()
NodeEditorPort * port2() const
NodeEditorPort * outputPort()
void setPos1(const QPointF &p)
void setPort1(NodeEditorPort *p)
virtual ~NodeEditorConnection()
ConnectableView * getParentView()
returns parent view, i.e. the view which owns input port of given connection
NodeEditorConnection(QGraphicsItem *parent=0, QGraphicsScene *scene=0)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
void setPos2(const QPointF &p)
NodeEditorPort * port1() const
void append(NodeEditorConnection *connection)
void remove(NodeEditorConnection *connection)