MuseScore  3.4
Music composition and notation
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
Ms::Spanner Class Referenceabstract

Virtual base class for slurs, ties, lines etc. More...

#include <spanner.h>

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

Public Types

enum  Anchor { Anchor::SEGMENT, Anchor::MEASURE, Anchor::CHORD, Anchor::NOTE }
 
- Public Types inherited from Ms::Element
enum  EditBehavior { EditBehavior::SelectOnly, EditBehavior::Edit }
 

Public Member Functions

 Spanner (Score *s, ElementFlags=ElementFlag::NOTHING)
 
 Spanner (const Spanner &)
 
 ~Spanner ()
 
virtual qreal mag () const override
 
virtual ElementType type () const =0
 
virtual void setScore (Score *s) override
 
bool readProperties (XmlReader &) override
 
void writeProperties (XmlWriter &) const override
 
void writeSpannerStart (XmlWriter &xml, const Element *current, int track, Fraction frac={ -1, 1 }) const
 
void writeSpannerEnd (XmlWriter &xml, const Element *current, int track, Fraction frac={ -1, 1 }) const
 
virtual Fraction tick () const override
 
Fraction tick2 () const
 
Fraction ticks () const
 
void setTick (const Fraction &)
 
void setTick2 (const Fraction &)
 
void setTicks (const Fraction &)
 
int track2 () const
 
void setTrack2 (int v)
 
int effectiveTrack2 () const
 
bool broken () const
 
void setBroken (bool v)
 
Anchor anchor () const
 
void setAnchor (Anchor a)
 
const std::vector< SpannerSegment * > & spannerSegments ()
 
SpannerSegmentfrontSegment ()
 
const SpannerSegmentfrontSegment () const
 
SpannerSegmentbackSegment ()
 
const SpannerSegmentbackSegment () const
 
SpannerSegmentsegmentAt (int n)
 
const SpannerSegmentsegmentAt (int n) const
 
size_t nsegments () const
 
bool segmentsEmpty () const
 
void eraseSpannerSegments ()
 
virtual SpannerSegmentlayoutSystem (System *)
 
virtual void layoutSystemsDone ()
 
virtual void triggerLayout () const override
 
virtual void triggerLayoutAll () const override
 
virtual void add (Element *) override
 
virtual void remove (Element *) override
 
virtual void scanElements (void *data, void(*func)(void *, Element *), bool all=true) override
 
bool removeSpannerBack ()
 
virtual void removeUnmanaged ()
 
virtual void insertTimeUnmanaged (const Fraction &tick, const Fraction &len)
 
QVariant getProperty (Pid propertyId) const
 
bool setProperty (Pid propertyId, const QVariant &v)
 
QVariant propertyDefault (Pid propertyId) const
 
virtual void undoChangeProperty (Pid id, const QVariant &, PropertyFlags ps) override
 
void computeStartElement ()
 
void computeEndElement ()
 
void setNoteSpan (Note *startNote, Note *endNote)
 
ElementstartElement () const
 
ElementendElement () const
 
MeasurestartMeasure () const
 
MeasureendMeasure () const
 
void setStartElement (Element *e)
 
void setEndElement (Element *e)
 
ChordReststartCR ()
 
ChordRestendCR ()
 
ChordstartChord ()
 
ChordendChord ()
 
SegmentstartSegment () const
 
SegmentendSegment () const
 
virtual void setSelected (bool f) override
 
virtual void setVisible (bool f) override
 
virtual void setAutoplace (bool f) override
 
virtual void setColor (const QColor &col) override
 
SpannernextSpanner (Element *e, int activeStaff)
 
SpannerprevSpanner (Element *e, int activeStaff)
 
virtual ElementnextSegmentElement () override
 
virtual ElementprevSegmentElement () override
 
- Public Member Functions inherited from Ms::Element
 Element (Score *=0, ElementFlags=ElementFlag::NOTHING)
 
 Element (const Element &)
 
virtual ~Element ()
 
Elementoperator= (const Element &)=delete
 
virtual Q_INVOKABLE Ms::Elementclone () const =0
 
virtual ElementlinkedClone ()
 
Elementparent () const
 
void setParent (Element *e)
 
MeasurefindMeasure ()
 
const MeasurefindMeasure () const
 
MeasureBasefindMeasureBase ()
 
const MeasureBasefindMeasureBase () const
 
