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

#include <pianolevels.h>

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

Public Slots

void setXpos (int)
 
void setTuplet (int)
 
void setSubdiv (int)
 
void setXZoom (qreal)
 
void setPos (const Pos &)
 
void setLevelsIndex (int index)
 

Signals

void posChanged (const Pos &)
 
void tupletChanged (int)
 
void subdivChanged (int)
 
void levelsIndexChanged (int)
 
void locatorMoved (int idx, const Pos &)
 
void noteLevelsChanged ()
 

Public Member Functions

 PianoLevels (QWidget *parent=0)
 
 ~PianoLevels ()
 
void setScore (Score *, Pos *locator)
 
Staffstaff ()
 
void setStaff (Staff *, Pos *locator)
 
void updateNotes ()
 
int tuplet () const
 
int subdiv () const
 
int xpos () const
 
qreal xZoom () const
 

Private Types

enum  DragStyle { LERP, OFFSET }
 

Private Member Functions

virtual void paintEvent (QPaintEvent *)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void leaveEvent (QEvent *)
 
int pixelXToTick (int pixX)
 
int tickToPixelX (int tick)
 
int valToPixelY (int value)
 
int pixelYToVal (int value)
 
int noteStartTick (Note *note, NoteEvent *evt)
 
void moveLocator (QMouseEvent *)
 
void addChord (Chord *chord, int voice)
 
void clearNoteData ()
 
bool pickNoteEvent (int x, int y, bool selectedOnly, Note *&pickedNote, NoteEvent *&pickedNoteEvent)
 
void adjustLevelLerp (int tick0, int value0, int tick1, int value1, bool selectedOnly=true)
 
void adjustLevel (Note *note, NoteEvent *noteEvt, int value)
 

Private Attributes

Score_score
 
int _xpos
 
qreal _xZoom
 
Pos _cursor
 
Pos_locator
 
Staff_staff
 
int _tuplet
 
int _subdiv
 
int _levelsIndex
 
int vMargin
 
int levelLen
 
int pickRadius = 4
 
bool mouseDown
 
QPointF mouseDownPos
 
QPointF lastMousePos
 
int dragging = false
 
DragStyle dragStyle = DragStyle::OFFSET
 
NotesingleNoteDrag = nullptr
 
NoteEventsingleNoteEventDrag = nullptr
 
int minBeatGap
 
QList< Note * > noteList
 

Member Enumeration Documentation

◆ DragStyle

Enumerator
LERP 
OFFSET 

Constructor & Destructor Documentation

◆ PianoLevels()

Ms::PianoLevels::PianoLevels ( QWidget *  parent = 0)

◆ ~PianoLevels()

Ms::PianoLevels::~PianoLevels ( )

Member Function Documentation

◆ addChord()

void Ms::PianoLevels::addChord ( Chord chord,
int  voice 
)
private

◆ adjustLevel()

void Ms::PianoLevels::adjustLevel ( Note note,
NoteEvent noteEvt,
int  value 
)
private

◆ adjustLevelLerp()

void Ms::PianoLevels::adjustLevelLerp ( int  tick0,
int  value0,
int  tick1,
int  value1,
bool  selectedOnly = true 
)
private

◆ clearNoteData()

void Ms::PianoLevels::clearNoteData ( )
private

◆ leaveEvent()

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

◆ levelsIndexChanged

void Ms::PianoLevels::levelsIndexChanged ( int  )
signal

◆ locatorMoved

void Ms::PianoLevels::locatorMoved ( int  idx,
const Pos  
)
signal

◆ mouseMoveEvent()

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

◆ mousePressEvent()

void Ms::PianoLevels::mousePressEvent ( QMouseEvent *  e)
privatevirtual

◆ mouseReleaseEvent()

void Ms::PianoLevels::mouseReleaseEvent ( QMouseEvent *  event)
privatevirtual

◆ moveLocator()

void Ms::PianoLevels::moveLocator ( QMouseEvent *  e)
private

◆ noteLevelsChanged

void Ms::PianoLevels::noteLevelsChanged ( )
signal

◆ noteStartTick()

