2 #include <Midi/MidiNote.hpp>
4 #include <QGraphicsItem>
12 Q_INTERFACES(QGraphicsItem)
18 void setWidth(qreal w) noexcept
22 prepareGeometryChange();
27 void setHeight(qreal h) noexcept
31 prepareGeometryChange();
36 QRectF boundingRect()
const override {
return {0, 0, m_width, m_height}; }
37 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
40 QRectF computeRect()
const noexcept;
41 QPointF closestPos(QPointF note)
const noexcept;
45 QVariant itemChange(GraphicsItemChange change,
const QVariant& value)
override;
46 void hoverEnterEvent(QGraphicsSceneHoverEvent* event)
override;
47 void hoverMoveEvent(QGraphicsSceneHoverEvent* event)
override;
48 void hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
override;
49 void mousePressEvent(QGraphicsSceneMouseEvent* event)
override;
50 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
override;
51 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
override;
The Note class.
Definition: MidiNote.hpp:59
Definition: MidiNoteView.hpp:11
Definition: MidiPresenter.hpp:19
Definition: MidiView.hpp:15