virtual bool isElement () const override
 
qreal spatium () const
 
void setFlag (ElementFlag f, bool v)
 
void setFlag (ElementFlag f, bool v) const
 
bool flag (ElementFlag f) const
 
bool selected () const
 
bool visible () const
 
virtual bool sizeIsSpatiumDependent () const override
 
void setSizeIsSpatiumDependent (bool v)
 
Placement placement () const
 
void setPlacement (Placement val)
 
bool placeAbove () const
 
bool placeBelow () const
 
bool generated () const
 
void setGenerated (bool val)
 
Spatium minDistance () const
 
void setMinDistance (Spatium v)
 
OffsetChange offsetChanged () const
 
void setOffsetChanged (bool v, bool absolute=true, const QPointF &diff=QPointF())
 
const QPointF & ipos () const
 
virtual const QPointF pos () const
 
virtual qreal x () const
 
virtual qreal y () const
 
void setPos (qreal x, qreal y)
 
void setPos (const QPointF &p)
 
QPointF & rpos ()
 
qreal & rxpos ()
 
qreal & rypos ()
 
virtual void move (const QPointF &s)
 
virtual QPointF pagePos () const
 position in page coordinates More...
 
virtual QPointF canvasPos () const
 position in canvas coordinates More...
 
qreal pageX () const
 
qreal canvasX () const
 
const QPointF & offset () const
 
virtual void setOffset (const QPointF &o)
 
void setOffset (qreal x, qreal y)
 
QPointF & roffset ()
 
qreal & rxoffset ()
 
qreal & ryoffset ()
 
virtual Fraction rtick () const
 
bool isNudged () const
 
virtual const QRectF & bbox () const
 
virtual QRectF & bbox ()
 
virtual qreal height () const
 
virtual void setHeight (qreal v)
 
virtual qreal width () const
 
virtual void setWidth (qreal v)
 
QRectF abbox () const
 
QRectF pageBoundingRect () const
 
QRectF canvasBoundingRect () const
 
virtual void setbbox (const QRectF &r) const
 
virtual void addbbox (const QRectF &r) const
 
bool contains (const QPointF &p) const
 
bool intersects (const QRectF &r) const
 
virtual Shape shape () const
 
virtual qreal baseLine () const
 
virtual int subtype () const
 
virtual void draw (QPainter *) const
 
void drawAt (QPainter *p, const QPointF &pt) const
 
virtual void write (XmlWriter &) const
 
virtual void read (XmlReader &)
 
virtual void startDrag (EditData &)
 
virtual QRectF drag (EditData &)
 Return update Rect relative to canvas. More...
 
virtual void endDrag (EditData &)
 
virtual QLineF dragAnchor () const
 
virtual bool isEditable () const
 
virtual void startEdit (EditData &)
 
virtual bool edit (EditData &)
 
virtual void startEditDrag (EditData &)
 
virtual void editDrag (EditData &)
 
virtual void endEditDrag (EditData &)
 
virtual void endEdit (EditData &)
 
virtual void editCut (EditData &)
 
virtual void editCopy (EditData &)
 
void updateGrips (EditData &) const
 
virtual bool nextGrip (EditData &) const
 
virtual bool prevGrip (EditData &) const
 
virtual QPointF gripAnchor (Grip) const
 
virtual EditBehavior normalModeEditBehavior () const
 
virtual int gripsCount () const
 
virtual Grip initialEditModeGrip () const
 
virtual Grip defaultGrip () const
 
virtual std::vector< QPointF > gripsPositions (const EditData &) const
 
int track () const
 
virtual void setTrack (int val)
 
int z () const
 
void setZ (int val)
 
int staffIdx () const
 
virtual int vStaffIdx () const
 
int voice () const
 
void setVoice (int v)
 
Staffstaff () const
 
StaffTypestaffType () const
 
Partpart () const
 
virtual void change (Element *o, Element *n)
 
virtual void layout ()
 
virtual void spatiumChanged (qreal, qreal)
 
virtual void localSpatiumChanged (qreal, qreal)
 
virtual void dump () const
 
virtual Q_INVOKABLE QString subtypeName () const
 
virtual Q_INVOKABLE QString _name () const
 
virtual QColor color () const
 
QColor curColor () const
 
QColor curColor (bool isVisible) const
 
QColor curColor (bool isVisible, QColor normalColor) const
 
