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

#include <part.h>

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

Public Member Functions

 Part (Score *=0)
 User specified color for helping to label parts. More...
 
void initFromInstrTemplate (const InstrumentTemplate *)
 
virtual ElementType type () const override
 
void read (XmlReader &)
 
bool readProperties (XmlReader &)
 
void write (XmlWriter &xml) const
 
int nstaves () const
 
QList< Staff * > * staves ()
 
const QList< Staff * > * staves () const
 
Staffstaff (int idx) const
 
void setId (const QString &s)
 
QString id () const
 
int startTrack () const
 
int endTrack () const
 
QString longName (const Fraction &tick={ -1, 1 }) const
 
QString shortName (const Fraction &tick={ -1, 1 }) const
 
QString instrumentName (const Fraction &tick={ -1, 1 }) const
 
QString instrumentId (const Fraction &tick={ -1, 1 }) const
 
const QList< StaffName > & longNames (const Fraction &tick={ -1, 1 }) const
 
const QList< StaffName > & shortNames (const Fraction &tick={ -1, 1 }) const
 
void setLongNames (QList< StaffName > &s, const Fraction &tick={ -1, 1 })
 
void setShortNames (QList< StaffName > &s, const Fraction &tick={ -1, 1 })
 
void setLongName (const QString &s)
 
void setShortName (const QString &s)
 
void setPlainLongName (const QString &s)
 
void setPlainShortName (const QString &s)
 
void setStaves (int)
 
int midiProgram () const
 
void setMidiProgram (int, int bank=0)
 
int midiChannel () const
 
int midiPort () const
 
void setMidiChannel (int ch, int port=-1, const Fraction &tick={-1, 1})
 
void insertStaff (Staff *, int idx)
 
void removeStaff (Staff *)
 
bool show () const
 
void setShow (bool val)
 
Instrumentinstrument (Fraction={ -1, 1 })
 
const Instrumentinstrument (Fraction={ -1, 1 }) const
 
void setInstrument (Instrument *, Fraction={ -1, 1})
 
void setInstrument (const Instrument &&, Fraction={ -1, 1 })
 
void setInstrument (const Instrument &, Fraction={ -1, 1 })
 
void removeInstrument (const Fraction &)
 
const InstrumentListinstruments () const
 
void insertTime (const Fraction &tick, const Fraction &len)
 
QString partName () const
 
void setPartName (const QString &s)
 
int color () const
 
void setColor (int value)
 
QVariant getProperty (Pid) const override
 
bool setProperty (Pid, const QVariant &) override
 
int lyricCount () const
 
int harmonyCount () const
 
bool hasPitchedStaff () const
 
bool hasTabStaff () const
 
bool hasDrumStaff () const
 
const PartmasterPart () const
 
PartmasterPart ()
 
- Public Member Functions inherited from Ms::ScoreElement
 ScoreElement (Score *s)
 
 ScoreElement (const ScoreElement &se)
 
virtual ~ScoreElement ()
 
Scorescore () const
 
MasterScoremasterScore () const
 
virtual void setScore (Score *s)
 
const char * name () const
 
virtual QString userName () const
 
virtual QVariant propertyDefault (Pid) const
 
virtual void resetProperty (Pid id)
 
QVariant propertyDefault (Pid pid, Tid tid) const
 
virtual bool sizeIsSpatiumDependent () const
 
virtual void reset ()
 
virtual Pid propertyId (const QStringRef &xmlName) const
 
virtual QString propertyUserValue (Pid) const
 
virtual void initElementStyle (const ElementStyle *)
 
virtual const ElementStylestyledProperties () const
 
virtual PropertyFlagspropertyFlagsList () const
 
virtual PropertyFlags propertyFlags (Pid) const
 
bool isStyled (Pid pid) const
 
QVariant styleValue (Pid, Sid) const
 
void setPropertyFlags (Pid, PropertyFlags)
 
virtual Sid getPropertyStyle (Pid) const
 
