50 #ifndef VSI_CONNECTIONPOINT_HH 51 #define VSI_CONNECTIONPOINT_HH 54 #include <QGraphicsItem> 55 #include <QGraphicsLayoutItem> 56 #include <QGraphicsSceneMouseEvent> 73 class ConnectionPoint :
public QObject,
public QGraphicsEllipseItem,
public QGraphicsLayoutItem
76 Q_INTERFACES(QGraphicsLayoutItem)
87 OutputNotConnected = 5
112 void paint (QPainter *_painter,
const QStyleOptionGraphicsItem *_option, QWidget *_widget = 0);
117 void mousePressEvent (QGraphicsSceneMouseEvent *_event);
120 void hoverEnterEvent (QGraphicsSceneHoverEvent *_event);
121 void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event);
124 virtual QSizeF sizeHint ( Qt::SizeHint _which,
const QSizeF & _constraint = QSizeF())
const;
virtual void setGeometry(const QRectF &_rect)
Sets the geometry.
QPointF connectPos()
Position for connections.
State
State of the connection point.
void setState(State _state)
sets the state
void setWidth(int _width)
Sets the diameter.
~ConnectionPoint()
Destructor.
ConnectionPoint(ElementInOut *_e, QGraphicsItem *_parent)
Constructor.
ElementInOut * inOut() const
Input/output element.