void undoSetColor (const QColor &c)
 
void undoSetVisible (bool v)
 
virtual QByteArray mimeData (const QPointF &) const
 
virtual bool acceptDrop (EditData &) const
 Return true if this element accepts a drop at canvas relative pos of given element type and subtype. More...
 
virtual Elementdrop (EditData &)
 Handle a dropped element at canvas relative pos of given element type and subtype. More...
 
virtual bool mousePress (EditData &)
 delivers mouseEvent to element in edit mode returns true if mouse event is accepted by element More...
 
virtual void reset () override
 
void setMag (qreal val)
 
qreal magS () const
 
bool isPrintable () const
 
qreal point (const Spatium sp) const
 
bool systemFlag () const
 
void setSystemFlag (bool v) const
 
bool header () const
 
void setHeader (bool v)
 
bool trailer () const
 
void setTrailer (bool val)
 
bool selectable () const
 
void setSelectable (bool val)
 
bool dropTarget () const
 
void setDropTarget (bool v) const
 
bool composition () const
 
void setComposition (bool v) const
 
virtual bool isMovable () const
 
bool enabled () const
 
void setEnabled (bool val)
 
uint tag () const
 
void setTag (uint val)
 
bool autoplace () const
 
bool addToSkyline () const
 
virtual Pid propertyId (const QStringRef &xmlName) const override
 
virtual QString propertyUserValue (Pid) const override
 
virtual ElementpropertyDelegate (Pid)
 
bool custom (Pid) const
 
virtual bool isUserModified () const
 
void drawSymbol (SymId id, QPainter *p, const QPointF &o=QPointF(), qreal scale=1.0) const
 
void drawSymbol (SymId id, QPainter *p, const QPointF &o, int n) const
 
void drawSymbols (const std::vector< SymId > &, QPainter *p, const QPointF &o=QPointF(), qreal scale=1.0) const
 
void drawSymbols (const std::vector< SymId > &, QPainter *p, const QPointF &o, const QSizeF &scale) const
 
qreal symHeight (SymId id) const
 
qreal symWidth (SymId id) const
 
qreal symWidth (const std::vector< SymId > &) const
 
QRectF symBbox (SymId id) const
 
QRectF symBbox (const std::vector< SymId > &) const
 
QPointF symStemDownNW (SymId id) const
 
QPointF symStemUpSE (SymId id) const
 
QPointF symCutOutNE (SymId id) const
 
QPointF symCutOutNW (SymId id) const
 
QPointF symCutOutSE (SymId id) const
 
QPointF symCutOutSW (SymId id) const
 
qreal symAdvance (SymId id) const
 
bool symIsValid (SymId id) const
 
bool concertPitch () const
 
virtual ElementnextElement ()
 
virtual ElementprevElement ()
 
virtual QString accessibleInfo () const
 
virtual QString screenReaderInfo () const
 
virtual QString accessibleExtraInfo () const
 
virtual void drawEditMode (QPainter *, EditData &)
 
void autoplaceSegmentElement (bool above, bool add)
 
void autoplaceMeasureElement (bool above, bool add)
 
void autoplaceSegmentElement (bool add=true)
 
void autoplaceMeasureElement (bool add=true)
 
void autoplaceCalculateOffset (QRectF &r, qreal minDistance)
 
qreal rebaseOffset (bool nox=true)
 
bool rebaseMinDistance (qreal &md, qreal &yd, qreal sp, qreal rebase, bool above, bool fix)
 
qreal styleP (Sid idx) const
 
- Public Member Functions inherited from Ms::ScoreElement
 ScoreElement (Score *s)
 
 ScoreElement (const ScoreElement &se)
 
virtual ~ScoreElement ()
 
Scorescore () const
 
MasterScoremasterScore () const
 
const char * name () const
 
virtual QString userName () const
 
virtual void resetProperty (Pid id)
 
QVariant propertyDefault (Pid pid, Tid tid) 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 ()
 
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
 
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
 

Static Public Member Functions

static void readSpanner (XmlReader &e, Element *current, int track)
 
static void readSpanner (XmlReader &e, Score *current, int track)
 
static NoteendElementFromSpanner (Spanner *sp, Element *newStart)
 
static NotestartElementFromSpanner (Spanner *sp, Element *newEnd)
 
- Static Public Member Functions inherited from Ms::Element
static ElementType readType (XmlReader &node, QPointF *, Fraction *)
 
