44 #ifndef VSI_CONNECTIONPOINT_HH 45 #define VSI_CONNECTIONPOINT_HH 48 #include <QGraphicsItem> 49 #include <QGraphicsLayoutItem> 50 #include <QGraphicsSceneMouseEvent> 67 class ConnectionPoint :
public QObject,
public QGraphicsEllipseItem,
public QGraphicsLayoutItem
70 Q_INTERFACES(QGraphicsLayoutItem)
81 OutputNotConnected = 5
106 void paint (QPainter *_painter,
const QStyleOptionGraphicsItem *_option, QWidget *_widget = 0);
111 void mousePressEvent (QGraphicsSceneMouseEvent *_event);
114 void hoverEnterEvent (QGraphicsSceneHoverEvent *_event);
115 void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event);
118 virtual QSizeF sizeHint ( Qt::SizeHint _which,
const QSizeF & _constraint = QSizeF())
const;
QPointF connectPos()
Position for connections.
State
State of the connection point.
~ConnectionPoint()
Destructor.
virtual void setGeometry(const QRectF &_rect)
Sets the geometry.
ConnectionPoint(ElementInOut *_e, QGraphicsItem *_parent)
Constructor.
void setWidth(int _width)
Sets the diameter.
void setState(State _state)
sets the state
ElementInOut * inOut() const
Input/output element.