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

Base class of score layout elements. More...

#include <element.h>

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

Public Types

enum  EditBehavior { EditBehavior::SelectOnly, EditBehavior::Edit }
 

Public Member Functions

 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
 
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 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 tick () const
 
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 writeProperties (XmlWriter &xml) const
 
virtual bool readProperties (XmlReader &)
 
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 add (Element *)
 
virtual void remove (Element *)
 
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 scanElements (void *data, void(*func)(void *, Element *), bool all=true)
 
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 QVariant getProperty (Pid) const override
 
virtual bool setProperty (Pid, const QVariant &) override
 
virtual void undoChangeProperty (Pid id, const QVariant &, PropertyFlags ps) override
 
virtual QVariant propertyDefault (Pid) const 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 QString accessibleExtraInfo () 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
 
virtual void setScore (Score *s)
 
const char * name () const
 
virtual QString userName () const
 
virtual ElementType type () const =0
 
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 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)
 

Public Attributes

bool itemDiscovered { false }
 helper flag for bsp More...
 

Protected Attributes

int _z
 
QColor _color
 element color attribute More...
 
- Protected Attributes inherited from Ms::ScoreElement
const ElementStyle_elementStyle { &emptyStyle }
 
PropertyFlags_propertyFlagsList { 0 }
 
LinkedElements_links { 0 }
 

Private Attributes

Element_parent { 0 }
 
QRectF _bbox
 Bounding box relative to _pos + _offset. More...
 
qreal _mag
 standard magnification (derived value) More...
 
QPointF _pos
 Reference position, relative to _parent, set by autoplace. More...
 
QPointF _offset
 offset from reference position, set by autoplace or user More...
 
OffsetChange _offsetChanged
 set by user actions that change offset, used by autoplace More...
 
QPointF _changedPos
 position set when changing offset More...
 
Spatium _minDistance
 autoplace min distance More...
 
int _track
 staffIdx * VOICES + voice More...
 
ElementFlags _flags
 valid after call to layout() More...
 
uint _tag
 tag bitmask More...
 

Additional Inherited Members

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

Detailed Description

Base class of score layout elements.

The Element class is the virtual base class of all score layout elements.

Member Enumeration Documentation

◆ EditBehavior

Enumerator
SelectOnly 
Edit 

Constructor & Destructor Documentation

◆ Element() [1/2]

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

◆ Element() [2/2]

Ms::Element::Element ( const Element e)

◆ ~Element()

Ms::Element::~Element ( )
virtual

Member Function Documentation

◆ _name()

virtual Q_INVOKABLE QString Ms::Element::_name ( ) const
inlinevirtual

◆ abbox()

QRectF Ms::Element::abbox ( ) const
inline

◆ acceptDrop()

virtual bool Ms::Element::acceptDrop ( EditData ) const
inlinevirtual

Return true if this element accepts a drop at canvas relative pos of given element type and subtype.

Reimplemented by elements that accept drops. Used to change cursor shape while dragging to indicate drop targets.

Reimplemented in Ms::Note, Ms::TextBase, Ms::FretDiagram, Ms::Harmony, Ms::Measure, Ms::Clef, Ms::Beam, Ms::BarLine, Ms::TimeSig, Ms::Bracket, Ms::Accidental, Ms::Lyrics, Ms::Box, Ms::Arpeggio, Ms::LayoutBreak, Ms::Rest, Ms::HairpinSegment, Ms::StaffState, Ms::Stem, Ms::KeySig, Ms::TrillSegment, and Ms::BSymbol.

◆ accessibleExtraInfo()

virtual QString Ms::Element::accessibleExtraInfo ( ) const
inlinevirtual

◆ accessibleInfo()

QString Ms::Element::accessibleInfo ( ) const
virtual

◆ add()

void Ms::Element::add ( Element e)
virtual

◆ addbbox()

virtual void Ms::Element::addbbox ( const QRectF &  r) const
inlinevirtual

