MuseScore  3.4
Music composition and notation
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
Ms::Timeline Class Reference

#include <timeline.h>

Inheritance diagram for Ms::Timeline:
Inheritance graph
[legend]
Collaboration diagram for Ms::Timeline:
Collaboration graph
[legend]

Public Slots

void changeSelection (SelState)
 
void mouseOver (QPointF pos)
 
void swapMeta (unsigned int row, bool switch_up)
 
virtual void contextMenuEvent (QContextMenuEvent *event) override
 
void requestInstrumentDialog ()
 
void toggleMetaRow ()
 

Signals

void moved (QPointF)
 

Public Member Functions

 Timeline (TDockWidget *dock_widget, QWidget *parent=0)
 
int correctPart (int stave)
 
void drawSelection ()
 
void drawGrid (int global_rows, int global_cols)
 
void setScore (Score *s)
 
void setScoreView (ScoreView *sv)
 
int nstaves ()
 
int getWidth ()
 
int getHeight ()
 
void updateGrid ()
 
QColor colorBox (QGraphicsRectItem *item)
 
std::vector< std::pair< QString, bool > > getLabels ()
 
unsigned int nmetas ()
 
bool collapsed ()
 
void setCollapsed (bool st)
 
StaffnumToStaff (int staff)
 
void toggleShow (int staff)
 
QString cursorIsOn ()
 

Private Slots

void handle_scroll (int value)
 
void updateView ()
 
void objectDestroyed (QObject *)
 

Private Member Functions

void tempo_meta (Segment *seg, int *stagger, int pos)
 
void time_meta (Segment *seg, int *stagger, int pos)
 
void measure_meta (Segment *, int *, int pos)
 
void rehearsal_meta (Segment *seg, int *stagger, int pos)
 
void key_meta (Segment *seg, int *stagger, int pos)
 
void barline_meta (Segment *seg, int *stagger, int pos)
 
void jump_marker_meta (Segment *seg, int *stagger, int pos)
 
bool addMetaValue (int x, int pos, QString meta_text, int row, ElementType element_type, Element *element, Segment *seg, Measure *measure, QString tooltip="")
 
void setMetaData (QGraphicsItem *gi, int staff, ElementType et, Measure *m, bool full_measure, Element *e, QGraphicsItem *pair_item=nullptr, Segment *seg=nullptr)
 
unsigned int getMetaRow (QString target_text)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void leaveEvent (QEvent *)
 
unsigned int correctMetaRow (unsigned int row)
 
int correctStave (int stave)
 
QList< Part * > getParts ()
 

Private Attributes

int grid_width = 20
 
int grid_height = 20
 
int max_zoom = 50
 
int min_zoom = 5
 
int spacing = 5
 
std::tuple< int, qreal, Element *, Element *, bool > repeat_info
 
std::tuple< QGraphicsItem *, int, QColor > old_hover_info
 
std::map< QString, QPixmap * > barlines
 
bool is_barline = false
 
TDockWidgetscrollArea
 
TRowLabelsrow_names
 
Score_score
 
ScoreView_cv = nullptr
 
QGraphicsRectItem * selection_box
 
std::vector< std::pair< QGraphicsItem *, int > > meta_rows
 
QPainterPath selection_path
 
QRectF old_selection_rect
 
bool mouse_pressed = false
 
QPoint old_loc
 
bool collapsed_meta = false
 
std::vector< std::tuple< QString, void(Timeline::*)(Segment *, int *, int), bool > > metas
 
int global_measure_number { 0 }
 
int global_z_value { 0 }
 
bool meta_value = false
 
ViewState state = ViewState::NORMAL
 

Constructor & Destructor Documentation

◆ Timeline()

Ms::Timeline::Timeline ( TDockWidget dock_widget,
QWidget *  parent = 0 
)

Member Function Documentation

◆ addMetaValue()

bool Ms::Timeline::addMetaValue ( int  x,
int  pos,
QString  meta_text,
int  row,
ElementType  element_type,
Element element,
Segment seg,
Measure measure,
QString  tooltip = "" 
)
private

◆ barline_meta()

void Ms::Timeline::barline_meta ( Segment seg,
int *  stagger,
int  pos 
)
private

◆ changeSelection

void Ms::Timeline::changeSelection ( SelState  )
slot

◆ collapsed()

bool Ms::Timeline::collapsed ( )
inline

◆ colorBox()

QColor Ms::Timeline::colorBox ( QGraphicsRectItem *  item)

◆ contextMenuEvent

void Ms::Timeline::contextMenuEvent ( QContextMenuEvent *  event)
overridevirtualslot

◆ correctMetaRow()

unsigned int Ms::Timeline::correctMetaRow ( unsigned int  row)
private

◆ correctPart()

int Ms::Timeline::correctPart ( int  stave)

◆ correctStave()

int Ms::Timeline::correctStave ( int  stave)
private

◆ cursorIsOn()

QString Ms::Timeline::cursorIsOn ( )

◆ drawGrid()

void Ms::Timeline::drawGrid ( int  global_rows,
int  global_cols 
)

◆ drawSelection()

void Ms::Timeline::drawSelection ( )

◆ getHeight()

int Ms::Timeline::getHeight ( )

◆ getLabels()

std::vector< std::pair< QString, bool > > Ms::Timeline::getLabels ( )

◆ getMetaRow()

unsigned int Ms::Timeline::getMetaRow ( QString  target_text)
private

◆ getParts()

