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

#include <segment.h>

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

Public Member Functions

 Segment (Measure *m=0)
 
 Segment (Measure *, SegmentType, const Fraction &)
 
 Segment (const Segment &)
 
 ~Segment ()
 
virtual Segmentclone () const
 
virtual ElementType type () const
 
virtual void setScore (Score *) override
 
Segmentnext () const
 
Segmentnext (SegmentType) const
 
SegmentnextActive () const
 
SegmentnextEnabled () const
 
void setNext (Segment *e)
 
Segmentprev () const
 
Segmentprev (SegmentType) const
 
SegmentprevActive () const
 
SegmentprevEnabled () const
 
void setPrev (Segment *e)
 
Segmentnext1 () const
 return next Segment, don’t stop searching at end of Measure More...
 
Segmentnext1enabled () const
 
Segmentnext1MM () const
 
Segmentnext1MMenabled () const
 
Segmentnext1 (SegmentType) const
 
Segmentnext1MM (SegmentType) const
 
Segmentprev1 () const
 return previous Segment, don’t stop searching at Measure begin More...
 
Segmentprev1enabled () const
 
Segmentprev1MM () const
 
Segmentprev1MMenabled () const
 
Segmentprev1 (SegmentType) const
 
Segmentprev1MM (SegmentType) const
 
SegmentnextCR (int track=-1, bool sameStaff=false) const
 
ChordRestnextChordRest (int track, bool backwards=false) const
 
Elementelement (int track) const
 
Ms::ElementelementAt (int track) const
 
const std::vector< Element * > & elist () const
 
std::vector< Element * > & elist ()
 
void removeElement (int track)
 
void setElement (int track, Element *el)
 
virtual void scanElements (void *data, void(*func)(void *, Element *), bool all=true)
 
Measuremeasure () const
 
Systemsystem () const
 
qreal x () const
 
void setX (qreal v)
 
void insertStaff (int staff)
 
void removeStaff (int staff)
 
virtual void add (Element *)
 
virtual void remove (Element *)
 
void swapElements (int i1, int i2)
 
void sortStaves (QList< int > &dst)
 
const char * subTypeName () const
 
SegmentType segmentType () const
 
void setSegmentType (SegmentType t)
 
bool empty () const
 
bool written () const
 
void setWritten (bool val) const
 
void fixStaffIdx ()
 
qreal stretch () const
 
void setStretch (qreal v)
 
virtual Fraction rtick () const override
 
void setRtick (const Fraction &v)
 
virtual Fraction tick () const override
 
Fraction ticks () const
 
void setTicks (const Fraction &v)
 
bool splitsTuplet () const
 
const std::vector< Element * > & annotations () const
 
void clearAnnotations ()
 
void removeAnnotation (Element *e)
 
bool hasAnnotationOrElement (ElementType type, int minTrack, int maxTrack) const
 return true if an annotation of type type or and element is found in the track range More...
 
ElementfindAnnotation (ElementType type, int minTrack, int maxTrack)
 Returns the first found annotation of type type or nullptr if nothing was found. More...
 
std::vector< Element * > findAnnotations (ElementType type, int minTrack, int maxTrack)
 Returns the list of found annotations or nullptr if nothing was found. More...
 
bool hasElements () const
 Returns true if the segment has at least one element. More...
 
qreal dotPosX (int staffIdx) const
 
void setDotPosX (int staffIdx, qreal val)
 
Spatium extraLeadingSpace () const
 
void setExtraLeadingSpace (Spatium v)
 
virtual void write (XmlWriter &) const
 
virtual void read (XmlReader &)
 
virtual QVariant getProperty (Pid propertyId) const
 
virtual bool setProperty (Pid propertyId, const QVariant &)
 
virtual QVariant propertyDefault (Pid) const
 
bool operator< (const Segment &) const
 return true if segment is before s in list More...
 
bool operator> (const Segment &) const
 return true if segment is after s in list More...
 
virtual QString accessibleExtraInfo () const override
 
ElementfirstInNextSegments (int activeStaff)
 
ElementlastInPrevSegments (int activeStaff)
 
ElementfirstElement (int staff)
 
ElementlastElement (int staff)
 
ElementfirstElementOfSegment (Segment *s, int activeStaff)
 
ElementnextElementOfSegment (Segment *s, Element *e, int activeStaff)
 
ElementprevElementOfSegment (Segment *s, Element *e, int activeStaff)
 
ElementlastElementOfSegment (Segment *s, int activeStaff)
 
