2 #include <Scenario/Document/Interval/Slot.hpp>
3 #include <Scenario/Document/ScenarioDocument/ScenarioDocumentViewConstants.hpp>
5 #include <QGraphicsItem>
11 class IntervalPresenter;
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);
56 static const constexpr
int Type = ItemType::SlotFooter;
57 int type()
const final override {
return Type; }
59 int slotIndex()
const;
60 void setSlotIndex(
int);
61 static constexpr
double footerHeight() {
return 13.; }
63 QRectF boundingRect()
const override;
64 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
67 void setWidth(qreal width);
81 void mousePressEvent(QGraphicsSceneMouseEvent* event)
final override;
82 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
final override;
83 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
final override;
91 using SlotFooter::SlotFooter;
94 void mousePressEvent(QGraphicsSceneMouseEvent* event)
final override;
95 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
final override;
96 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
final override;
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;
Definition: IntervalPresenter.hpp:30
Definition: SlotHeader.hpp:102
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14