2 #include <Scenario/Document/Interval/FullView/Timebar.hpp>
3 #include <Scenario/Document/Interval/TimeSignatureMap.hpp>
5 #include <ossia/editor/scenario/time_signature.hpp>
7 #include <QGraphicsTextItem>
14 class MagnetismAdjuster;
20 class FullViewIntervalPresenter;
27 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
30 void keyPressEvent(QKeyEvent* ev)
override;
31 void keyReleaseEvent(QKeyEvent* ev)
override;
32 void focusOutEvent(QFocusEvent* event)
override;
33 void done(QString s) W_SIGNAL(done, s)
38 ,
public QGraphicsItem
45 QRectF boundingRect()
const final override;
47 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
50 void setSignature(
TimeVal time, ossia::time_signature sig);
53 const ossia::time_signature& signature()
const;
55 void move(
double originalPos,
double delta) W_SIGNAL(move, originalPos, delta);
56 void press() W_SIGNAL(press);
57 void release() W_SIGNAL(release);
58 void remove() W_SIGNAL(remove);
59 void signatureChange(ossia::time_signature sig) W_SIGNAL(signatureChange, sig);
66 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* mv)
override;
68 ossia::time_signature m_sig{0, 0};
78 ,
public QGraphicsItem
85 QRectF boundingRect()
const final override;
87 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
90 void move(
double originalPos,
double delta) W_SIGNAL(move, originalPos, delta);
91 void press() W_SIGNAL(press);
92 void release() W_SIGNAL(release);
93 void remove() W_SIGNAL(remove);
95 void mousePressEvent(QGraphicsSceneMouseEvent* mv)
override;
96 void mouseMoveEvent(QGraphicsSceneMouseEvent* mv)
override;
97 void mouseReleaseEvent(QGraphicsSceneMouseEvent* mv)
override;
102 double m_origItemX{};
110 using TimeSignatureHandle::TimeSignatureHandle;
116 using TimeSignatureHandle::TimeSignatureHandle;
119 double m_origItemX{};
122 void mousePressEvent(QGraphicsSceneMouseEvent* mv)
override;
123 void mouseMoveEvent(QGraphicsSceneMouseEvent* mv)
override;
124 void mouseReleaseEvent(QGraphicsSceneMouseEvent* mv)
override;
129 ,
public QGraphicsItem
134 void createHandle(
TimeVal time, ossia::time_signature sig);
135 void setZoomRatio(ZoomRatio r);
136 void setWidth(
double w);
138 void updateStartMarker();
141 void handlesChanged();
146 QRectF boundingRect()
const final override;
147 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
149 void requestNewHandle(QPointF pos);
150 void setStartMarker(QPointF pos);
151 void removeStartMarker();
152 void contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
override;
154 double m_width{100.};
155 ZoomRatio m_ratio{1.};
163 std::vector<TimeSignatureHandle*> m_handles;
167 ossia::time_signature m_origSig{};
179 std::vector<TimeVal> magneticTimings;
Definition: MagnetismAdjuster.hpp:24
Definition: TimeSignatureItem.hpp:108
Definition: FullViewIntervalPresenter.hpp:30
Definition: IntervalModel.hpp:50
Definition: Timebar.hpp:14
Definition: Timebar.hpp:59
Definition: TimeSignatureItem.hpp:22
Definition: TimeSignatureItem.hpp:114
Definition: TimeSignatureItem.hpp:79
Definition: TimeSignatureItem.hpp:39
Definition: TimeSignatureItem.hpp:130
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: TimeSignatureMap.hpp:26
Definition: TimeSignatureItem.hpp:172
Definition: TimeValue.hpp:21