ElementnextAnnotation (Element *e)
 
ElementprevAnnotation (Element *e)
 
ElementfirstAnnotation (Segment *s, int activeStaff)
 
ElementlastAnnotation (Segment *s, int activeStaff)
 
SpannerfirstSpanner (int activeStaff)
 
SpannerlastSpanner (int activeStaff)
 
bool notChordRestType (Segment *s)
 
ElementnextElement (int activeStaff)
 
ElementprevElement (int activeStaff)
 
std::vector< Shapeshapes ()
 
const std::vector< Shape > & shapes () const
 
const ShapestaffShape (int staffIdx) const
 
ShapestaffShape (int staffIdx)
 
void createShapes ()
 
void createShape (int staffIdx)
 
qreal minRight () const
 
qreal minLeft (const Shape &) const
 
qreal minLeft () const
 
qreal minHorizontalDistance (Segment *, bool isSystemGap) const
 
qreal minHorizontalCollidingDistance (Segment *ns) const
 
ChordRestcr (int track) const
 
bool isType (const SegmentType t) const
 
bool isBeginBarLineType () const
 
bool isClefType () const
 
bool isHeaderClefType () const
 
bool isKeySigType () const
 
bool isAmbitusType () const
 
bool isTimeSigType () const
 
bool isStartRepeatBarLineType () const
 
bool isBarLineType () const
 
bool isBreathType () const
 
bool isChordRestType () const
 
bool isEndBarLineType () const
 
bool isKeySigAnnounceType () const
 
bool isTimeSigAnnounceType () const
 
- Public Member Functions inherited from Ms::Element
 Element (Score *=0, ElementFlags=ElementFlag::NOTHING)
 
 Element (const Element &)
 
virtual ~Element ()
 
Elementoperator= (const Element &)=delete
 
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
 
virtual void setSelected (bool f)
 
bool visible () const
 
virtual void setVisible (bool f)
 
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 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 ()
 
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 writeProperties (XmlWriter &xml) const
 
virtual bool readProperties (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
 
virtual void setColor (const QColor &c)
 
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
 
virtual qreal mag () const
 
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
 
virtual void setAutoplace (bool v)
 
bool addToSkyline () const
 
virtual void undoChangeProperty (Pid id, const QVariant &, PropertyFlags ps) override
 
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 ElementnextSegmentElement ()
 
virtual ElementprevSegmentElement ()
 
virtual QString accessibleInfo () const
 
virtual QString screenReaderInfo () const
 
virtual void triggerLayout () const
 
virtual void triggerLayoutAll () 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 const char * subTypeName (SegmentType)
 
static SegmentType segmentType (ElementType type)
 
- 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

ElementgetElement (int staff)
 
- Protected Member Functions inherited from Ms::ScoreElement
virtual int getPropertyFlagsIdx (Pid id) const
 

Private Member Functions

void init ()
 
void checkEmpty () const
 
void checkElement (Element *, int track)
 
void setEmpty (bool val) const
 

Private Attributes

SegmentType _segmentType { SegmentType::Invalid }
 
Fraction _tick
 
Fraction _ticks
 
Spatium _extraLeadingSpace
 
qreal _stretch
 
Segment_next = nullptr
 
Segment_prev = nullptr
 
std::vector< Element * > _annotations
 
std::vector< Element * > _elist
 
std::vector< Shape_shapes
 
std::vector< qreal > _dotPosX
 

Additional Inherited Members

- Public Types inherited from Ms::Element
enum  EditBehavior { EditBehavior::SelectOnly, EditBehavior::Edit }
 
- 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 }
 

Constructor & Destructor Documentation

◆ Segment() [1/3]

Ms::Segment::Segment ( Measure m = 0)

◆ Segment() [2/3]

Ms::Segment::Segment ( Measure m,
SegmentType  st,
const Fraction t 
)

◆ Segment() [3/3]

Ms::Segment::Segment ( const Segment s)

◆ ~Segment()

Ms::Segment::~Segment ( )

Member Function Documentation

◆ accessibleExtraInfo()

QString Ms::Segment::accessibleExtraInfo ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ add()

void Ms::Segment::add ( Element el)
virtual

Reimplemented from Ms::Element.

◆ annotations()

const std::vector<Element*>& Ms::Segment::annotations ( ) const
inline

◆ checkElement()

void Ms::Segment::checkElement ( Element el,
int  track 
)
private

◆ checkEmpty()

