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

#include <select.h>

Collaboration diagram for Ms::Selection:
Collaboration graph
[legend]

Public Member Functions

 Selection ()
 
 Selection (Score *)
 
Scorescore () const
 
SelState state () const
 
bool isNone () const
 
bool isRange () const
 
bool isList () const
 
void setState (SelState s)
 
const QList< Element * > & elements () const
 
std::vector< Note * > noteList (int track=-1) const
 
const QList< Element * > uniqueElements () const
 
QList< Note * > uniqueNotes (int track=-1) const
 
bool isSingle () const
 
void add (Element *)
 
void deselectAll ()
 
void remove (Element *)
 
void clear ()
 
Elementelement () const
 
ChordRestcr () const
 
SegmentfirstChordRestSegment () const
 
ChordRestfirstChordRest (int track=-1) const
 
ChordRestlastChordRest (int track=-1) const
 
MeasurefindMeasure () const
 
void update ()
 Set select flag for all Elements in select list. More...
 
void updateState ()
 update selection and input state More...
 
void dump ()
 
QString mimeType () const
 
QByteArray mimeData () const
 
SegmentstartSegment () const
 
SegmentendSegment () const
 
void setStartSegment (Segment *s)
 
void setEndSegment (Segment *s)
 
void setRange (Segment *startSegment, Segment *endSegment, int staffStart, int staffEnd)
 
void setRangeTicks (const Fraction &tick1, const Fraction &tick2, int staffStart, int staffEnd)
 
SegmentactiveSegment () const
 
void setActiveSegment (Segment *s)
 
ChordRestactiveCR () const
 
bool isStartActive () const
 
bool isEndActive () const
 
ChordRestcurrentCR () const
 
Fraction tickStart () const
 
Fraction tickEnd () const
 
int staffStart () const
 
int staffEnd () const
 
int activeTrack () const
 
void setStaffStart (int v)
 
void setStaffEnd (int v)
 
void setActiveTrack (int v)
 
bool canCopy () const
 
void updateSelectedElements ()
 
bool measureRange (Measure **m1, Measure **m2) const
 
void extendRangeSelection (ChordRest *cr)
 
void extendRangeSelection (Segment *seg, Segment *segAfter, int staffIdx, const Fraction &tick, const Fraction &etick)
 

Private Member Functions

QByteArray staffMimeData () const
 
QByteArray symbolListMimeData () const
 
SelectionFilter selectionFilter () const
 
bool canSelect (Element *e) const
 
bool canSelectVoice (int track) const
 
void appendFiltered (Element *e)
 
void appendChord (Chord *chord)
 

Private Attributes

Score_score
 
SelState _state
 
QList< Element * > _el
 
int _staffStart
 
int _staffEnd
 
Segment_startSegment
 
Segment_endSegment
 
Fraction _plannedTick1 { -1, 1 }
 
Fraction _plannedTick2 { -1, 1 }
 
Segment_activeSegment
 
int _activeTrack
 
Fraction _currentTick
 
int _currentTrack
 

Constructor & Destructor Documentation

◆ Selection() [1/2]

Ms::Selection::Selection ( )
inline

◆ Selection() [2/2]

Ms::Selection::Selection ( Score s)

Member Function Documentation

◆ activeCR()

ChordRest * Ms::Selection::activeCR ( ) const

◆ activeSegment()

Segment* Ms::Selection::activeSegment ( ) const
inline

◆ activeTrack()

int Ms::Selection::activeTrack ( ) const
inline

◆ add()

void Ms::Selection::add ( Element el)

◆ appendChord()

void Ms::Selection::appendChord ( Chord chord)
private

◆ appendFiltered()

void Ms::Selection::appendFiltered ( Element e)
private

◆ canCopy()

bool Ms::Selection::canCopy ( ) const

◆ canSelect()

bool Ms::Selection::canSelect ( Element e) const
inlineprivate

◆ canSelectVoice()

bool Ms::Selection::canSelectVoice ( int  track) const
inlineprivate

◆ clear()

void Ms::Selection::clear ( )

◆ cr()

ChordRest * Ms::Selection::cr ( ) const

◆ currentCR()

ChordRest * Ms::Selection::currentCR ( ) const

◆ deselectAll()

void Ms::Selection::deselectAll ( )

◆ dump()

void Ms::Selection::dump ( )

◆ element()

Element * Ms::Selection::element ( ) const

◆ elements()

const QList<Element*>& Ms::Selection::elements ( ) const
inline

◆ endSegment()

Segment* Ms::Selection::endSegment ( ) const
inline

◆ extendRangeSelection() [1/2]

void Ms::Selection::extendRangeSelection ( ChordRest cr)

◆ extendRangeSelection() [2/2]

