13 #ifndef __SCORE_ELEMENT_H__ 14 #define __SCORE_ELEMENT_H__ 24 class ConnectorInfoReader;
50 class GlissandoSegment;
67 class LyricsLineSegment;
79 class InstrumentChange;
91 class DurationElement;
94 class TextLineSegment;
112 class SlurTieSegment;
114 class StaffTypeChange;
120 class SpannerSegment;
122 class BagpipeEmbellishment;
129 class LetRingSegment;
131 class VibratoSegment;
133 class PalmMuteSegment;
138 enum class Pid : int;
140 enum class
Sid : int;
153 void setLid(
Score*,
int val);
154 int lid()
const {
return _lid; }
181 virtual int getPropertyFlagsIdx(
Pid id)
const;
192 const char* name()
const;
193 virtual QString userName()
const;
196 static ElementType name2type(
const QStringRef&,
bool silent =
false);
200 virtual QVariant getProperty(
Pid)
const = 0;
201 virtual bool setProperty(
Pid,
const QVariant&) = 0;
202 virtual QVariant propertyDefault(
Pid)
const;
203 virtual void resetProperty(
Pid id);
204 QVariant propertyDefault(
Pid pid,
Tid tid)
const;
207 virtual void reset();
210 virtual QString propertyUserValue(
Pid)
const;
217 bool isStyled(
Pid pid)
const;
218 QVariant styleValue(
Pid,
Sid)
const;
222 virtual Sid getPropertyStyle(
Pid)
const;
225 bool readStyledProperty(
XmlReader& e,
const QStringRef& tag);
229 virtual void styleChanged();
232 void undoChangeProperty(
Pid id,
const QVariant&);
233 void undoResetProperty(
Pid id);
235 void undoPushProperty(
Pid);
237 void writeStyledProperties(
XmlWriter&)
const;
239 QList<ScoreElement*> linkList()
const;
245 virtual void undoUnlink();
246 int lid()
const {
return _links ? _links->lid() : 0; }
259 #define CONVERT(a,b) \ 260 bool is##a() const { return type() == ElementType::b; } 360 bool isChordRest()
const {
return isRest() || isChord() || isRepeatMeasure(); }
363 bool isSLineSegment()
const;
364 bool isBox()
const {
return isVBox() || isHBox() || isTBox() || isFBox(); }
365 bool isVBoxBase()
const {
return isVBox() || isTBox() || isFBox(); }
367 bool isTextBase()
const;
369 return isHairpinSegment()
370 || isLetRingSegment()
371 || isTextLineSegment()
373 || isPalmMuteSegment()
379 return isGlissandoSegment()
380 || isLyricsLineSegment()
381 || isTextLineBaseSegment()
383 || isVibratoSegment()
386 bool isSpannerSegment()
const {
return isLineSegment() || isTextLineBaseSegment() || isSlurSegment() || isTieSegment(); }
387 bool isBSymbol()
const {
return isImage() || isSymbol(); }
400 return isTextLineBase() || isTrill() || isGlissando() || isVibrato();
413 return isStaffText() || isSystemText();
451 return (
const Rest*)e;
470 Q_ASSERT(e == 0 || e->
isBox());
507 static inline a* to##a(ScoreElement* e) { Q_ASSERT(e == 0 || e->is##a()); return (a*)e; } \ 508 static inline const a* to##a(const ScoreElement* e) { Q_ASSERT(e == 0 || e->is##a()); return (const a*)e; }
Helper class for reading beams, tuplets and spanners.
Definition: connector.h:96
horizontal frame
Definition: box.h:103
virtual base class for frames "boxes"
Definition: box.h:33
Definition: bracketItem.h:25
bool isFBox() const
Definition: scoreElement.h:278
bezier line attached to top note of a chord implements fall, doit, plop, bend
Definition: chordline.h:34
Global staff data not directly related to drawing.
Definition: staff.h:62
Definition: palmmute.h:44
symbols for line break, page break etc.
Definition: layoutbreak.h:27
Score * _score
Definition: scoreElement.h:174
Pid
Definition: property.h:62
Virtual base class for Measure, HBox and VBox.
Definition: measurebase.h:61
This class represents a time signature.
Definition: timesig.h:41
Definition: bagpembell.h:51
bool isTextLineBaseSegment() const
Definition: scoreElement.h:368
Fretboard diagram.
Definition: fret.h:122
virtual PropertyFlags * propertyFlagsList() const
Definition: scoreElement.h:215
Definition: editdrumset.cpp:32
Text frame.
Definition: textframe.h:27
void setLinks(LinkedElements *le)
Definition: scoreElement.h:248
static ElementStyle const emptyStyle
Definition: scoreElement.h:175
parent: System
Definition: spanner.h:50
Definition: scoreElement.h:146
Graphic representation of a note stem.
Definition: stem.h:27
bool isSlurTieSegment() const
Definition: scoreElement.h:362
Definition: measurenumber.h:24
one measure in a system
Definition: measure.h:65
Definition: scoreElement.h:163
bool isBSymbol() const
Definition: scoreElement.h:387
Tempo marker which determines the midi tempo.
Definition: tempotext.h:29
Definition: scoreElement.h:173
LinkedElements * links() const
Definition: scoreElement.h:247
std::vector< StyledProperty > ElementStyle
Definition: style.h:1339
bool isStaffTextBase() const
Definition: scoreElement.h:412
virtual bool isElement() const
Definition: scoreElement.h:359
Symbol constructed from a font glyph.
Definition: symbol.h:66
bool isLineSegment() const
Definition: scoreElement.h:378
virtual bool sizeIsSpatiumDependent() const
Definition: scoreElement.h:205
Jump label.
Definition: jump.h:31
ElementType type
Definition: scoreElement.h:164
Graphic representation of a clef.
Definition: clef.h:132
bool isSpanner() const
Definition: scoreElement.h:403
bool isRepeatMeasure() const
Definition: scoreElement.h:310
Definition: accidental.h:65
Definition: stafftextbase.h:35
Definition: noteline.h:26
Definition: arpeggio.h:30
PropertyFlags
Definition: property.h:54
bool isChordRest() const
Definition: scoreElement.h:360
base class for Symbol and Image
Definition: bsymbol.h:25
bool isTBox() const
Definition: scoreElement.h:277
Example of 1/8 triplet: _baseLen = 1/8 _actualNotes = 3 _normalNotes = 2 (3 notes played in the time ...
Definition: tuplet.h:37
Definition: stafftypechange.h:26
virtual void setScore(Score *s)
Definition: scoreElement.h:191
Score * score() const
Definition: scoreElement.h:189
The StaffLines class is the graphic representation of a staff, it draws the horizontal staff lines...
Definition: stafflines.h:23
bool isTextBase() const
Definition: scoreElement.cpp:840
Vertical spacer element to adjust the distance of staves.
Definition: spacer.h:33
int lid() const
Definition: scoreElement.h:246
bool isVBoxBase() const
Definition: scoreElement.h:365
Definition: palmmute.h:26
int lid() const
Definition: scoreElement.h:154
frame containing fret diagrams
Definition: box.h:154
QVariant readProperty(Pid id, XmlReader &e)
Definition: property.cpp:581
Definition: glissando.h:49
Definition: tremolobar.h:29
virtual ElementType type() const =0
The KeySig class represents a Key Signature on a staff.
Definition: keysig.h:31
Tid
Enumerates the list of built-in text substyles.
Definition: types.h:371
a single segment of slur; also used for Tie
Definition: slur.h:25
bool isTextLineBase() const
Definition: scoreElement.h:388
articulation marks
Definition: articulation.h:57
used for grace notes of type acciaccatura
Definition: stemslash.h:26
Definition: textbase.h:217
int _lid
Definition: scoreElement.h:147
dynamics marker; determines midi velocity
Definition: dynamic.h:31
Definition: stafftext.h:27
bool isSpannerSegment() const
Definition: scoreElement.h:386
Definition: aeolus.cpp:26
bool isHBox() const
Definition: scoreElement.h:275
bool isVBox() const
Definition: scoreElement.h:276
Sid
Definition: style.h:33
This class implements a rest.
Definition: rest.h:29
#define CONVERT(a, b)
Definition: scoreElement.h:506
Virtual base class for Chord, Rest and Tuplet.
Definition: duration.h:34
static ElementType name2type(const QString &s)
Definition: scoreElement.h:197
bool isSLine() const
Definition: scoreElement.h:399
Definition: xmlwriter.h:26
Definition: textline.h:26
a Tie has a Note as startElement/endElement
Definition: tie.h:60
bool isBox() const
Definition: scoreElement.h:364
Symbol constructed from builtin symbol.
Definition: symbol.h:31
Graphic representation of a chord.
Definition: chord.h:55
Definition: fingering.h:24
Definition: chordrest.h:48
virtual const ElementStyle * styledProperties() const
Definition: scoreElement.h:213
Definition: glissando.h:33
Definition: textline.h:42
Definition: systemdivider.h:25
Definition: textlinebase.h:70
bool isRest() const
Definition: scoreElement.h:263
Definition: instrchange.h:25
One row of measures for all instruments; a complete piece of the timeline.
Definition: system.h:79
const char * userName
Definition: scoreElement.h:166
bool isMeasureBase() const
Definition: scoreElement.h:366
Graphic representation of a note.
Definition: note.h:212
Graphic representation of a ledger line.
Definition: ledgerline.h:31
ElementType
Definition: types.h:34
Symbol
Definition: symbols.h:31
vertical frame
Definition: box.h:137
breathType() is index in symList
Definition: breath.h:37
bool isDurationElement() const
Definition: scoreElement.h:361
const char * name
Definition: scoreElement.h:165
Drum sticking.
Definition: sticking.h:32
Definition: systemtext.h:24
Pid propertyId(const QStringRef &s)
Definition: property.cpp:347
Definition: staffstate.h:32
ScoreElement(Score *s)
Definition: scoreElement.h:184
bool isMeasure() const
Definition: scoreElement.h:272
a single segment of slur; also used for Tie
Definition: tie.h:25
Definition: rehearsalmark.h:24