void Ms::Segment::checkEmpty ( ) const
private

◆ clearAnnotations()

void Ms::Segment::clearAnnotations ( )

◆ clone()

virtual Segment* Ms::Segment::clone ( ) const
inlinevirtual

Implements Ms::Element.

◆ cr()

ChordRest* Ms::Segment::cr ( int  track) const
inline

◆ createShape()

void Ms::Segment::createShape ( int  staffIdx)

◆ createShapes()

void Ms::Segment::createShapes ( )

◆ dotPosX()

qreal Ms::Segment::dotPosX ( int  staffIdx) const
inline

◆ element()

Element* Ms::Segment::element ( int  track) const
inline

◆ elementAt()

Ms::Element * Ms::Segment::elementAt ( int  track) const

◆ elist() [1/2]

const std::vector<Element*>& Ms::Segment::elist ( ) const
inline

◆ elist() [2/2]

std::vector<Element*>& Ms::Segment::elist ( )
inline

◆ empty()

bool Ms::Segment::empty ( ) const
inline

◆ extraLeadingSpace()

Spatium Ms::Segment::extraLeadingSpace ( ) const
inline

◆ findAnnotation()

Element * Ms::Segment::findAnnotation ( ElementType  type,
int  minTrack,
int  maxTrack 
)

Returns the first found annotation of type type or nullptr if nothing was found.

◆ findAnnotations()

std::vector< Element * > Ms::Segment::findAnnotations ( ElementType  type,
int  minTrack,
int  maxTrack 
)

Returns the list of found annotations or nullptr if nothing was found.

◆ firstAnnotation()

Element * Ms::Segment::firstAnnotation ( Segment s,
int  activeStaff 
)

◆ firstElement()

Element * Ms::Segment::firstElement ( int  staff)

◆ firstElementOfSegment()

Element * Ms::Segment::firstElementOfSegment ( Segment s,
int  activeStaff 
)

◆ firstInNextSegments()

Element * Ms::Segment::firstInNextSegments ( int  activeStaff)

◆ firstSpanner()

Spanner * Ms::Segment::firstSpanner ( int  activeStaff)

◆ fixStaffIdx()

void Ms::Segment::fixStaffIdx ( )

◆ getElement()

Element * Ms::Segment::getElement ( int  staff)
protected

◆ getProperty()

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

Reimplemented from Ms::Element.

◆ hasAnnotationOrElement()

bool Ms::Segment::hasAnnotationOrElement ( ElementType  type,
int  minTrack,
int  maxTrack 
) const

return true if an annotation of type type or and element is found in the track range

◆ hasElements()

bool Ms::Segment::hasElements ( ) const

Returns true if the segment has at least one element.

Annotations are not considered.

◆ init()

void Ms::Segment::init ( )
private

◆ insertStaff()

void Ms::Segment::insertStaff ( int  staff)

◆ isAmbitusType()

bool Ms::Segment::isAmbitusType ( ) const
inline

◆ isBarLineType()

bool Ms::Segment::isBarLineType ( ) const
inline

◆ isBeginBarLineType()

bool Ms::Segment::isBeginBarLineType ( ) const
inline

◆ isBreathType()

bool Ms::Segment::isBreathType ( ) const
inline

◆ isChordRestType()

bool Ms::Segment::isChordRestType ( ) const
inline

◆ isClefType()

bool Ms::Segment::isClefType ( ) const
inline

◆ isEndBarLineType()

bool Ms::Segment::isEndBarLineType ( ) const
inline

◆ isHeaderClefType()

bool Ms::Segment::isHeaderClefType ( ) const
inline

◆ isKeySigAnnounceType()

bool Ms::Segment::isKeySigAnnounceType ( ) const
inline

◆ isKeySigType()

bool Ms::Segment::isKeySigType ( ) const
inline

◆ isStartRepeatBarLineType()

bool Ms::Segment::isStartRepeatBarLineType ( ) const
inline

◆ isTimeSigAnnounceType()

bool Ms::Segment::isTimeSigAnnounceType ( ) const
inline

◆ isTimeSigType()

bool Ms::Segment::isTimeSigType ( ) const
inline

◆ isType()

bool Ms::Segment::isType ( const SegmentType  t) const
inline

◆ lastAnnotation()

Element * Ms::Segment::lastAnnotation ( Segment s,
int  activeStaff 
)

◆ lastElement()

Element * Ms::Segment::lastElement ( int  staff)

◆ lastElementOfSegment()