bool readProperty (const QStringRef &, XmlReader &, Pid)
 
void readProperty (XmlReader &, Pid)
 
bool readStyledProperty (XmlReader &e, const QStringRef &tag)
 
virtual void readAddConnector (ConnectorInfoReader *info, bool pasteMode)
 
virtual void styleChanged ()
 
virtual void undoChangeProperty (Pid id, const QVariant &, PropertyFlags ps)
 
void undoChangeProperty (Pid id, const QVariant &)
 
void undoResetProperty (Pid id)
 
void undoPushProperty (Pid)
 
void writeProperty (XmlWriter &xml, Pid id) const
 
void writeStyledProperties (XmlWriter &) const
 
QList< ScoreElement * > linkList () const
 
void linkTo (ScoreElement *)
 
void unlink ()
 
bool isLinked (ScoreElement *)
 return true if se is different and linked to this element More...
 
virtual void undoUnlink ()
 
int lid () const
 
LinkedElementslinks () const
 
void setLinks (LinkedElements *le)
 
bool isNote () const
 
bool isRest () const
 
bool isChord () const
 
bool isBarLine () const
 
bool isArticulation () const
 
bool isFermata () const
 
bool isMarker () const
 
bool isClef () const
 
bool isKeySig () const
 
bool isTimeSig () const
 
bool isMeasure () const
 
bool isTempoText () const
 
bool isBreath () const
 
bool isHBox () const
 
bool isVBox () const
 
bool isTBox () const
 
bool isFBox () const
 
bool isTie () const
 
bool isSlur () const
 
bool isGlissando () const
 
bool isGlissandoSegment () const
 
bool isSystemDivider () const
 
bool isRehearsalMark () const
 
bool isHarmony () const
 
bool isVolta () const
 
bool isJump () const
 
bool isOttava () const
 
bool isLayoutBreak () const
 
bool isSegment () const
 
bool isTremolo () const
 
bool isSystem () const
 
bool isLyrics () const
 
bool isStem () const
 
bool isBeam () const
 
bool isHook () const
 
bool isStemSlash () const
 
bool isSlurSegment () const
 
bool isTieSegment () const
 
bool isSpacer () const
 
bool isStaffLines () const
 
bool isAmbitus () const
 
bool isBracket () const
 
bool isInstrumentChange () const
 
bool isStaffTypeChange () const
 
bool isHairpin () const
 
bool isHairpinSegment () const
 
bool isBend () const
 
bool isTremoloBar () const
 
bool isRepeatMeasure () const
 
bool isTuplet () const
 
bool isNoteDot () const
 
bool isDynamic () const
 
bool isInstrumentName () const
 
bool isAccidental () const
 
bool isTextLine () const
 
bool isTextLineSegment () const
 
bool isPedal () const
 
bool isPedalSegment () const
 
bool isOttavaSegment () const
 
bool isLedgerLine () const
 
bool isIcon () const
 
bool isVoltaSegment () const
 
bool isNoteLine () const
 
bool isTrill () const
 
bool isTrillSegment () const
 
bool isLetRing () const
 
bool isLetRingSegment () const
 
bool isVibrato () const
 
bool isPalmMute () const
 
bool isPalmMuteSegment () const
 
bool isVibratoSegment () const
 
bool isSymbol () const
 
bool isFSymbol () const
 
bool isFingering () const
 
bool isNoteHead () const
 
bool isLyricsLine () const
 
bool isLyricsLineSegment () const
 
bool isFiguredBass () const
 
bool isStaffState () const
 
bool isArpeggio () const
 
bool isImage () const
 
bool isChordLine () const
 
bool isFretDiagram () const
 
bool isPage () const
 
bool isText () const
 
bool isMeasureNumber () const
 
bool isStaffText () const
 
bool isSystemText () const
 
bool isBracketItem () const
 
bool isScore () const
 
bool isStaff () const
 
bool isPart () const
 