◆ addToSkyline()

bool Ms::Element::addToSkyline ( ) const
inline

◆ autoplace()

bool Ms::Element::autoplace ( ) const

◆ autoplaceCalculateOffset()

void Ms::Element::autoplaceCalculateOffset ( QRectF &  r,
qreal  minDistance 
)

◆ autoplaceMeasureElement() [1/2]

void Ms::Element::autoplaceMeasureElement ( bool  above,
bool  add 
)

◆ autoplaceMeasureElement() [2/2]

void Ms::Element::autoplaceMeasureElement ( bool  add = true)
inline

◆ autoplaceSegmentElement() [1/2]

void Ms::Element::autoplaceSegmentElement ( bool  above,
bool  add 
)

◆ autoplaceSegmentElement() [2/2]

void Ms::Element::autoplaceSegmentElement ( bool  add = true)
inline

◆ baseLine()

virtual qreal Ms::Element::baseLine ( ) const
inlinevirtual

Reimplemented in Ms::TextBase, Ms::Harmony, Ms::FSymbol, and Ms::Symbol.

◆ bbox() [1/2]

virtual const QRectF& Ms::Element::bbox ( ) const
inlinevirtual

Reimplemented in Ms::SLine.

◆ bbox() [2/2]

virtual QRectF& Ms::Element::bbox ( )
inlinevirtual

◆ canvasBoundingRect()

QRectF Ms::Element::canvasBoundingRect ( ) const
inline

◆ canvasPos()

QPointF Ms::Element::canvasPos ( ) const
virtual

position in canvas coordinates

Reimplemented in Ms::Beam, Ms::BarLine, Ms::BSymbol, and Ms::StaffLines.

◆ canvasX()

qreal Ms::Element::canvasX ( ) const

◆ change()

void Ms::Element::change ( Element o,
Element n 
)
virtual

Reimplemented in Ms::Measure, and Ms::System.

◆ clone()

virtual Q_INVOKABLE Ms::Element* Ms::Element::clone ( ) const
pure virtual

◆ color()

virtual QColor Ms::Element::color ( ) const
inlinevirtual

◆ composition()

bool Ms::Element::composition ( ) const
inline

◆ concertPitch()

bool Ms::Element::concertPitch ( ) const

◆ contains()

bool Ms::Element::contains ( const QPointF &  p) const

◆ create()

Element * Ms::Element::create ( Ms::ElementType  type,
Score score 
)
static

◆ curColor() [1/3]

QColor Ms::Element::curColor ( ) const

◆ curColor() [2/3]

QColor Ms::Element::curColor ( bool  isVisible) const

◆ curColor() [3/3]

QColor Ms::Element::curColor ( bool  isVisible,
QColor  normalColor 
) const

◆ custom()

bool Ms::Element::custom ( Pid  id) const

◆ defaultGrip()

virtual Grip Ms::Element::defaultGrip ( ) const
inlinevirtual

◆ drag()

QRectF Ms::Element::drag ( EditData ed)
virtual

Return update Rect relative to canvas.

Reimplemented in Ms::Note, Ms::Beam, Ms::HBox, Ms::Dynamic, Ms::SystemDivider, Ms::BSymbol, and Ms::Rest.

◆ dragAnchor()

virtual QLineF Ms::Element::dragAnchor ( ) const
inlinevirtual

◆ draw()

virtual void Ms::Element::draw ( QPainter *  ) const
inlinevirtual

◆ drawAt()

void Ms::Element::drawAt ( QPainter *  p,
const QPointF &  pt 
) const
inline

◆ drawEditMode()

void Ms::Element::drawEditMode ( QPainter *  p,
EditData ed 
)
virtual

◆ drawSymbol() [1/2]

void Ms::Element::drawSymbol ( SymId  id,
QPainter *  p,
const QPointF &  o = QPointF(),
qreal  scale = 1.0 
) const