int Ms::PianoLevels::noteStartTick ( Note note,
NoteEvent evt 
)
private

◆ paintEvent()

void Ms::PianoLevels::paintEvent ( QPaintEvent *  e)
privatevirtual

◆ pickNoteEvent()

bool Ms::PianoLevels::pickNoteEvent ( int  x,
int  y,
bool  selectedOnly,
Note *&  pickedNote,
NoteEvent *&  pickedNoteEvent 
)
private

◆ pixelXToTick()

int Ms::PianoLevels::pixelXToTick ( int  pixX)
private

◆ pixelYToVal()

int Ms::PianoLevels::pixelYToVal ( int  value)
private

◆ posChanged

void Ms::PianoLevels::posChanged ( const Pos )
signal

◆ setLevelsIndex

void Ms::PianoLevels::setLevelsIndex ( int  index)
slot

◆ setPos

void Ms::PianoLevels::setPos ( const Pos pos)
slot

◆ setScore()

void Ms::PianoLevels::setScore ( Score s,
Pos locator 
)

◆ setStaff()

void Ms::PianoLevels::setStaff ( Staff s,
Pos locator 
)

◆ setSubdiv

void Ms::PianoLevels::setSubdiv ( int  value)
slot

◆ setTuplet

void Ms::PianoLevels::setTuplet ( int  value)
slot

◆ setXpos

void Ms::PianoLevels::setXpos ( int  val)
slot

◆ setXZoom

void Ms::PianoLevels::setXZoom ( qreal  xZoom)
slot

◆ staff()

Staff* Ms::PianoLevels::staff ( )
inline

◆ subdiv()

int Ms::PianoLevels::subdiv ( ) const
inline

◆ subdivChanged

void Ms::PianoLevels::subdivChanged ( int  )
signal

◆ tickToPixelX()

int Ms::PianoLevels::tickToPixelX ( int  tick)
private

◆ tuplet()

int Ms::PianoLevels::tuplet ( ) const
inline

◆ tupletChanged

void Ms::PianoLevels::tupletChanged ( int  )
signal

◆ updateNotes()

void Ms::PianoLevels::updateNotes ( )

◆ valToPixelY()

int Ms::PianoLevels::valToPixelY ( int  value)
private

◆ xpos()

int Ms::PianoLevels::xpos ( ) const
inline

◆ xZoom()

qreal Ms::PianoLevels::xZoom ( ) const
inline

Member Data Documentation

◆ _cursor

Pos Ms::PianoLevels::_cursor
private

◆ _levelsIndex

int Ms::PianoLevels::_levelsIndex
private

◆ _locator

Pos* Ms::PianoLevels::_locator
private

◆ _score

Score* Ms::PianoLevels::_score
private

◆ _staff

Staff* Ms::PianoLevels::_staff
private

◆ _subdiv

int Ms::PianoLevels::_subdiv
private

◆ _tuplet

int Ms::PianoLevels::_tuplet
private

◆ _xpos

int Ms::PianoLevels::_xpos
private

◆ _xZoom

qreal Ms::PianoLevels::_xZoom
private

◆ dragging

int Ms::PianoLevels::dragging = false
private

◆ dragStyle

DragStyle Ms::PianoLevels::dragStyle = DragStyle::OFFSET
private

◆ lastMousePos

QPointF Ms::PianoLevels::lastMousePos
private

◆ levelLen

int Ms::PianoLevels::levelLen
private

◆ minBeatGap

int Ms::PianoLevels::minBeatGap
private

◆ mouseDown

bool Ms::PianoLevels::mouseDown
private

◆ mouseDownPos

QPointF Ms::PianoLevels::mouseDownPos
private

◆ noteList

QList<Note*> Ms::PianoLevels::noteList
private

◆ pickRadius

int Ms::PianoLevels::pickRadius = 4
private

◆ singleNoteDrag

Note* Ms::PianoLevels::singleNoteDrag = nullptr
private

◆ singleNoteEventDrag

NoteEvent* Ms::PianoLevels::singleNoteEventDrag = nullptr
private

◆ vMargin

int Ms::PianoLevels::vMargin
private

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