bool isBagpipeEmbellishment () const
 
bool isLasso () const
 
bool isSticking () const
 
virtual bool isElement () const
 
bool isChordRest () const
 
bool isDurationElement () const
 
bool isSlurTieSegment () const
 
bool isSLineSegment () const
 
bool isBox () const
 
bool isVBoxBase () const
 
bool isMeasureBase () const
 
bool isTextBase () const
 
bool isTextLineBaseSegment () const
 
bool isLineSegment () const
 
bool isSpannerSegment () const
 
bool isBSymbol () const
 
bool isTextLineBase () const
 
bool isSLine () const
 
bool isSpanner () const
 
bool isStaffTextBase () const
 

Private Attributes

QString _partName
 used in tracklist (mixer) More...
 
InstrumentList _instruments
 
QList< Staff * > _staves
 
QString _id
 used for MusicXml import More...
 
bool _show
 show part in partitur if true More...
 
int _color
 

Static Private Attributes

static const int DEFAULT_COLOR = 0x3399ff
 

Friends

void readPart206 (Part *, XmlReader &)
 

Additional Inherited Members

- Static Public Member Functions inherited from Ms::ScoreElement
static ElementType name2type (const QStringRef &, bool silent=false)
 
static ElementType name2type (const QString &s)
 
static const char * name (ElementType)
 
- Protected Member Functions inherited from Ms::ScoreElement
virtual int getPropertyFlagsIdx (Pid id) const
 
- Protected Attributes inherited from Ms::ScoreElement
const ElementStyle_elementStyle { &emptyStyle }
 
PropertyFlags_propertyFlagsList { 0 }
 
LinkedElements_links { 0 }
 

Constructor & Destructor Documentation

◆ Part()

Ms::Part::Part ( Score s = 0)

User specified color for helping to label parts.

Member Function Documentation

◆ color()

int Ms::Part::color ( ) const
inline

◆ endTrack()

int Ms::Part::endTrack ( ) const

◆ getProperty()

QVariant Ms::Part::getProperty ( Pid  id) const
overridevirtual

Implements Ms::ScoreElement.

◆ harmonyCount()

int Ms::Part::harmonyCount ( ) const

◆ hasDrumStaff()

bool Ms::Part::hasDrumStaff ( ) const

◆ hasPitchedStaff()

bool Ms::Part::hasPitchedStaff ( ) const

◆ hasTabStaff()

bool Ms::Part::hasTabStaff ( ) const

◆ id()

QString Ms::Part::id ( ) const
inline

◆ initFromInstrTemplate()

void Ms::Part::initFromInstrTemplate ( const InstrumentTemplate t)

◆ insertStaff()

void Ms::Part::insertStaff ( Staff staff,
int  idx 
)

◆ insertTime()

void Ms::Part::insertTime ( const Fraction tick,
const Fraction len 
)

◆ instrument() [1/2]

Instrument * Ms::Part::instrument ( Fraction  tick = { -1, 1 })

◆ instrument() [2/2]

const Instrument * Ms::Part::instrument ( Fraction  tick = { -1, 1 }) const

◆ instrumentId()

QString Ms::Part::instrumentId ( const Fraction tick = { -1, 1 }) const

◆ instrumentName()

QString Ms::Part::instrumentName ( const Fraction tick = { -1, 1 }) const

◆ instruments()

const InstrumentList * Ms::Part::instruments ( ) const

◆ longName()

QString Ms::Part::longName ( const Fraction tick = { -1, 1 }) const

◆ longNames()

const QList<StaffName>& Ms::Part::longNames ( const Fraction tick = { -1, 1 }) const
inline

◆ lyricCount()

int Ms::Part::lyricCount ( ) const

◆ masterPart() [1/2]

const Part * Ms::Part::masterPart ( ) const

◆ masterPart() [2/2]

Part * Ms::Part::masterPart ( )

◆ midiChannel()

int Ms::Part::midiChannel ( ) const