◆ drawSymbol() [2/2]

void Ms::Element::drawSymbol ( SymId  id,
QPainter *  p,
const QPointF &  o,
int  n 
) const

◆ drawSymbols() [1/2]

void Ms::Element::drawSymbols ( const std::vector< SymId > &  s,
QPainter *  p,
const QPointF &  o = QPointF(),
qreal  scale = 1.0 
) const

◆ drawSymbols() [2/2]

void Ms::Element::drawSymbols ( const std::vector< SymId > &  s,
QPainter *  p,
const QPointF &  o,
const QSizeF &  scale 
) const

◆ drop()

virtual Element* Ms::Element::drop ( EditData )
inlinevirtual

Handle a dropped element at canvas relative pos of given element type and subtype.

Returns dropped element if any. The ownership of element in DropData is transferred to the called element (if not used, element has to be deleted). The returned element will be selected if not in note edit mode.

Reimplemented by elements that accept drops.

Reimplemented in Ms::Note, Ms::TextBase, Ms::FretDiagram, Ms::Harmony, Ms::Measure, Ms::Clef, Ms::Beam, Ms::Chord, Ms::BarLine, Ms::TimeSig, Ms::Bracket, Ms::Accidental, Ms::ChordRest, Ms::Lyrics, Ms::Box, Ms::Arpeggio, Ms::LayoutBreak, Ms::Rest, Ms::HairpinSegment, Ms::StaffState, Ms::Stem, Ms::KeySig, Ms::TrillSegment, Ms::BSymbol, and Ms::TBox.

◆ dropTarget()

bool Ms::Element::dropTarget ( ) const
inline

◆ dump()

void Ms::Element::dump ( ) const
virtual

Reimplemented in Ms::Tuplet.

◆ edit()

bool Ms::Element::edit ( EditData ed)
virtual

◆ editCopy()

virtual void Ms::Element::editCopy ( EditData )
inlinevirtual

Reimplemented in Ms::TextBase.

◆ editCut()

virtual void Ms::Element::editCut ( EditData )
inlinevirtual

Reimplemented in Ms::TextBase.

◆ editDrag()

void Ms::Element::editDrag ( EditData ed)
virtual

◆ enabled()

bool Ms::Element::enabled ( ) const
inline

◆ endDrag()

void Ms::Element::endDrag ( EditData ed)
virtual

Reimplemented in Ms::Note, and Ms::Lasso.

◆ endEdit()

void Ms::Element::endEdit ( EditData )
virtual

◆ endEditDrag()

void Ms::Element::endEditDrag ( EditData ed)
virtual

◆ findMeasure() [1/2]

Measure * Ms::Element::findMeasure ( )

◆ findMeasure() [2/2]

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

◆ findMeasureBase() [1/2]

MeasureBase * Ms::Element::findMeasureBase ( )

◆ findMeasureBase() [2/2]

const MeasureBase * Ms::Element::findMeasureBase ( ) const

◆ flag()

bool Ms::Element::flag ( ElementFlag  f) const
inline

◆ generated()

bool Ms::Element::generated ( ) const
inline

◆ getProperty()

QVariant Ms::Element::getProperty ( Pid  propertyId) const
overridevirtual

◆ gripAnchor()

virtual QPointF Ms::Element::gripAnchor ( Grip  ) const
inlinevirtual

◆ gripsCount()

virtual int Ms::Element::gripsCount ( ) const
inlinevirtual

◆ gripsPositions()

virtual std::vector<QPointF> Ms::Element::gripsPositions ( const EditData ) const
inlinevirtual

◆ header()

bool Ms::Element::header ( ) const
inline

◆ height()

virtual qreal Ms::Element::height ( ) const
inlinevirtual

◆ initialEditModeGrip()

virtual Grip Ms::Element::initialEditModeGrip ( ) const
inlinevirtual

◆ intersects()

bool Ms::Element::intersects ( const QRectF &  r) const