static ElementreadMimeData (Score *score, const QByteArray &data, QPointF *, Fraction *)
 
static Ms::Elementcreate (Ms::ElementType type, Score *)
 
static Elementname2Element (const QStringRef &, Score *)
 
- 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

void pushUnusedSegment (SpannerSegment *seg)
 
SpannerSegmentpopUnusedSegment ()
 
void reuse (SpannerSegment *seg)
 
int reuseSegments (int number)
 
SpannerSegmentgetNextLayoutSystemSegment (System *system, std::function< SpannerSegment *()> createSegment)
 
void fixupSegments (unsigned int targetNumber, std::function< SpannerSegment *()> createSegment)
 
const std::vector< SpannerSegment * > spannerSegments () const
 
- Protected Member Functions inherited from Ms::ScoreElement
virtual int getPropertyFlagsIdx (Pid id) const
 

Private Attributes

Element_startElement { 0 }
 
Element_endElement { 0 }
 
Anchor _anchor { Anchor::SEGMENT }
 
Fraction _tick { Fraction(-1, 1) }
 
Fraction _ticks { Fraction(0, 1) }
 
int _track2 { -1 }
 
bool _broken { false }
 
std::vector< SpannerSegment * > segments
 
std::deque< SpannerSegment * > unusedSegments
 

Friends

class SpannerSegment
 

Additional Inherited Members

- Public Attributes inherited from Ms::Element
bool itemDiscovered { false }
 helper flag for bsp More...
 
- Protected Attributes inherited from Ms::Element
int _z
 
QColor _color
 element color attribute More...
 
- Protected Attributes inherited from Ms::ScoreElement
const ElementStyle_elementStyle { &emptyStyle }
 
PropertyFlags_propertyFlagsList { 0 }
 
LinkedElements_links { 0 }
 

Detailed Description

Virtual base class for slurs, ties, lines etc.

Member Enumeration Documentation

◆ Anchor

enum Ms::Spanner::Anchor
strong
Enumerator
SEGMENT 
MEASURE 
CHORD 
NOTE 

Constructor & Destructor Documentation

◆ Spanner() [1/2]

Ms::Spanner::Spanner ( Score s,
ElementFlags  f = ElementFlag::NOTHING 
)

◆ Spanner() [2/2]

Ms::Spanner::Spanner ( const Spanner s)

◆ ~Spanner()

Ms::Spanner::~Spanner ( )

Member Function Documentation

◆ add()

void Ms::Spanner::add ( Element e)
overridevirtual

Reimplemented from Ms::Element.

Reimplemented in Ms::Trill.

◆ anchor()

Anchor Ms::Spanner::anchor ( ) const
inline

◆ backSegment() [1/2]

SpannerSegment* Ms::Spanner::backSegment ( )
inline

◆ backSegment() [2/2]

const SpannerSegment* Ms::Spanner::backSegment ( ) const
inline

◆ broken()

bool Ms::Spanner::broken ( ) const
inline

◆ computeEndElement()

void Ms::Spanner::computeEndElement ( )

◆ computeStartElement()

void Ms::Spanner::computeStartElement ( )

◆ effectiveTrack2()

int Ms::Spanner::effectiveTrack2 ( ) const
inline

◆ endChord()

Chord * Ms::Spanner::endChord ( )

◆ endCR()

ChordRest * Ms::Spanner::endCR ( )

◆ endElement()

Element* Ms::Spanner::endElement ( ) const
inline

◆ endElementFromSpanner()

Note * Ms::Spanner::endElementFromSpanner ( Spanner sp,
Element newStart 
)
static

◆ endMeasure()

Measure * Ms::Spanner::endMeasure ( ) const

◆ endSegment()

Segment * Ms::Spanner::endSegment ( ) const

◆ eraseSpannerSegments()

void Ms::Spanner::eraseSpannerSegments ( )

◆ fixupSegments()

void Ms::Spanner::fixupSegments ( unsigned int  targetNumber,
std::function< SpannerSegment *()>  createSegment 
)
protected

◆ frontSegment() [1/2]

SpannerSegment* Ms::Spanner::frontSegment ( )
inline

◆ frontSegment() [2/2]

const SpannerSegment* Ms::Spanner::frontSegment ( ) const
inline

◆ getNextLayoutSystemSegment()

