36 ,
public QGraphicsItem
39 Q_INTERFACES(QGraphicsItem)
42 static bool g_cables_enabled;
45 QGraphicsItem* parent =
nullptr);
50 static const constexpr int Type = QGraphicsItem::UserType + 9999;
51 int type()
const final override {
return Type; }
53 enum class GrabbedEnd : uint8_t
63 static GrabbedEnd endNear(QPointF scenePos, QPointF p1, QPointF p2)
noexcept;
68 static double grabZoneRadius(QPointF p1, QPointF p2)
noexcept;
91 void dropReceived(
const QPointF& pos,
const QMimeData& arg_2)
92 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, dropReceived, pos, arg_2)
95 QRectF boundingRect()
const override;
96 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
98 QPainterPath shape()
const override;
99 QPainterPath opaqueArea()
const override;
100 bool contains(
const QPointF& point)
const override;
101 void mousePressEvent(QGraphicsSceneMouseEvent* event)
override;
102 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
override;
103 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
override;
104 void hoverMoveEvent(QGraphicsSceneHoverEvent* event)
override;
105 void hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
override;
106 void dragEnterEvent(QGraphicsSceneDragDropEvent* event)
override;
107 void dragLeaveEvent(QGraphicsSceneDragDropEvent* event)
override;
108 void dropEvent(QGraphicsSceneDragDropEvent* event)
override;
109 void keyPressEvent(QKeyEvent* event)
override;
110 void keyReleaseEvent(QKeyEvent* event)
override;
113 void updateStroke()
const;
116 QPointer<PortItem> m_p1, m_p2;
118 mutable QPainterPath m_stroke;
119 Process::PortType m_type : 4 {};
120 bool m_dropping : 1 {};
121 CableDisplayMode m_mode : 2 {CableDisplayMode::None};
Definition ProcessContext.hpp:12