◆ ipos()

const QPointF& Ms::Element::ipos ( ) const
inline

◆ isEditable()

virtual bool Ms::Element::isEditable ( ) const
inlinevirtual

◆ isElement()

virtual bool Ms::Element::isElement ( ) const
inlineoverridevirtual

Reimplemented from Ms::ScoreElement.

◆ isMovable()

virtual bool Ms::Element::isMovable ( ) const
inlinevirtual

Reimplemented in Ms::Beam, and Ms::HBox.

◆ isNudged()

bool Ms::Element::isNudged ( ) const
inline

◆ isPrintable()

bool Ms::Element::isPrintable ( ) const

◆ isUserModified()

bool Ms::Element::isUserModified ( ) const
virtual

◆ layout()

virtual void Ms::Element::layout ( )
inlinevirtual

◆ linkedClone()

Element * Ms::Element::linkedClone ( )
virtual

Reimplemented in Ms::Chord, Ms::Rest, and Ms::RepeatMeasure.

◆ localSpatiumChanged()

void Ms::Element::localSpatiumChanged ( qreal  oldValue,
qreal  newValue 
)
virtual

◆ mag()

virtual qreal Ms::Element::mag ( ) const
inlinevirtual

◆ magS()

qreal Ms::Element::magS ( ) const

◆ mimeData()

QByteArray Ms::Element::mimeData ( const QPointF &  dragOffset) const
virtual

Reimplemented in Ms::SpannerSegment.

◆ minDistance()

Spatium Ms::Element::minDistance ( ) const
inline

◆ mousePress()

virtual bool Ms::Element::mousePress ( EditData )
inlinevirtual

delivers mouseEvent to element in edit mode returns true if mouse event is accepted by element

Reimplemented in Ms::TextBase.

◆ move()

virtual void Ms::Element::move ( const QPointF &  s)
inlinevirtual

Reimplemented in Ms::Beam, and Ms::SlurTieSegment.

◆ name2Element()

Element * Ms::Element::name2Element ( const QStringRef &  s,
Score sc 
)
static

◆ nextElement()

Element * Ms::Element::nextElement ( )
virtual

Reimplemented in Ms::Note, Ms::Chord, Ms::ChordRest, and Ms::Rest.

◆ nextGrip()

bool Ms::Element::nextGrip ( EditData ed) const
virtual

◆ nextSegmentElement()

Element * Ms::Element::nextSegmentElement ( )
virtual

◆ normalModeEditBehavior()

virtual EditBehavior Ms::Element::normalModeEditBehavior ( ) const
inlinevirtual

◆ offset()

const QPointF& Ms::Element::offset ( ) const
inline

◆ offsetChanged()

OffsetChange Ms::Element::offsetChanged ( ) const
inline

◆ operator=()

Element& Ms::Element::operator= ( const Element )
delete

◆ pageBoundingRect()

QRectF Ms::Element::pageBoundingRect ( ) const
inline

◆ pagePos()

QPointF Ms::Element::pagePos ( ) const
virtual

◆ pageX()

qreal Ms::Element::pageX ( ) const

◆ parent()

Element* Ms::Element::parent ( ) const
inline

◆ part()

Part * Ms::Element::part ( ) const

◆ placeAbove()

bool Ms::Element::placeAbove ( ) const
inline

◆ placeBelow()

bool Ms::Element::placeBelow ( ) const
inline

◆ placement()

Placement Ms::Element::placement ( ) const
inline

◆ point()

qreal Ms::Element::point ( const Spatium  sp) const
inline

◆ pos()

virtual const QPointF Ms::Element::pos ( ) const
inlinevirtual

◆ prevElement()

Element * Ms::Element::prevElement ( )
virtual

Reimplemented in Ms::Note, Ms::Chord, Ms::ChordRest, and Ms::Rest.

◆ prevGrip()

bool Ms::Element::prevGrip ( EditData ed) const
virtual

