本文整理汇总了C++中Lyrics::setPlainText方法的典型用法代码示例。如果您正苦于以下问题:C++ Lyrics::setPlainText方法的具体用法?C++ Lyrics::setPlainText怎么用?C++ Lyrics::setPlainText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lyrics
的用法示例。
在下文中一共展示了Lyrics::setPlainText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readNote
//.........这里部分代码省略.........
closeSlur(1, tick, staff, voice);
else if (an[i] == '{')
openSlur(2, tick, staff, voice);
else if (an[i] == '}')
closeSlur(2, tick, staff, voice);
else if (an[i] == 'z')
openSlur(3, tick, staff, voice);
else if (an[i] == 'x')
closeSlur(3, tick, staff, voice);
else if (an[i] == '.') {
Articulation* atr = new Articulation(score);
atr->setSymId(SymId::articStaccatoAbove);
chord->add(atr);
}
else if (an[i] == '_') {
Articulation* atr = new Articulation(score);
atr->setSymId(SymId::articTenutoAbove);
chord->add(atr);
}
else if (an[i] == 'v') {
Articulation* atr = new Articulation(score);
atr->setSymId(SymId::stringsUpBow);
chord->add(atr);
}
else if (an[i] == 'n') {
Articulation* atr = new Articulation(score);
atr->setSymId(SymId::stringsDownBow);
chord->add(atr);
}
else if (an[i] == 't') {
Articulation* atr = new Articulation(score);
atr->setSymId(SymId::ornamentTrill);
chord->add(atr);
}
else if (an[i] == 'F') {
Articulation* atr = new Articulation(score);
atr->setUp(true);
atr->setSymId(SymId::fermataAbove);
chord->add(atr);
}
else if (an[i] == 'E') {
Articulation* atr = new Articulation(score);
atr->setUp(false);
atr->setSymId(SymId::fermataBelow);
chord->add(atr);
}
else if (an[i] == 'O') {
// Articulation* atr = new Articulation(score);
// atr->setArticulationType(ArticulationType::Downbow);
// chord->add(atr);
qDebug("%06d: open string '%c' not implemented", tick, an[i].toLatin1());
}
else if (an[i] == '&') {
// skip editorial level
if (i <= an.size() && an[i+1].isDigit())
++i;
}
else if (an[i] == 'p')
dynamics += "p";
else if (an[i] == 'm')
dynamics += "m";
else if (an[i] == 'f')
dynamics += "f";
else if (an[i] == '-') // tie
;
else if (an[i] == '*') // start tuplet
;
else if (an[i] == '!') // stop tuplet
;
else if (an[i] == '+') // cautionary accidental
;
else if (an[i] == 'X') // ???
;
else if (an[i] == ' ')
;
else {
qDebug("%06d: notation '%c' not implemented", tick, an[i].toLatin1());
}
}
if (!dynamics.isEmpty()) {
Dynamic* dyn = new Dynamic(score);
dyn->setDynamicType(dynamics);
dyn->setTrack(gstaff * VOICES);
Segment* s = measure->getSegment(Segment::Type::ChordRest, tick);
s->add(dyn);
}
QString txt = s.mid(43, 36);
if (!txt.isEmpty()) {
QStringList sl = txt.split("|");
int no = 0;
foreach(QString w, sl) {
w = diacritical(w);
Lyrics* l = new Lyrics(score);
l->setPlainText(w);
l->setNo(no++);
l->setTrack(gstaff * VOICES);
Segment* segment = measure->tick2segment(tick);
segment->add(l);
}