18 static const constexpr int Type = ItemType::SlotHeader;
19 int type()
const final override {
return Type; }
21 int slotIndex()
const;
22 void setSlotIndex(
int);
23 static constexpr double headerHeight() {
return 16.; }
24 static constexpr double handleWidth() {
return 16.; }
25 static constexpr double menuWidth() {
return 16.; }
27 QRectF boundingRect()
const override;
28 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
31 void setWidth(qreal width);
35 void mousePressEvent(QGraphicsSceneMouseEvent* event)
final override;
36 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
final override;
37 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
final override;
39 void hoverEnterEvent(QGraphicsSceneHoverEvent* event)
override;
40 void hoverMoveEvent(QGraphicsSceneHoverEvent* event)
override;
41 void hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
override;
47 QByteArray dragMimeData(
bool temporal);
101 ,
public QGraphicsItem
109 QRectF boundingRect()
const override;
111 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
114 void dropBefore(
int slot) W_SIGNAL(dropBefore, slot);
115 void dropIn(
int slot) W_SIGNAL(dropIn, slot);
117 void onDrag(QPointF pos);
120 void dragEnterEvent(QGraphicsSceneDragDropEvent* event)
override;
121 void dragMoveEvent(QGraphicsSceneDragDropEvent* event)
override;
122 void dragLeaveEvent(QGraphicsSceneDragDropEvent* event)
override;
124 void dropEvent(QGraphicsSceneDragDropEvent* event)
override;