◆ prevSegmentElement()

Element * Ms::Element::prevSegmentElement ( )
virtual

◆ propertyDefault()

QVariant Ms::Element::propertyDefault ( Pid  pid) const
overridevirtual

◆ propertyDelegate()

virtual Element* Ms::Element::propertyDelegate ( Pid  )
inlinevirtual

◆ propertyId()

Pid Ms::Element::propertyId ( const QStringRef &  xmlName) const
overridevirtual

◆ propertyUserValue()

QString Ms::Element::propertyUserValue ( Pid  pid) const
overridevirtual

Reimplemented from Ms::ScoreElement.

Reimplemented in Ms::Note, Ms::Dynamic, Ms::Accidental, and Ms::Tremolo.

◆ read()

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

◆ readMimeData()

Element * Ms::Element::readMimeData ( Score score,
const QByteArray &  data,
QPointF *  dragOffset,
Fraction duration 
)
static

◆ readProperties()

bool Ms::Element::readProperties ( XmlReader e)
virtual

◆ readType()

ElementType Ms::Element::readType ( XmlReader node,
QPointF *  dragOffset,
Fraction duration 
)
static

◆ rebaseMinDistance()

bool Ms::Element::rebaseMinDistance ( qreal &  md,
qreal &  yd,
qreal  sp,
qreal  rebase,
bool  above,
bool  fix 
)

◆ rebaseOffset()

qreal Ms::Element::rebaseOffset ( bool  nox = true)

◆ remove()

void Ms::Element::remove ( Element e)
virtual

◆ reset()

void Ms::Element::reset ( )
overridevirtual

◆ roffset()

QPointF& Ms::Element::roffset ( )
inline

◆ rpos()

QPointF& Ms::Element::rpos ( )
inline

◆ rtick()

Fraction Ms::Element::rtick ( ) const
virtual

Reimplemented in Ms::Segment, Ms::Tuplet, and Ms::Beam.

◆ rxoffset()

qreal& Ms::Element::rxoffset ( )
inline

◆ rxpos()

qreal& Ms::Element::rxpos ( )
inline

◆ ryoffset()

qreal& Ms::Element::ryoffset ( )
inline

◆ rypos()

qreal& Ms::Element::rypos ( )
inline

◆ scanElements()

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

◆ screenReaderInfo()

virtual QString Ms::Element::screenReaderInfo ( ) const
inlinevirtual

◆ selectable()

bool Ms::Element::selectable ( ) const
inline

◆ selected()

bool Ms::Element::selected ( ) const
inline

◆ setAutoplace()

virtual void Ms::Element::setAutoplace ( bool  v)
inlinevirtual

Reimplemented in Ms::Spanner.

◆ setbbox()

virtual void Ms::Element::setbbox ( const QRectF &  r) const
inlinevirtual

◆ setColor()

virtual void Ms::Element::setColor ( const QColor &  c)
inlinevirtual

Reimplemented in Ms::Spanner, and Ms::SpannerSegment.

◆ setComposition()

void Ms::Element::setComposition ( bool  v) const
inline

◆ setDropTarget()

void Ms::Element::setDropTarget ( bool  v) const
inline

◆ setEnabled()

void Ms::Element::setEnabled ( bool  val)
inline

◆ setFlag() [1/2]

void Ms::Element::setFlag ( ElementFlag  f,
bool  v 
)
inline

◆ setFlag() [2/2]

void Ms::Element::setFlag ( ElementFlag  f,
bool  v 
) const
inline

◆ setGenerated()

void Ms::Element::setGenerated ( bool  val)
inline

◆ setHeader()

void Ms::Element::setHeader ( bool  v)
inline

◆ setHeight()

virtual void Ms::Element::setHeight ( qreal  v)
inlinevirtual

Reimplemented in Ms::Arpeggio, and Ms::Bracket.

◆ setMag()

void Ms::Element::setMag ( qreal  val)
inline