Element * Ms::Segment::lastElementOfSegment ( Segment s,
int  activeStaff 
)

◆ lastInPrevSegments()

Element * Ms::Segment::lastInPrevSegments ( int  activeStaff)

◆ lastSpanner()

Spanner * Ms::Segment::lastSpanner ( int  activeStaff)

◆ measure()

Measure* Ms::Segment::measure ( ) const
inline

◆ minHorizontalCollidingDistance()

qreal Ms::Segment::minHorizontalCollidingDistance ( Segment ns) const

◆ minHorizontalDistance()

qreal Ms::Segment::minHorizontalDistance ( Segment ns,
bool  isSystemGap 
) const

◆ minLeft() [1/2]

qreal Ms::Segment::minLeft ( const Shape sl) const

◆ minLeft() [2/2]

qreal Ms::Segment::minLeft ( ) const

◆ minRight()

qreal Ms::Segment::minRight ( ) const

◆ next() [1/2]

Segment* Ms::Segment::next ( ) const
inline

◆ next() [2/2]

Segment * Ms::Segment::next ( SegmentType  types) const

◆ next1() [1/2]

Segment * Ms::Segment::next1 ( ) const

return next Segment, don’t stop searching at end of Measure

◆ next1() [2/2]

Segment * Ms::Segment::next1 ( SegmentType  types) const

◆ next1enabled()

Segment * Ms::Segment::next1enabled ( ) const

◆ next1MM() [1/2]

Segment * Ms::Segment::next1MM ( ) const

◆ next1MM() [2/2]

Segment * Ms::Segment::next1MM ( SegmentType  types) const

◆ next1MMenabled()

Segment * Ms::Segment::next1MMenabled ( ) const

◆ nextActive()

Segment * Ms::Segment::nextActive ( ) const
inline

◆ nextAnnotation()

Element * Ms::Segment::nextAnnotation ( Element e)

◆ nextChordRest()

ChordRest * Ms::Segment::nextChordRest ( int  track,
bool  backwards = false 
) const

◆ nextCR()

Segment * Ms::Segment::nextCR ( int  track = -1,
bool  sameStaff = false 
) const

◆ nextElement()

Element * Ms::Segment::nextElement ( int  activeStaff)

◆ nextElementOfSegment()

Element * Ms::Segment::nextElementOfSegment ( Segment s,
Element e,
int  activeStaff 
)

◆ nextEnabled()

Segment * Ms::Segment::nextEnabled ( ) const
inline

◆ notChordRestType()

bool Ms::Segment::notChordRestType ( Segment s)

◆ operator<()

bool Ms::Segment::operator< ( const Segment s) const

return true if segment is before s in list

◆ operator>()

bool Ms::Segment::operator> ( const Segment s) const

return true if segment is after s in list

◆ prev() [1/2]

Segment* Ms::Segment::prev ( ) const
inline

◆ prev() [2/2]

Segment * Ms::Segment::prev ( SegmentType  types) const

◆ prev1() [1/2]

Segment * Ms::Segment::prev1 ( ) const

return previous Segment, don’t stop searching at Measure begin

◆ prev1() [2/2]

Segment * Ms::Segment::prev1 ( SegmentType  types) const

◆ prev1enabled()

Segment * Ms::Segment::prev1enabled ( ) const

◆ prev1MM() [1/2]

Segment * Ms::Segment::prev1MM ( ) const

◆ prev1MM() [2/2]

Segment * Ms::Segment::prev1MM ( SegmentType  types) const

◆ prev1MMenabled()

Segment * Ms::Segment::prev1MMenabled ( ) const

◆ prevActive()

Segment * Ms::Segment::prevActive ( ) const
inline

◆ prevAnnotation()

Element * Ms::Segment::prevAnnotation ( Element e)

◆ prevElement()

Element * Ms::Segment::prevElement ( int  activeStaff)

◆ prevElementOfSegment()

Element * Ms::Segment::prevElementOfSegment ( Segment s,
Element e,
int  activeStaff 
)

◆ prevEnabled()

Segment * Ms::Segment::prevEnabled ( ) const
inline

◆ propertyDefault()

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

Reimplemented from Ms::Element.

◆ read()

void Ms::Segment::read ( XmlReader e)
virtual

Reimplemented from Ms::Element.

◆ remove()

void Ms::Segment::remove ( Element el)
virtual

Reimplemented from Ms::Element.

◆ removeAnnotation()

void Ms::Segment::removeAnnotation ( Element e)

◆ removeElement()

