20 #ifndef __TIMELINE_H__ 21 #define __TIMELINE_H__ 81 bool dragging =
false;
85 std::tuple<QGraphicsPixmapItem*, MouseOverValue, unsigned int>
old_item_info;
87 virtual void resizeEvent(QResizeEvent*);
88 virtual void mousePressEvent(QMouseEvent* event);
89 virtual void mouseMoveEvent(QMouseEvent* event);
90 virtual void mouseReleaseEvent(QMouseEvent* event);
91 virtual void contextMenuEvent(QContextMenuEvent*)
override;
92 virtual void leaveEvent(QEvent*);
95 void restrict_scroll(
int value);
98 void mouseOver(QPointF scene_pt);
101 void moved(QPointF p);
102 void swapMeta(
unsigned int r,
bool up);
103 void requestContextMenu(QContextMenuEvent*);
107 void updateLabels(std::vector<std::pair<QString, bool>> labels,
int height);
108 QString cursorIsOn();
119 int grid_height = 20;
128 bool is_barline =
false;
141 bool mouse_pressed =
false;
144 bool collapsed_meta =
false;
146 std::vector<std::tuple<QString, void (Timeline::*)(Segment*, int*, int), bool>>
metas;
147 void tempo_meta(
Segment* seg,
int* stagger,
int pos);
148 void time_meta(
Segment* seg,
int* stagger,
int pos);
149 void measure_meta(
Segment*,
int*,
int pos);
150 void rehearsal_meta(
Segment* seg,
int* stagger,
int pos);
151 void key_meta(
Segment* seg,
int* stagger,
int pos);
152 void barline_meta(
Segment* seg,
int* stagger,
int pos);
153 void jump_marker_meta(
Segment* seg,
int* stagger,
int pos);
155 bool addMetaValue(
int x,
int pos, QString meta_text,
int row,
ElementType element_type,
Element* element,
Segment* seg,
Measure* measure, QString tooltip =
"");
156 void setMetaData(QGraphicsItem* gi,
int staff,
ElementType et,
Measure* m,
bool full_measure,
Element* e, QGraphicsItem* pair_item =
nullptr,
Segment* seg =
nullptr);
157 unsigned int getMetaRow(QString target_text);
159 int global_measure_number { 0 };
160 int global_z_value { 0 };
163 bool meta_value =
false;
166 virtual void mousePressEvent(QMouseEvent* event);
167 virtual void mouseMoveEvent(QMouseEvent* event);
168 virtual void mouseReleaseEvent(QMouseEvent*);
169 virtual void wheelEvent(QWheelEvent *event);
170 virtual void leaveEvent(QEvent*);
172 unsigned int correctMetaRow(
unsigned int row);
173 int correctStave(
int stave);
175 QList<Part*> getParts();
178 void handle_scroll(
int value);
180 void objectDestroyed(QObject*);
184 void mouseOver(QPointF pos);
185 void swapMeta(
unsigned int row,
bool switch_up);
186 virtual void contextMenuEvent(QContextMenuEvent* event)
override;
187 void requestInstrumentDialog();
188 void toggleMetaRow();
195 int correctPart(
int stave);
197 void drawSelection();
198 void drawGrid(
int global_rows,
int global_cols);
200 void setScore(
Score* s);
210 QColor colorBox(QGraphicsRectItem* item);
212 std::vector<std::pair<QString, bool>> getLabels();
214 unsigned int nmetas();
219 Staff* numToStaff(
int staff);
220 void toggleShow(
int staff);
221 QString cursorIsOn();
Definition: timeline.h:115
Global staff data not directly related to drawing.
Definition: staff.h:62
SelState
Definition: select.h:71
Definition: timeline.h:60
std::vector< std::pair< QGraphicsItem *, int > > meta_labels
Definition: timeline.h:83
std::tuple< QGraphicsPixmapItem *, MouseOverValue, unsigned int > old_item_info
Definition: timeline.h:85
one measure in a system
Definition: measure.h:65
Definition: scoreview.h:90
ViewState
Definition: scoreview.h:68
MouseOverValue
Definition: timeline.h:64
Base class of score layout elements.
Definition: element.h:158
QGraphicsRectItem * selection_box
Definition: timeline.h:136
std::tuple< QGraphicsItem *, int, QColor > old_hover_info
Definition: timeline.h:125
TDockWidget * scrollArea
Definition: timeline.h:76
std::vector< std::pair< QGraphicsItem *, int > > meta_rows
Definition: timeline.h:137
bool collapsed()
Definition: timeline.h:216
TDockWidget * scrollArea
Definition: timeline.h:130
Score * _score
Definition: timeline.h:133
QPainterPath selection_path
Definition: timeline.h:139
void setCollapsed(bool st)
Definition: timeline.h:217
Definition: aeolus.cpp:26
Timeline * parent
Definition: timeline.h:77
std::map< QString, QPixmap * > barlines
Definition: timeline.h:127
TRowLabels * row_names
Definition: timeline.h:131
QPoint old_loc
Definition: timeline.h:142
std::map< MouseOverValue, QPixmap * > mouseover_map
Definition: timeline.h:84
QRectF old_selection_rect
Definition: timeline.h:140
std::tuple< int, qreal, Element *, Element *, bool > repeat_info
Definition: timeline.h:124
ElementType
Definition: types.h:34
std::vector< std::tuple< QString, void(Timeline::*)(Segment *, int *, int), bool > > metas
Definition: timeline.h:146
QPoint old_loc
Definition: timeline.h:79