◆ setMinDistance()

void Ms::Element::setMinDistance ( Spatium  v)
inline

◆ setOffset() [1/2]

virtual void Ms::Element::setOffset ( const QPointF &  o)
inlinevirtual

Reimplemented in Ms::Rest.

◆ setOffset() [2/2]

void Ms::Element::setOffset ( qreal  x,
qreal  y 
)
inline

◆ setOffsetChanged()

void Ms::Element::setOffsetChanged ( bool  v,
bool  absolute = true,
const QPointF &  diff = QPointF() 
)

◆ setParent()

void Ms::Element::setParent ( Element e)
inline

◆ setPlacement()

void Ms::Element::setPlacement ( Placement  val)
inline

◆ setPos() [1/2]

void Ms::Element::setPos ( qreal  x,
qreal  y 
)
inline

◆ setPos() [2/2]

void Ms::Element::setPos ( const QPointF &  p)
inline

◆ setProperty()

bool Ms::Element::setProperty ( Pid  propertyId,
const QVariant &  v 
)
overridevirtual

◆ setSelectable()

void Ms::Element::setSelectable ( bool  val)
inline

◆ setSelected()

virtual void Ms::Element::setSelected ( bool  f)
inlinevirtual

◆ setSizeIsSpatiumDependent()

void Ms::Element::setSizeIsSpatiumDependent ( bool  v)
inline

◆ setSystemFlag()

void Ms::Element::setSystemFlag ( bool  v) const
inline

◆ setTag()

void Ms::Element::setTag ( uint  val)
inline

◆ setTrack()

virtual void Ms::Element::setTrack ( int  val)
inlinevirtual

◆ setTrailer()

void Ms::Element::setTrailer ( bool  val)
inline

◆ setVisible()

virtual void Ms::Element::setVisible ( bool  f)
inlinevirtual

◆ setVoice()

void Ms::Element::setVoice ( int  v)
inline

◆ setWidth()

virtual void Ms::Element::setWidth ( qreal  v)
inlinevirtual

◆ setZ()

void Ms::Element::setZ ( int  val)
inline

◆ shape()

virtual Shape Ms::Element::shape ( ) const
inlinevirtual

◆ sizeIsSpatiumDependent()

virtual bool Ms::Element::sizeIsSpatiumDependent ( ) const
inlineoverridevirtual

Reimplemented from Ms::ScoreElement.

◆ spatium()

qreal Ms::Element::spatium ( ) const

◆ spatiumChanged()

void Ms::Element::spatiumChanged ( qreal  oldValue,
qreal  newValue 
)
virtual

◆ staff()

Staff * Ms::Element::staff ( ) const

◆ staffIdx()

int Ms::Element::staffIdx ( ) const
inline

◆ staffType()

StaffType * Ms::Element::staffType ( ) const

◆ startDrag()

void Ms::Element::startDrag ( EditData ed)
virtual

Reimplemented in Ms::Note, and Ms::Beam.

◆ startEdit()

void Ms::Element::startEdit ( EditData ed)
virtual

◆ startEditDrag()

void Ms::Element::startEditDrag ( EditData ed)
virtual

◆ styleP()

qreal Ms::Element::styleP ( Sid  idx) const

◆ subtype()

virtual int Ms::Element::subtype ( ) const
inlinevirtual

◆ subtypeName()

QString Ms::Element::subtypeName ( ) const
virtual

◆ symAdvance()

qreal Ms::Element::symAdvance ( SymId  id) const

◆ symBbox() [1/2]

QRectF Ms::Element::symBbox ( SymId  id) const

◆ symBbox() [2/2]

QRectF Ms::Element::symBbox ( const std::vector< SymId > &  s) const

◆ symCutOutNE()

QPointF Ms::Element::symCutOutNE ( SymId  id) const

◆ symCutOutNW()

QPointF Ms::Element::symCutOutNW ( SymId  id) const

◆ symCutOutSE()

