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

#include <pianoview.h>

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

Public Slots

void moveLocator (int)
 
void updateNotes ()
 
void setXZoom (int)
 
void setTuplet (int)
 
void setSubdiv (int)
 
void setBarPattern (int)
 

Signals

void xZoomChanged (qreal)
 
void tupletChanged (int)
 
void subdivChanged (int)
 
void barPatternChanged (int)
 
void noteHeightChanged (int)
 
void pitchChanged (int)
 
void trackingPosChanged (const Pos &)
 
void selectionChanged ()
 

Public Member Functions

 PianoView ()
 
 ~PianoView ()
 
Staffstaff ()
 
void setStaff (Staff *, Pos *locator)
 
void ensureVisible (int tick)
 
int noteHeight ()
 
qreal xZoom ()
 
int tuplet ()
 
int subdiv ()
 
int barPattern ()
 
QList< QGraphicsItem * > items ()
 
int pixelXToTick (int pixX)
 
int tickToPixelX (int tick)
 
int pixelYToPitch (int pixY)
 
PianoItempickNote (int tick, int pitch)
 
QList< PianoItem * > getSelectedItems ()
 
QList< PianoItem * > getItems ()
 
bool playEventsView ()
 

Static Public Attributes

static const BarPattern barPatterns []
 

Protected Member Functions

