27class Lyrics final :
public TextBase {
43 static constexpr int TEMP_MELISMA_TICKS = 1;
52 LyricsLine* _separator;
54 bool isMelisma()
const;
55 void undoChangeProperty(Pid
id,
const QVariant&, PropertyFlags ps)
override;
66 Lyrics* clone()
const override {
return new Lyrics(*
this); }
68 void scanElements(
void* data,
void (*func)(
void*, Element*),
bool all=
true)
override;
69 bool acceptDrop(EditData&)
const override;
70 Element* drop(EditData&)
override;
72 Segment* segment()
const {
return toSegment(parent()->parent()); }
73 Measure* measure()
const {
return toMeasure(parent()->parent()->parent()); }
74 ChordRest* chordRest()
const {
return toChordRest(parent()); }
76 void layout()
override;
79 void write(XmlWriter& xml)
const override;
80 void read(XmlReader&)
override;
81 bool readProperties(XmlReader&)
override;
82 int subtype()
const override {
return _no; }
83 QString subtypeName()
const override {
return QObject::tr(
"Verse %1").arg(
_no + 1); }
84 void setNo(
int n) {
_no = n; }
85 int no()
const {
return _no; }
86 bool isEven()
const {
return _no % 1; }
87 void setSyllabic(
Syllabic s) { _syllabic = s; }
88 Syllabic syllabic()
const {
return _syllabic; }
89 void add(Element*)
override;
90 void remove(Element*)
override;
91 void endEdit(EditData&)
override;
93 Fraction ticks()
const {
return _ticks; }
94 void setTicks(
const Fraction& tick) { _ticks = tick; }
95 Fraction endTick()
const;
96 void removeFromScore();
98 using ScoreElement::undoChangeProperty;
99 void paste(EditData&)
override;
101 QVariant getProperty(Pid propertyId)
const override;
102 bool setProperty(Pid propertyId,
const QVariant&)
override;
103 QVariant propertyDefault(Pid
id)
const override;