QPointF Ms::Element::symCutOutSE ( SymId  id) const

◆ symCutOutSW()

QPointF Ms::Element::symCutOutSW ( SymId  id) const

◆ symHeight()

qreal Ms::Element::symHeight ( SymId  id) const

◆ symIsValid()

bool Ms::Element::symIsValid ( SymId  id) const

◆ symStemDownNW()

QPointF Ms::Element::symStemDownNW ( SymId  id) const

◆ symStemUpSE()

QPointF Ms::Element::symStemUpSE ( SymId  id) const

◆ symWidth() [1/2]

qreal Ms::Element::symWidth ( SymId  id) const

◆ symWidth() [2/2]

qreal Ms::Element::symWidth ( const std::vector< SymId > &  s) const

◆ systemFlag()

bool Ms::Element::systemFlag ( ) const
inline

◆ tag()

uint Ms::Element::tag ( ) const
inline

◆ tick()

Fraction Ms::Element::tick ( ) const
virtual

◆ track()

int Ms::Element::track ( ) const
inline

◆ trailer()

bool Ms::Element::trailer ( ) const
inline

◆ triggerLayout()

void Ms::Element::triggerLayout ( ) const
virtual

◆ triggerLayoutAll()

void Ms::Element::triggerLayoutAll ( ) const
virtual

Reimplemented in Ms::Spanner.

◆ undoChangeProperty()

void Ms::Element::undoChangeProperty ( Pid  id,
const QVariant &  val,
PropertyFlags  ps 
)
overridevirtual

◆ undoSetColor()

void Ms::Element::undoSetColor ( const QColor &  c)

◆ undoSetVisible()

void Ms::Element::undoSetVisible ( bool  v)

◆ updateGrips()

void Ms::Element::updateGrips ( EditData ed) const

◆ visible()

bool Ms::Element::visible ( ) const
inline

◆ voice()

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

◆ vStaffIdx()

virtual int Ms::Element::vStaffIdx ( ) const
inlinevirtual

Reimplemented in Ms::ChordRest, and Ms::Stem.

◆ width()

virtual qreal Ms::Element::width ( ) const
inlinevirtual

Reimplemented in Ms::Bracket.

◆ write()

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

◆ writeProperties()

void Ms::Element::writeProperties ( XmlWriter xml) const
virtual

◆ x()

virtual qreal Ms::Element::x ( ) const
inlinevirtual

Reimplemented in Ms::Segment.

◆ y()

virtual qreal Ms::Element::y ( ) const
inlinevirtual

◆ z()

int Ms::Element::z ( ) const

Member Data Documentation

◆ _bbox

QRectF Ms::Element::_bbox
mutableprivate

Bounding box relative to _pos + _offset.

◆ _changedPos

QPointF Ms::Element::_changedPos
private

position set when changing offset

◆ _color

QColor Ms::Element::_color
protected

element color attribute

◆ _flags

ElementFlags Ms::Element::_flags
mutableprivate

valid after call to layout()

◆ _mag

qreal Ms::Element::_mag
private

standard magnification (derived value)

◆ _minDistance

Spatium Ms::Element::_minDistance
private

autoplace min distance

◆ _offset

QPointF Ms::Element::_offset
private

offset from reference position, set by autoplace or user

◆ _offsetChanged

OffsetChange Ms::Element::_offsetChanged
private

set by user actions that change offset, used by autoplace

◆ _parent

Element* Ms::Element::_parent { 0 }
private

◆ _pos

QPointF Ms::Element::_pos
private

Reference position, relative to _parent, set by autoplace.

◆ _tag

uint Ms::Element::_tag
private

tag bitmask

◆ _track

int Ms::Element::_track
private

staffIdx * VOICES + voice

◆ _z

int Ms::Element::_z
mutableprotected

◆ itemDiscovered

bool Ms::Element::itemDiscovered { false }
mutable

helper flag for bsp


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