void Ms::Selection::extendRangeSelection ( Segment seg,
Segment segAfter,
int  staffIdx,
const Fraction tick,
const Fraction etick 
)

◆ findMeasure()

Measure * Ms::Selection::findMeasure ( ) const

◆ firstChordRest()

ChordRest * Ms::Selection::firstChordRest ( int  track = -1) const

◆ firstChordRestSegment()

Segment * Ms::Selection::firstChordRestSegment ( ) const

◆ isEndActive()

bool Ms::Selection::isEndActive ( ) const

◆ isList()

bool Ms::Selection::isList ( ) const
inline

◆ isNone()

bool Ms::Selection::isNone ( ) const
inline

◆ isRange()

bool Ms::Selection::isRange ( ) const
inline

◆ isSingle()

bool Ms::Selection::isSingle ( ) const
inline

◆ isStartActive()

bool Ms::Selection::isStartActive ( ) const

◆ lastChordRest()

ChordRest * Ms::Selection::lastChordRest ( int  track = -1) const

◆ measureRange()

bool Ms::Selection::measureRange ( Measure **  m1,
Measure **  m2 
) const

◆ mimeData()

QByteArray Ms::Selection::mimeData ( ) const

◆ mimeType()

QString Ms::Selection::mimeType ( ) const

◆ noteList()

std::vector< Note * > Ms::Selection::noteList ( int  track = -1) const

◆ remove()

void Ms::Selection::remove ( Element el)

◆ score()

Score* Ms::Selection::score ( ) const
inline

◆ selectionFilter()

SelectionFilter Ms::Selection::selectionFilter ( ) const
private

◆ setActiveSegment()

void Ms::Selection::setActiveSegment ( Segment s)
inline

◆ setActiveTrack()

void Ms::Selection::setActiveTrack ( int  v)
inline

◆ setEndSegment()

void Ms::Selection::setEndSegment ( Segment s)
inline

◆ setRange()

void Ms::Selection::setRange ( Segment startSegment,
Segment endSegment,
int  staffStart,
int  staffEnd 
)

◆ setRangeTicks()

void Ms::Selection::setRangeTicks ( const Fraction tick1,
const Fraction tick2,
int  staffStart,
int  staffEnd 
)

◆ setStaffEnd()

void Ms::Selection::setStaffEnd ( int  v)
inline

◆ setStaffStart()

void Ms::Selection::setStaffStart ( int  v)
inline

◆ setStartSegment()

void Ms::Selection::setStartSegment ( Segment s)
inline

◆ setState()

void Ms::Selection::setState ( SelState  s)

◆ staffEnd()

int Ms::Selection::staffEnd ( ) const
inline

◆ staffMimeData()

QByteArray Ms::Selection::staffMimeData ( ) const
private

◆ staffStart()

int Ms::Selection::staffStart ( ) const
inline

◆ startSegment()

Segment* Ms::Selection::startSegment ( ) const
inline

◆ state()

SelState Ms::Selection::state ( ) const
inline

◆ symbolListMimeData()

QByteArray Ms::Selection::symbolListMimeData ( ) const
private

◆ tickEnd()

Fraction Ms::Selection::tickEnd ( ) const

◆ tickStart()

Fraction Ms::Selection::tickStart ( ) const

◆ uniqueElements()

const QList< Element * > Ms::Selection::uniqueElements ( ) const

◆ uniqueNotes()

QList< Note * > Ms::Selection::uniqueNotes ( int  track = -1) const

◆ update()

void Ms::Selection::update ( )

Set select flag for all Elements in select list.

◆ updateSelectedElements()

void Ms::Selection::updateSelectedElements ( )

◆ updateState()

void Ms::Selection::updateState ( )

update selection and input state

Member Data Documentation

◆ _activeSegment

Segment* Ms::Selection::_activeSegment
private

◆ _activeTrack

int Ms::Selection::_activeTrack
private

◆ _currentTick

Fraction Ms::Selection::_currentTick
private

◆ _currentTrack

int Ms::Selection::_currentTrack
private

◆ _el

QList<Element*> Ms::Selection::_el
private

◆ _endSegment

Segment* Ms::Selection::_endSegment
private

◆ _plannedTick1

Fraction Ms::Selection::_plannedTick1 { -1, 1 }
private

◆ _plannedTick2

Fraction Ms::Selection::_plannedTick2 { -1, 1 }
private

◆ _score

Score* Ms::Selection::_score
private

◆ _staffEnd

int Ms::Selection::_staffEnd
private

◆ _staffStart

int Ms::Selection::_staffStart
private

◆ _startSegment

Segment* Ms::Selection::_startSegment
private

◆ _state

SelState Ms::Selection::_state
private

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