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

#include <location.h>

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

Public Member Functions

constexpr Location (int staff, int voice, int measure, Fraction frac, int graceIndex, int note, bool rel)
 
void toAbsolute (const Location &ref)
 
void toRelative (const Location &ref)
 
void write (XmlWriter &xml) const
 
void read (XmlReader &e)
 
bool isAbsolute () const
 
bool isRelative () const
 
int staff () const
 
void setStaff (int staff)
 
int voice () const
 
void setVoice (int voice)
 
int track () const
 
void setTrack (int track)
 
int measure () const
 
void setMeasure (int measure)
 
Fraction frac () const
 
void setFrac (Fraction frac)
 
int graceIndex () const
 
void setGraceIndex (int index)
 
int note () const
 
void setNote (int note)
 
void fillForElement (const Element *e, bool absfrac=true)
 
void fillPositionForElement (const Element *e, bool absfrac=true)
 
bool operator== (const Location &other) const
 
bool operator!= (const Location &other) const
 

Static Public Member Functions

static constexpr Location absolute ()
 
static constexpr Location relative ()
 
static Location forElement (const Element *e, bool absfrac=true)
 
static Location positionForElement (const Element *e, bool absfrac=true)
 
static QVariant getLocationProperty (Pid pid, const Element *start, const Element *end)
 

Static Private Member Functions

static int track (const Element *e)
 
static int measure (const Element *e)
 
static int graceIndex (const Element *e)
 
static int note (const Element *e)
 

Private Attributes

int _staff
 
int _voice
 
int _measure
 
Fraction _frac
 
int _graceIndex
 
int _note
 
bool _rel
 

Constructor & Destructor Documentation

◆ Location()

constexpr Ms::Location::Location ( int  staff,
int  voice,
int  measure,
Fraction  frac,
int  graceIndex,
int  note,
bool  rel 
)
inline

Member Function Documentation

◆ absolute()

static constexpr Location Ms::Location::absolute ( )
inlinestatic

◆ fillForElement()

void Ms::Location::fillForElement ( const Element e,
bool  absfrac = true 
)

◆ fillPositionForElement()

void Ms::Location::fillPositionForElement ( const Element e,
bool  absfrac = true 
)

◆ forElement()

Location Ms::Location::forElement ( const Element e,
bool  absfrac = true 
)
static

◆ frac()

Fraction Ms::Location::frac ( ) const
inline

◆ getLocationProperty()

QVariant Ms::Location::getLocationProperty ( Pid  pid,
const Element start,
const Element end 
)
static

◆ graceIndex() [1/2]

int Ms::Location::graceIndex ( const Element e)
staticprivate

◆ graceIndex() [2/2]

int Ms::Location::graceIndex ( ) const
inline

◆ isAbsolute()

bool Ms::Location::isAbsolute ( ) const
inline

◆ isRelative()

bool Ms::Location::isRelative ( ) const
inline

◆ measure() [1/2]

int Ms::Location::measure ( const Element e)
staticprivate

◆ measure() [2/2]

int Ms::Location::measure ( ) const
inline

◆ note() [1/2]

int Ms::Location::note ( const Element e)
staticprivate

◆ note() [2/2]

int Ms::Location::note ( ) const
inline

◆ operator!=()

bool Ms::Location::operator!= ( const Location other) const
inline

◆ operator==()

bool Ms::Location::operator== ( const Location other) const

◆ positionForElement()

Location Ms::Location::positionForElement ( const Element e,
bool  absfrac = true 
)
static

◆ read()

void Ms::Location::read ( XmlReader e)

◆ relative()

static constexpr Location Ms::Location::relative ( )
inlinestatic

◆ setFrac()

void Ms::Location::setFrac ( Fraction  frac)
inline

◆ setGraceIndex()

void Ms::Location::setGraceIndex ( int  index)
inline

◆ setMeasure()

void Ms::Location::setMeasure ( int  measure)
inline

◆ setNote()

void Ms::Location::setNote ( int  note)
inline

◆ setStaff()

void Ms::Location::setStaff ( int  staff)
inline

◆ setTrack()

void Ms::Location::setTrack ( int  track)

◆ setVoice()

void Ms::Location::setVoice ( int  voice)
inline

◆ staff()

int Ms::Location::staff ( ) const
inline

◆ toAbsolute()

void Ms::Location::toAbsolute ( const Location ref)

◆ toRelative()

void Ms::Location::toRelative ( const Location ref)

◆ track() [1/2]

int Ms::Location::track ( const Element e)
staticprivate

◆ track() [2/2]

int Ms::Location::track ( ) const

◆ voice()

int Ms::Location::voice ( ) const
inline

◆ write()

void Ms::Location::write ( XmlWriter xml) const

Member Data Documentation

◆ _frac

Fraction Ms::Location::_frac
private

◆ _graceIndex

int Ms::Location::_graceIndex
private

◆ _measure

int Ms::Location::_measure
private

◆ _note

int Ms::Location::_note
private

◆ _rel

bool Ms::Location::_rel
private

◆ _staff

int Ms::Location::_staff
private

◆ _voice

int Ms::Location::_voice
private

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