void Ms::Segment::removeElement ( int  track)

◆ removeStaff()

void Ms::Segment::removeStaff ( int  staff)

◆ rtick()

virtual Fraction Ms::Segment::rtick ( ) const
inlineoverridevirtual

Reimplemented from Ms::Element.

◆ scanElements()

void Ms::Segment::scanElements ( void *  data,
void(*)(void *, Element *)  func,
bool  all = true 
)
virtual

Reimplemented from Ms::Element.

◆ segmentType() [1/2]

SegmentType Ms::Segment::segmentType ( ElementType  type)
static

◆ segmentType() [2/2]

SegmentType Ms::Segment::segmentType ( ) const
inline

◆ setDotPosX()

void Ms::Segment::setDotPosX ( int  staffIdx,
qreal  val 
)
inline

◆ setElement()

void Ms::Segment::setElement ( int  track,
Element el 
)

◆ setEmpty()

void Ms::Segment::setEmpty ( bool  val) const
inlineprivate

◆ setExtraLeadingSpace()

void Ms::Segment::setExtraLeadingSpace ( Spatium  v)
inline

◆ setNext()

void Ms::Segment::setNext ( Segment e)
inline

◆ setPrev()

void Ms::Segment::setPrev ( Segment e)
inline

◆ setProperty()

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

Reimplemented from Ms::Element.

◆ setRtick()

void Ms::Segment::setRtick ( const Fraction v)
inline

◆ setScore()

void Ms::Segment::setScore ( Score score)
overridevirtual

Reimplemented from Ms::ScoreElement.

◆ setSegmentType()

void Ms::Segment::setSegmentType ( SegmentType  t)

◆ setStretch()

void Ms::Segment::setStretch ( qreal  v)
inline

◆ setTicks()

void Ms::Segment::setTicks ( const Fraction v)
inline

◆ setWritten()

void Ms::Segment::setWritten ( bool  val) const
inline

◆ setX()

void Ms::Segment::setX ( qreal  v)
inline

◆ shapes() [1/2]

std::vector<Shape> Ms::Segment::shapes ( )
inline

◆ shapes() [2/2]

const std::vector<Shape>& Ms::Segment::shapes ( ) const
inline

◆ sortStaves()

void Ms::Segment::sortStaves ( QList< int > &  dst)

◆ splitsTuplet()

bool Ms::Segment::splitsTuplet ( ) const

◆ staffShape() [1/2]

const Shape& Ms::Segment::staffShape ( int  staffIdx) const
inline

◆ staffShape() [2/2]

Shape& Ms::Segment::staffShape ( int  staffIdx)
inline

◆ stretch()

qreal Ms::Segment::stretch ( ) const
inline

◆ subTypeName() [1/2]

const char * Ms::Segment::subTypeName ( ) const

◆ subTypeName() [2/2]

const char * Ms::Segment::subTypeName ( SegmentType  t)
static

◆ swapElements()

void Ms::Segment::swapElements ( int  i1,
int  i2 
)

◆ system()

System* Ms::Segment::system ( ) const
inline

◆ tick()

Fraction Ms::Segment::tick ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ ticks()

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

◆ type()

virtual ElementType Ms::Segment::type ( ) const
inlinevirtual

Implements Ms::ScoreElement.

◆ write()

void Ms::Segment::write ( XmlWriter xml) const
virtual

Reimplemented from Ms::Element.

◆ written()

bool Ms::Segment::written ( ) const
inline

◆ x()

qreal Ms::Segment::x ( ) const
inlinevirtual

Reimplemented from Ms::Element.

Member Data Documentation

◆ _annotations

std::vector<Element*> Ms::Segment::_annotations
private

◆ _dotPosX

std::vector<qreal> Ms::Segment::_dotPosX
private

◆ _elist

std::vector<Element*> Ms::Segment::_elist
private

◆ _extraLeadingSpace

Spatium Ms::Segment::_extraLeadingSpace
private

◆ _next

Segment* Ms::Segment::_next = nullptr
private

◆ _prev

Segment* Ms::Segment::_prev = nullptr
private

◆ _segmentType

SegmentType Ms::Segment::_segmentType { SegmentType::Invalid }
private

◆ _shapes

std::vector<Shape> Ms::Segment::_shapes
private

◆ _stretch

qreal Ms::Segment::_stretch
private

◆ _tick

Fraction Ms::Segment::_tick
private

◆ _ticks

Fraction Ms::Segment::_ticks
private

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