SpannerSegment * Ms::Spanner::getNextLayoutSystemSegment ( System system,
std::function< SpannerSegment *()>  createSegment 
)
protected

◆ getProperty()

QVariant Ms::Spanner::getProperty ( Pid  propertyId) const
virtual

Reimplemented from Ms::Element.

Reimplemented in Ms::TextLineBase, Ms::Trill, Ms::Vibrato, and Ms::Volta.

◆ insertTimeUnmanaged()

void Ms::Spanner::insertTimeUnmanaged ( const Fraction tick,
const Fraction len 
)
virtual

◆ layoutSystem()

SpannerSegment * Ms::Spanner::layoutSystem ( System )
virtual

Reimplemented in Ms::LyricsLine, Ms::SLine, Ms::Slur, and Ms::Volta.

◆ layoutSystemsDone()

void Ms::Spanner::layoutSystemsDone ( )
virtual

◆ mag()

qreal Ms::Spanner::mag ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ nextSegmentElement()

Element * Ms::Spanner::nextSegmentElement ( )
overridevirtual

Reimplemented from Ms::Element.

◆ nextSpanner()

Spanner * Ms::Spanner::nextSpanner ( Element e,
int  activeStaff 
)

◆ nsegments()

size_t Ms::Spanner::nsegments ( ) const
inline

◆ popUnusedSegment()

SpannerSegment * Ms::Spanner::popUnusedSegment ( )
protected

◆ prevSegmentElement()

Element * Ms::Spanner::prevSegmentElement ( )
overridevirtual

Reimplemented from Ms::Element.

◆ prevSpanner()

Spanner * Ms::Spanner::prevSpanner ( Element e,
int  activeStaff 
)

◆ propertyDefault()

QVariant Ms::Spanner::propertyDefault ( Pid  propertyId) const
virtual

Reimplemented from Ms::Element.

Reimplemented in Ms::Trill, Ms::Vibrato, Ms::Volta, and Ms::TextLine.

◆ pushUnusedSegment()

void Ms::Spanner::pushUnusedSegment ( SpannerSegment seg)
protected

◆ readProperties()

bool Ms::Spanner::readProperties ( XmlReader e)
overridevirtual

Reimplemented from Ms::Element.

Reimplemented in Ms::TextLineBase.

◆ readSpanner() [1/2]

void Ms::Spanner::readSpanner ( XmlReader e,
Element current,
int  track 
)
static

◆ readSpanner() [2/2]

void Ms::Spanner::readSpanner ( XmlReader e,
Score current,
int  track 
)
static

◆ remove()

void Ms::Spanner::remove ( Element e)
overridevirtual

Reimplemented from Ms::Element.

Reimplemented in Ms::Trill.

◆ removeSpannerBack()

bool Ms::Spanner::removeSpannerBack ( )

◆ removeUnmanaged()

void Ms::Spanner::removeUnmanaged ( )
virtual

Reimplemented in Ms::LyricsLine.

◆ reuse()

void Ms::Spanner::reuse ( SpannerSegment seg)
protected

◆ reuseSegments()

int Ms::Spanner::reuseSegments ( int  number)
protected

◆ scanElements()

void Ms::Spanner::scanElements ( void *  data,
void(*)(void *, Element *)  func,
bool  all = true 
)
overridevirtual

Reimplemented from Ms::Element.

Reimplemented in Ms::Trill, and Ms::Glissando.

◆ segmentAt() [1/2]

SpannerSegment* Ms::Spanner::segmentAt ( int  n)
inline

◆ segmentAt() [2/2]

const SpannerSegment* Ms::Spanner::segmentAt ( int  n) const
inline

◆ segmentsEmpty()

bool Ms::Spanner::segmentsEmpty ( ) const
inline

◆ setAnchor()

void Ms::Spanner::setAnchor ( Anchor  a)
inline

◆ setAutoplace()

void Ms::Spanner::setAutoplace ( bool  f)
overridevirtual

Reimplemented from Ms::Element.

◆ setBroken()

void Ms::Spanner::setBroken ( bool  v)
inline

◆ setColor()

void Ms::Spanner::setColor ( const QColor &  col)
overridevirtual

Reimplemented from Ms::Element.

◆ setEndElement()

void Ms::Spanner::setEndElement ( Element e)

◆ setNoteSpan()

void Ms::Spanner::setNoteSpan ( Note startNote,
Note endNote 
)

