2 #include <Scenario/Document/ScenarioDocument/ScenarioDocumentViewConstants.hpp>
3 #include <Scenario/Document/VerticalExtent.hpp>
5 #include <score/graphics/TextItem.hpp>
7 #include <QGraphicsItem>
9 #include <score_plugin_scenario_export.h>
10 class QGraphicsSceneMouseEvent;
12 class QStyleOptionGraphicsItem;
17 class TimeSyncPresenter;
19 class SCORE_PLUGIN_SCENARIO_EXPORT
TimeSyncView final :
public QGraphicsItem
25 static const constexpr
int Type = ItemType::TimeSync;
26 int type()
const final override {
return Type; }
30 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
34 QRectF boundingRect()
const override
36 return {-3., 0., 6., m_extent.bottom() - m_extent.top()};
41 void setTriggerActive(
bool);
42 void addPoint(
int newY);
45 void setSelected(
bool selected);
47 bool isSelected()
const {
return m_selected; }
50 void setLabel(
const QString& label);
53 void mousePressEvent(QGraphicsSceneMouseEvent* event)
override;
54 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
override;
55 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
override;
62 QPointF m_clickedPoint{};
Definition: TimeSyncPresenter.hpp:29
Definition: TimeSyncView.hpp:20
Definition: TextItem.hpp:28
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
The VerticalExtent struct.
Definition: VerticalExtent.hpp:20