2 #include <score/model/IdentifiedObjectMap.hpp>
3 #include <score/model/Identifier.hpp>
5 #include <QGraphicsItem>
6 #include <QPainterPath>
10 #include <score_plugin_curve_export.h>
13 class QGraphicsSceneContextMenuEvent;
15 class QStyleOptionGraphicsItem;
25 ,
public QGraphicsItem
28 Q_INTERFACES(QGraphicsItem)
35 static const constexpr
int Type = QGraphicsItem::UserType + 101;
36 int type()
const final override {
return Type; }
38 QRectF boundingRect()
const override;
39 QPainterPath shape()
const override;
40 QPainterPath opaqueArea()
const override;
41 bool contains(
const QPointF& pt)
const override;
43 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
49 void setRect(
const QRectF& theRect);
51 void setSelected(
bool selected);
56 void setTween(
bool b);
59 void contextMenuRequested(
const QPoint& arg_1,
const QPointF& arg_2)
60 E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, contextMenuRequested, arg_1, arg_2)
63 void contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
override;
66 void recomputeStroke()
const;
78 QPainterPath m_unstrokedShape;
79 mutable QPainterPath m_strokedShape;
84 mutable bool m_needsRecompute{
false};
88 #if !defined(SCORE_ALL_UNITY)
Definition: CurveSegmentModel.hpp:32
Definition: CurveSegmentView.hpp:26
The id_base_t class.
Definition: Identifier.hpp:57
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Definition: CurveStyle.hpp:13