◆ midiPort()

int Ms::Part::midiPort ( ) const

◆ midiProgram()

int Ms::Part::midiProgram ( ) const

◆ nstaves()

int Ms::Part::nstaves ( ) const
inline

◆ partName()

QString Ms::Part::partName ( ) const
inline

◆ read()

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

◆ readProperties()

bool Ms::Part::readProperties ( XmlReader e)

◆ removeInstrument()

void Ms::Part::removeInstrument ( const Fraction tick)

◆ removeStaff()

void Ms::Part::removeStaff ( Staff staff)

◆ setColor()

void Ms::Part::setColor ( int  value)
inline

◆ setId()

void Ms::Part::setId ( const QString &  s)
inline

◆ setInstrument() [1/3]

void Ms::Part::setInstrument ( Instrument i,
Fraction  tick = { -1, 1} 
)

◆ setInstrument() [2/3]

void Ms::Part::setInstrument ( const Instrument &&  i,
Fraction  tick = { -1, 1 } 
)

◆ setInstrument() [3/3]

void Ms::Part::setInstrument ( const Instrument i,
Fraction  tick = { -1, 1 } 
)

◆ setLongName()

void Ms::Part::setLongName ( const QString &  s)

◆ setLongNames()

void Ms::Part::setLongNames ( QList< StaffName > &  s,
const Fraction tick = { -1, 1 } 
)

◆ setMidiChannel()

void Ms::Part::setMidiChannel ( int  ch,
int  port = -1,
const Fraction tick = {-1,1} 
)

◆ setMidiProgram()

void Ms::Part::setMidiProgram ( int  program,
int  bank = 0 
)

◆ setPartName()

void Ms::Part::setPartName ( const QString &  s)
inline

◆ setPlainLongName()

void Ms::Part::setPlainLongName ( const QString &  s)

◆ setPlainShortName()

void Ms::Part::setPlainShortName ( const QString &  s)

◆ setProperty()

bool Ms::Part::setProperty ( Pid  id,
const QVariant &  property 
)
overridevirtual

Implements Ms::ScoreElement.

◆ setShortName()

void Ms::Part::setShortName ( const QString &  s)

◆ setShortNames()

void Ms::Part::setShortNames ( QList< StaffName > &  s,
const Fraction tick = { -1, 1 } 
)

◆ setShow()

void Ms::Part::setShow ( bool  val)
inline

◆ setStaves()

void Ms::Part::setStaves ( int  n)

◆ shortName()

QString Ms::Part::shortName ( const Fraction tick = { -1, 1 }) const

◆ shortNames()

const QList<StaffName>& Ms::Part::shortNames ( const Fraction tick = { -1, 1 }) const
inline

◆ show()

bool Ms::Part::show ( ) const
inline

◆ staff()

Staff * Ms::Part::staff ( int  idx) const

◆ startTrack()

int Ms::Part::startTrack ( ) const

◆ staves() [1/2]

QList<Staff*>* Ms::Part::staves ( )
inline

◆ staves() [2/2]

const QList<Staff*>* Ms::Part::staves ( ) const
inline

◆ type()

virtual ElementType Ms::Part::type ( ) const
inlineoverridevirtual

Implements Ms::ScoreElement.

◆ write()

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

Friends And Related Function Documentation

◆ readPart206

void readPart206 ( Part part,
XmlReader e 
)
friend

Member Data Documentation

◆ _color

int Ms::Part::_color
private

◆ _id

QString Ms::Part::_id
private

used for MusicXml import

◆ _instruments

InstrumentList Ms::Part::_instruments
private

◆ _partName

QString Ms::Part::_partName
private

used in tracklist (mixer)

◆ _show

bool Ms::Part::_show
private

show part in partitur if true

◆ _staves

QList<Staff*> Ms::Part::_staves
private

◆ DEFAULT_COLOR

const int Ms::Part::DEFAULT_COLOR = 0x3399ff
staticprivate

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