QList< Part * > Ms::Timeline::getParts ( )
private

◆ getWidth()

int Ms::Timeline::getWidth ( )

◆ handle_scroll

void Ms::Timeline::handle_scroll ( int  value)
privateslot

◆ jump_marker_meta()

void Ms::Timeline::jump_marker_meta ( Segment seg,
int *  stagger,
int  pos 
)
private

◆ key_meta()

void Ms::Timeline::key_meta ( Segment seg,
int *  stagger,
int  pos 
)
private

◆ leaveEvent()

void Ms::Timeline::leaveEvent ( QEvent *  )
privatevirtual

◆ measure_meta()

void Ms::Timeline::measure_meta ( Segment ,
int *  ,
int  pos 
)
private

◆ mouseMoveEvent()

void Ms::Timeline::mouseMoveEvent ( QMouseEvent *  event)
privatevirtual

◆ mouseOver

void Ms::Timeline::mouseOver ( QPointF  pos)
slot

◆ mousePressEvent()

void Ms::Timeline::mousePressEvent ( QMouseEvent *  event)
privatevirtual

◆ mouseReleaseEvent()

void Ms::Timeline::mouseReleaseEvent ( QMouseEvent *  )
privatevirtual

◆ moved

void Ms::Timeline::moved ( QPointF  )
signal

◆ nmetas()

unsigned int Ms::Timeline::nmetas ( )

◆ nstaves()

int Ms::Timeline::nstaves ( )

◆ numToStaff()

Staff * Ms::Timeline::numToStaff ( int  staff)

◆ objectDestroyed

void Ms::Timeline::objectDestroyed ( QObject *  obj)
privateslot

◆ rehearsal_meta()

void Ms::Timeline::rehearsal_meta ( Segment seg,
int *  stagger,
int  pos 
)
private

◆ requestInstrumentDialog

void Ms::Timeline::requestInstrumentDialog ( )
slot

◆ setCollapsed()

void Ms::Timeline::setCollapsed ( bool  st)
inline

◆ setMetaData()

void Ms::Timeline::setMetaData ( QGraphicsItem *  gi,
int  staff,
ElementType  et,
Measure m,
bool  full_measure,
Element e,
QGraphicsItem *  pair_item = nullptr,
Segment seg = nullptr 
)
private

◆ setScore()

void Ms::Timeline::setScore ( Score s)

◆ setScoreView()

void Ms::Timeline::setScoreView ( ScoreView sv)

◆ swapMeta

void Ms::Timeline::swapMeta ( unsigned int  row,
bool  switch_up 
)
slot

◆ tempo_meta()

void Ms::Timeline::tempo_meta ( Segment seg,
int *  stagger,
int  pos 
)
private

◆ time_meta()

void Ms::Timeline::time_meta ( Segment seg,
int *  stagger,
int  pos 
)
private

◆ toggleMetaRow

void Ms::Timeline::toggleMetaRow ( )
slot

◆ toggleShow()

void Ms::Timeline::toggleShow ( int  staff)

◆ updateGrid()

void Ms::Timeline::updateGrid ( )

◆ updateView

void Ms::Timeline::updateView ( )
privateslot

◆ wheelEvent()

void Ms::Timeline::wheelEvent ( QWheelEvent *  event)
privatevirtual

Member Data Documentation

◆ _cv

ScoreView* Ms::Timeline::_cv = nullptr
private

◆ _score

Score* Ms::Timeline::_score
private

◆ barlines

std::map<QString, QPixmap*> Ms::Timeline::barlines
private

◆ collapsed_meta

bool Ms::Timeline::collapsed_meta = false
private

◆ global_measure_number

int Ms::Timeline::global_measure_number { 0 }
private

◆ global_z_value

int Ms::Timeline::global_z_value { 0 }
private

◆ grid_height

int Ms::Timeline::grid_height = 20
private

◆ grid_width

int Ms::Timeline::grid_width = 20
private

◆ is_barline

bool Ms::Timeline::is_barline = false
private

◆ max_zoom

int Ms::Timeline::max_zoom = 50
private

◆ meta_rows

std::vector<std::pair<QGraphicsItem*, int> > Ms::Timeline::meta_rows
private

◆ meta_value

bool Ms::Timeline::meta_value = false
private

◆ metas

std::vector<std::tuple<QString, void (Timeline::*)(Segment*, int*, int), bool> > Ms::Timeline::metas
private

◆ min_zoom

int Ms::Timeline::min_zoom = 5
private

◆ mouse_pressed

bool Ms::Timeline::mouse_pressed = false
private

◆ old_hover_info

std::tuple<QGraphicsItem*, int, QColor> Ms::Timeline::old_hover_info
private

◆ old_loc

QPoint Ms::Timeline::old_loc
private

◆ old_selection_rect

QRectF Ms::Timeline::old_selection_rect
private

◆ repeat_info

std::tuple<int, qreal, Element*, Element*, bool> Ms::Timeline::repeat_info
private

◆ row_names

TRowLabels* Ms::Timeline::row_names
private

◆ scrollArea

TDockWidget* Ms::Timeline::scrollArea
private

◆ selection_box

QGraphicsRectItem* Ms::Timeline::selection_box
private

◆ selection_path

QPainterPath Ms::Timeline::selection_path
private

◆ spacing

int Ms::Timeline::spacing = 5
private

◆ state

ViewState Ms::Timeline::state = ViewState::NORMAL
private

The documentation for this class was generated from the following files: