@@ -54,34 +54,34 @@ static const ElementStyle lyricsElementStyle {
54
54
Lyrics::Lyrics (ChordRest* parent)
55
55
: TextBase(ElementType::LYRICS, parent, TextStyleType::LYRICS_ODD)
56
56
{
57
- m_even = false ;
58
- m_separator = 0 ;
57
+ _even = false ;
58
+ _separator = 0 ;
59
59
initElementStyle (&lyricsElementStyle);
60
- m_no = 0 ;
61
- m_ticks = Fraction (0 , 1 );
62
- m_syllabic = LyricsSyllabic::SINGLE;
60
+ _no = 0 ;
61
+ _ticks = Fraction (0 , 1 );
62
+ _syllabic = LyricsSyllabic::SINGLE;
63
63
}
64
64
65
65
Lyrics::Lyrics (const Lyrics& l)
66
66
: TextBase(l)
67
67
{
68
- m_even = l.m_even ;
69
- m_no = l.m_no ;
70
- m_ticks = l.m_ticks ;
71
- m_syllabic = l.m_syllabic ;
72
- m_separator = 0 ;
68
+ _even = l._even ;
69
+ _no = l._no ;
70
+ _ticks = l._ticks ;
71
+ _syllabic = l._syllabic ;
72
+ _separator = 0 ;
73
73
}
74
74
75
75
Lyrics::~Lyrics ()
76
76
{
77
- if (m_separator ) {
78
- remove (m_separator );
77
+ if (_separator ) {
78
+ remove (_separator );
79
79
}
80
80
}
81
81
82
82
TranslatableString Lyrics::subtypeUserName () const
83
83
{
84
- return TranslatableString (" engraving" , " Verse %1" ).arg (m_no + 1 );
84
+ return TranslatableString (" engraving" , " Verse %1" ).arg (_no + 1 );
85
85
}
86
86
87
87
// ---------------------------------------------------------
@@ -106,11 +106,11 @@ void Lyrics::remove(EngravingItem* el)
106
106
{
107
107
if (el->isLyricsLine ()) {
108
108
// only if separator still exists and is the right one
109
- if (m_separator && el == m_separator ) {
109
+ if (_separator && el == _separator ) {
110
110
// Lyrics::remove() and LyricsLine::removeUnmanaged() call each other;
111
111
// be sure each finds a clean context
112
- LyricsLine* separ = m_separator ;
113
- m_separator = 0 ;
112
+ LyricsLine* separ = _separator ;
113
+ _separator = 0 ;
114
114
separ->resetExplicitParent ();
115
115
separ->removeUnmanaged ();
116
116
}
@@ -126,19 +126,19 @@ void Lyrics::remove(EngravingItem* el)
126
126
bool Lyrics::isMelisma () const
127
127
{
128
128
// entered as melisma using underscore?
129
- if (m_ticks > Fraction (0 , 1 )) {
129
+ if (_ticks > Fraction (0 , 1 )) {
130
130
return true ;
131
131
}
132
132
133
133
// hyphenated?
134
134
// if so, it is a melisma only if there is no lyric in same verse on next CR
135
- if (m_separator && (m_syllabic == LyricsSyllabic::BEGIN || m_syllabic == LyricsSyllabic::MIDDLE)) {
135
+ if (_separator && (_syllabic == LyricsSyllabic::BEGIN || _syllabic == LyricsSyllabic::MIDDLE)) {
136
136
// find next CR on same track and check for existence of lyric in same verse
137
137
ChordRest* cr = chordRest ();
138
138
if (cr) {
139
139
Segment* s = cr->segment ()->next1 ();
140
140
ChordRest* ncr = s ? s->nextChordRest (cr->track ()) : 0 ;
141
- if (ncr && !ncr->lyrics (m_no , placement ())) {
141
+ if (ncr && !ncr->lyrics (_no , placement ())) {
142
142
return true ;
143
143
}
144
144
}
@@ -172,10 +172,10 @@ void Lyrics::layout2(int nAbove)
172
172
173
173
if (placeBelow ()) {
174
174
double yo = segment ()->measure ()->system ()->staff (staffIdx ())->bbox ().height ();
175
- setPosY (lh * (m_no - nAbove) + yo - chordRest ()->y ());
175
+ setPosY (lh * (_no - nAbove) + yo - chordRest ()->y ());
176
176
movePos (styleValue (Pid::OFFSET, Sid::lyricsPosBelow).value <PointF>());
177
177
} else {
178
- setPosY (-lh * (nAbove - m_no - 1 ) - chordRest ()->y ());
178
+ setPosY (-lh * (nAbove - _no - 1 ) - chordRest ()->y ());
179
179
movePos (styleValue (Pid::OFFSET, Sid::lyricsPosAbove).value <PointF>());
180
180
}
181
181
}
@@ -329,10 +329,10 @@ void Lyrics::adjustPrevious()
329
329
} else {
330
330
prev->undoChangeProperty (Pid::LYRIC_TICKS, Fraction::fromTicks (1 ));
331
331
}
332
- prev->setIsRemoveInvalidSegments ();
333
- prev->triggerLayout ();
334
332
}
335
333
}
334
+ prev->setRemoveInvalidSegments ();
335
+ prev->triggerLayout ();
336
336
}
337
337
}
338
338
@@ -353,23 +353,23 @@ void Lyrics::endEdit(EditData& ed)
353
353
354
354
void Lyrics::removeFromScore ()
355
355
{
356
- if (m_ticks .isNotZero ()) {
356
+ if (_ticks .isNotZero ()) {
357
357
// clear melismaEnd flag from end cr
358
358
ChordRest* ecr = score ()->findCR (endTick (), track ());
359
359
if (ecr) {
360
360
ecr->setMelismaEnd (false );
361
361
}
362
362
}
363
363
364
- if (m_separator ) {
365
- m_separator ->removeUnmanaged ();
366
- delete m_separator ;
367
- m_separator = 0 ;
364
+ if (_separator ) {
365
+ _separator ->removeUnmanaged ();
366
+ delete _separator ;
367
+ _separator = 0 ;
368
368
}
369
369
Lyrics* prev = prevLyrics (this );
370
370
if (prev) {
371
371
// check to make sure we haven't created an invalid segment by deleting this lyric
372
- prev->setIsRemoveInvalidSegments ();
372
+ prev->setRemoveInvalidSegments ();
373
373
}
374
374
}
375
375
@@ -381,11 +381,11 @@ PropertyValue Lyrics::getProperty(Pid propertyId) const
381
381
{
382
382
switch (propertyId) {
383
383
case Pid::SYLLABIC:
384
- return int (m_syllabic );
384
+ return int (_syllabic );
385
385
case Pid::LYRIC_TICKS:
386
- return m_ticks ;
386
+ return _ticks ;
387
387
case Pid::VERSE:
388
- return m_no ;
388
+ return _no ;
389
389
default :
390
390
return TextBase::getProperty (propertyId);
391
391
}
@@ -405,10 +405,10 @@ bool Lyrics::setProperty(Pid propertyId, const PropertyValue& v)
405
405
setPlacement (v.value <PlacementV>());
406
406
break ;
407
407
case Pid::SYLLABIC:
408
- m_syllabic = LyricsSyllabic (v.toInt ());
408
+ _syllabic = LyricsSyllabic (v.toInt ());
409
409
break ;
410
410
case Pid::LYRIC_TICKS:
411
- if (m_ticks .isNotZero ()) {
411
+ if (_ticks .isNotZero ()) {
412
412
// clear melismaEnd flag from previous end cr
413
413
// this might be premature, as there may be other melismas ending there
414
414
// but flag will be generated correctly on layout
@@ -422,15 +422,15 @@ bool Lyrics::setProperty(Pid propertyId, const PropertyValue& v)
422
422
}
423
423
}
424
424
scr = score ()->findCR (tick (), track ());
425
- m_ticks = v.value <Fraction>();
426
- if (scr && m_ticks <= scr->ticks ()) {
425
+ _ticks = v.value <Fraction>();
426
+ if (scr && _ticks <= scr->ticks ()) {
427
427
// if no ticks, we have to relayout in order to remove invalid melisma segments
428
- setIsRemoveInvalidSegments ();
429
- renderer ()->layoutItem (this );
428
+ setRemoveInvalidSegments ();
429
+ layout ()->layoutItem (this );
430
430
}
431
431
break ;
432
432
case Pid::VERSE:
433
- m_no = v.toInt ();
433
+ _no = v.toInt ();
434
434
break ;
435
435
default :
436
436
if (!TextBase::setProperty (propertyId, v)) {
@@ -471,9 +471,9 @@ PropertyValue Lyrics::propertyDefault(Pid id) const
471
471
472
472
void Lyrics::triggerLayout () const
473
473
{
474
- if (m_separator ) {
474
+ if (_separator ) {
475
475
// The separator may extend to next system(s), so we must use Spanner::triggerLayout()
476
- m_separator ->triggerLayout ();
476
+ _separator ->triggerLayout ();
477
477
} else {
478
478
// In this case is ok to use EngravingItem::triggerLayout()
479
479
EngravingItem::triggerLayout ();
@@ -544,17 +544,17 @@ void Lyrics::undoChangeProperty(Pid id, const PropertyValue& v, PropertyFlags ps
544
544
545
545
void Lyrics::removeInvalidSegments ()
546
546
{
547
- m_isRemoveInvalidSegments = false ;
548
- if (m_separator && isMelisma () && m_ticks < m_separator ->startCR ()->ticks ()) {
547
+ _removeInvalidSegments = false ;
548
+ if (_separator && isMelisma () && _ticks < _separator ->startCR ()->ticks ()) {
549
549
setTicks (Fraction (0 , 1 ));
550
- m_separator ->setTicks (Fraction (0 , 1 ));
551
- m_separator ->removeUnmanaged ();
552
- m_separator = nullptr ;
550
+ _separator ->setTicks (Fraction (0 , 1 ));
551
+ _separator ->removeUnmanaged ();
552
+ _separator = nullptr ;
553
553
setAlign (propertyDefault (Pid::ALIGN).value <Align>());
554
- if (m_syllabic == LyricsSyllabic::BEGIN || m_syllabic == LyricsSyllabic::SINGLE) {
555
- m_syllabic = LyricsSyllabic::SINGLE;
554
+ if (_syllabic == LyricsSyllabic::BEGIN || _syllabic == LyricsSyllabic::SINGLE) {
555
+ _syllabic = LyricsSyllabic::SINGLE;
556
556
} else {
557
- m_syllabic = LyricsSyllabic::END;
557
+ _syllabic = LyricsSyllabic::END;
558
558
}
559
559
}
560
560
}
0 commit comments