◆ setProperty()

bool Ms::Spanner::setProperty ( Pid  propertyId,
const QVariant &  v 
)
virtual

Reimplemented from Ms::Element.

Reimplemented in Ms::TextLineBase, Ms::Trill, Ms::Vibrato, and Ms::Volta.

◆ setScore()

void Ms::Spanner::setScore ( Score s)
overridevirtual

Reimplemented from Ms::ScoreElement.

◆ setSelected()

void Ms::Spanner::setSelected ( bool  f)
overridevirtual

Reimplemented from Ms::Element.

◆ setStartElement()

void Ms::Spanner::setStartElement ( Element e)

◆ setTick()

void Ms::Spanner::setTick ( const Fraction v)

◆ setTick2()

void Ms::Spanner::setTick2 ( const Fraction f)

◆ setTicks()

void Ms::Spanner::setTicks ( const Fraction f)

◆ setTrack2()

void Ms::Spanner::setTrack2 ( int  v)
inline

◆ setVisible()

void Ms::Spanner::setVisible ( bool  f)
overridevirtual

Reimplemented from Ms::Element.

◆ spannerSegments() [1/2]

const std::vector<SpannerSegment*> Ms::Spanner::spannerSegments ( ) const
inlineprotected

◆ spannerSegments() [2/2]

const std::vector<SpannerSegment*>& Ms::Spanner::spannerSegments ( )
inline

◆ startChord()

Chord * Ms::Spanner::startChord ( )

◆ startCR()

ChordRest * Ms::Spanner::startCR ( )

◆ startElement()

Element* Ms::Spanner::startElement ( ) const
inline

◆ startElementFromSpanner()

Note * Ms::Spanner::startElementFromSpanner ( Spanner sp,
Element newEnd 
)
static

◆ startMeasure()

Measure * Ms::Spanner::startMeasure ( ) const

◆ startSegment()

Segment * Ms::Spanner::startSegment ( ) const

◆ tick()

virtual Fraction Ms::Spanner::tick ( ) const
inlineoverridevirtual

Reimplemented from Ms::Element.

◆ tick2()

Fraction Ms::Spanner::tick2 ( ) const
inline

◆ ticks()

Fraction Ms::Spanner::ticks ( ) const
inline

◆ track2()

int Ms::Spanner::track2 ( ) const
inline

◆ triggerLayout()

void Ms::Spanner::triggerLayout ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ triggerLayoutAll()

void Ms::Spanner::triggerLayoutAll ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ type()

virtual ElementType Ms::Spanner::type ( ) const
pure virtual

◆ undoChangeProperty()

void Ms::Spanner::undoChangeProperty ( Pid  id,
const QVariant &  v,
PropertyFlags  ps 
)
overridevirtual

Reimplemented from Ms::Element.

Reimplemented in Ms::Ottava.

◆ writeProperties()

void Ms::Spanner::writeProperties ( XmlWriter xml) const
overridevirtual

Reimplemented from Ms::Element.

Reimplemented in Ms::TextLineBase.

◆ writeSpannerEnd()

void Ms::Spanner::writeSpannerEnd ( XmlWriter xml,
const Element current,
int  track,
Fraction  frac = { -1, 1 } 
) const

◆ writeSpannerStart()

void Ms::Spanner::writeSpannerStart ( XmlWriter xml,
const Element current,
int  track,
Fraction  frac = { -1, 1 } 
) const

Friends And Related Function Documentation

◆ SpannerSegment

friend class SpannerSegment
friend

Member Data Documentation

◆ _anchor

Anchor Ms::Spanner::_anchor { Anchor::SEGMENT }
private

◆ _broken

bool Ms::Spanner::_broken { false }
private

◆ _endElement

Element* Ms::Spanner::_endElement { 0 }
private

◆ _startElement

Element* Ms::Spanner::_startElement { 0 }
private

◆ _tick

Fraction Ms::Spanner::_tick { Fraction(-1, 1) }
private

◆ _ticks

Fraction Ms::Spanner::_ticks { Fraction(0, 1) }
private

◆ _track2

int Ms::Spanner::_track2 { -1 }
private

◆ segments

std::vector<SpannerSegment*> Ms::Spanner::segments
private

◆ unusedSegments

std::deque<SpannerSegment*> Ms::Spanner::unusedSegments
private

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