virtual void wheelEvent (QWheelEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void leaveEvent (QEvent *)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 

Private Member Functions

virtual void drawBackground (QPainter *painter, const QRectF &rect)
 
void addChord (Chord *chord, int voice)
 
void updateBoundingSize ()
 
void clearNoteData ()
 
void selectNotes (int startTick, int endTick, int lowPitch, int highPitch, NoteSelectType selType)
 
void showPopupMenu (const QPoint &pos)
 
bool cutChordRest (ChordRest *e, int track, int cutTick, ChordRest *&cr0, ChordRest *&cr1)
 
QAction * getAction (const char *id)
 

Private Attributes

Staff_staff
 
Chordchord
 
Pos trackingPos
 
Pos_locator
 
int ticks
 
TType _timeType
 
int _noteHeight
 
qreal _xZoom
 
int _tuplet
 
int _subdiv
 
int _barPattern
 
bool _playEventsView
 
bool mouseDown
 
bool dragStarted
 
QPointF mouseDownPos
 
QPointF lastMousePos
 
DragStyle dragStyle
 
int lastDragPitch
 
bool inProgressUndoEvent
 
QList< PianoItem * > noteList
 

Constructor & Destructor Documentation

◆ PianoView()

Ms::PianoView::PianoView ( )

◆ ~PianoView()

Ms::PianoView::~PianoView ( )

Member Function Documentation

◆ addChord()

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

◆ barPattern()

int Ms::PianoView::barPattern ( )
inline

◆ barPatternChanged

void Ms::PianoView::barPatternChanged ( int  )
signal

◆ clearNoteData()

void Ms::PianoView::clearNoteData ( )
private

◆ contextMenuEvent()

void Ms::PianoView::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

◆ cutChordRest()

bool Ms::PianoView::cutChordRest ( ChordRest e,
int  track,
int  cutTick,
ChordRest *&  cr0,
ChordRest *&  cr1 
)
private

◆ drawBackground()

void Ms::PianoView::drawBackground ( QPainter *  painter,
const QRectF &  rect 
)
privatevirtual

◆ ensureVisible()

void Ms::PianoView::ensureVisible ( int  tick)

◆ getAction()

QAction * Ms::PianoView::getAction ( const char *  id)
private

◆ getItems()

QList< PianoItem * > Ms::PianoView::getItems ( )

◆ getSelectedItems()

QList< PianoItem * > Ms::PianoView::getSelectedItems ( )

◆ items()

QList<QGraphicsItem*> Ms::PianoView::items ( )
inline

◆ leaveEvent()

void Ms::PianoView::leaveEvent ( QEvent *  event)
protectedvirtual

◆ mouseMoveEvent()

void Ms::PianoView::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

◆ mousePressEvent()

void Ms::PianoView::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

◆ mouseReleaseEvent()

void Ms::PianoView::mouseReleaseEvent ( QMouseEvent *  event)
protectedvirtual

◆ moveLocator

void Ms::PianoView::moveLocator ( int  )
slot

◆ noteHeight()

int Ms::PianoView::noteHeight ( )
inline

◆ noteHeightChanged

void Ms::PianoView::noteHeightChanged ( int  )
signal

◆ pickNote()

PianoItem * Ms::PianoView::pickNote ( int  tick,
int  pitch 
)

◆ pitchChanged

void Ms::PianoView::pitchChanged ( int  )
signal

◆ pixelXToTick()

int Ms::PianoView::pixelXToTick ( int  pixX)

◆ pixelYToPitch()

int Ms::PianoView::pixelYToPitch ( int  pixY)
inline

◆ playEventsView()

bool Ms::PianoView::playEventsView ( )
inline

◆ selectionChanged

void Ms::PianoView::selectionChanged ( )
signal

◆ selectNotes()

void Ms::PianoView::selectNotes ( int  startTick,
int  endTick,
int  lowPitch,
int  highPitch,
NoteSelectType  selType 
)
private

◆ setBarPattern

void Ms::PianoView::setBarPattern ( int  value)
slot

◆ setStaff()

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

◆ setSubdiv

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

◆ setTuplet

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

◆ setXZoom

void Ms::PianoView::setXZoom ( int  value)
slot

◆ showPopupMenu()

void Ms::PianoView::showPopupMenu ( const QPoint &  pos)
private

◆ staff()

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

◆ subdiv()

int Ms::PianoView::subdiv ( )
inline

◆ subdivChanged

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

◆ tickToPixelX()

int Ms::PianoView::tickToPixelX ( int  tick)

◆ trackingPosChanged

void Ms::PianoView::trackingPosChanged ( const Pos )
signal

◆ tuplet()

int Ms::PianoView::tuplet ( )
inline

◆ tupletChanged

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

◆ updateBoundingSize()

void Ms::PianoView::updateBoundingSize ( )
private

◆ updateNotes

void Ms::PianoView::updateNotes ( )
slot

◆ wheelEvent()

void Ms::PianoView::wheelEvent ( QWheelEvent *  event)
protectedvirtual

◆ xZoom()

qreal Ms::PianoView::xZoom ( )
inline

◆ xZoomChanged

void Ms::PianoView::xZoomChanged ( qreal  )
signal

Member Data Documentation

◆ _barPattern

int Ms::PianoView::_barPattern
private

◆ _locator

Pos* Ms::PianoView::_locator
private

◆ _noteHeight

int Ms::PianoView::_noteHeight
private

◆ _playEventsView

bool Ms::PianoView::_playEventsView
private

◆ _staff

Staff* Ms::PianoView::_staff
private

◆ _subdiv

int Ms::PianoView::_subdiv
private

◆ _timeType

TType Ms::PianoView::_timeType
private

◆ _tuplet

int Ms::PianoView::_tuplet
private

◆ _xZoom

qreal Ms::PianoView::_xZoom
private

◆ barPatterns

const BarPattern Ms::PianoView::barPatterns
static
Initial value:
= {
{"C maj/A min", {1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1}},
{"Db maj/Bb min", {1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0}},
{"D maj/B min", {0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1}},
{"Eb maj/C min", {1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0}},
{"E maj/Db min", {0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1}},
{"F maj/D min", {1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0}},
{"Gb maj/Eb min", {0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1}},
{"G maj/E min", {1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1}},
{"Ab maj/F min", {1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0}},
{"A maj/Gb min", {0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1}},
{"Bb maj/G min", {1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0}},
{"B maj/Ab min", {0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1}},
{"C Diminished", {1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0}},
{"Db Diminished", {0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0}},
{"D Diminished", {0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1}},
{"C Half/Whole", {1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0}},
{"Db Half/Whole", {0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1}},
{"D Half/Whole", {1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1}},
{"C Whole tone", {1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}},
{"Db Whole tone", {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}},
{"C Augmented", {1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
{"Db Augmented", {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0}},
{"D Augmented", {0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0}},
{"Eb Augmented", {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1}},
{"", {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
}

◆ chord

Chord* Ms::PianoView::chord
private

◆ dragStarted

bool Ms::PianoView::dragStarted
private

◆ dragStyle

DragStyle Ms::PianoView::dragStyle
private

◆ inProgressUndoEvent

bool Ms::PianoView::inProgressUndoEvent
private

◆ lastDragPitch

int Ms::PianoView::lastDragPitch
private

◆ lastMousePos

QPointF Ms::PianoView::lastMousePos
private

◆ mouseDown

bool Ms::PianoView::mouseDown
private

◆ mouseDownPos

QPointF Ms::PianoView::mouseDownPos
private

◆ noteList

QList<PianoItem*> Ms::PianoView::noteList
private

◆ ticks

int Ms::PianoView::ticks
private

◆ trackingPos

Pos Ms::PianoView::trackingPos
private

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