本文整理汇总了C++中Articulation::subtypeUserName方法的典型用法代码示例。如果您正苦于以下问题:C++ Articulation::subtypeUserName方法的具体用法?C++ Articulation::subtypeUserName怎么用?C++ Articulation::subtypeUserName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Articulation
的用法示例。
在下文中一共展示了Articulation::subtypeUserName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newArticulationsPalette
Palette* MuseScore::newArticulationsPalette()
{
Palette* sp = new Palette;
sp->setName(QT_TRANSLATE_NOOP("Palette", "Articulations && Ornaments"));
sp->setGrid(42, 25);
sp->setDrawGrid(true);
for (int i = 0; i < int(ArticulationType::ARTICULATIONS); ++i) {
Articulation* s = new Articulation(gscore);
s->setArticulationType(ArticulationType(i));
sp->append(s, qApp->translate("articulation", qPrintable(s->subtypeUserName())));
}
Bend* bend = new Bend(gscore);
bend->points().append(PitchValue(0, 0, false));
bend->points().append(PitchValue(15, 100, false));
bend->points().append(PitchValue(60, 100, false));
sp->append(bend, qApp->translate("articulation", "Bend"));
TremoloBar* tb = new TremoloBar(gscore);
tb->points().append(PitchValue(0, 0, false)); // "Dip"
tb->points().append(PitchValue(30, -100, false));
tb->points().append(PitchValue(60, 0, false));
sp->append(tb, qApp->translate("articulation", "Tremolo Bar"));
return sp;
}
示例2: newArticulationsPalette
Palette* MuseScore::newArticulationsPalette(bool basic)
{
Palette* sp = new Palette;
sp->setName(QT_TRANSLATE_NOOP("Palette", "Articulations && Ornaments"));
sp->setGrid(42, 25);
sp->setDrawGrid(true);
if (basic) {
static std::vector<ArticulationType> art {
ArticulationType::Fermata,
ArticulationType::Sforzatoaccent,
ArticulationType::Staccato,
ArticulationType::Tenuto,
ArticulationType::Portato,
ArticulationType::Marcato,
ArticulationType::Trill
};
for (auto i : art) {
Articulation* s = new Articulation(gscore);
s->setArticulationType(i);
sp->append(s, qApp->translate("articulation", s->subtypeUserName().toUtf8().constData()));
}
}
else {
for (int i = 0; i < int(ArticulationType::ARTICULATIONS); ++i) {
Articulation* s = new Articulation(gscore);
s->setArticulationType(ArticulationType(i));
sp->append(s, qApp->translate("articulation", s->subtypeUserName().toUtf8().constData()));
}
Bend* bend = new Bend(gscore);
bend->points().append(PitchValue(0, 0, false));
bend->points().append(PitchValue(15, 100, false));
bend->points().append(PitchValue(60, 100, false));
sp->append(bend, qApp->translate("articulation", "Bend"));
TremoloBar* tb = new TremoloBar(gscore);
tb->points().append(PitchValue(0, 0, false)); // "Dip"
tb->points().append(PitchValue(30, -100, false));
tb->points().append(PitchValue(60, 0, false));
sp->append(tb, qApp->translate("articulation", "Tremolo bar"));
}
return sp;
}
示例3: populatePalette
//.........这里部分代码省略.........
//-----------------------------------
// Brackets
//-----------------------------------
sp = new Palette;
sp->setName(tr("Brackets"));
sp->setMag(0.7);
sp->setGrid(42, 60);
Bracket* b1 = new Bracket(gscore);
b1->setSubtype(BRACKET_NORMAL);
Bracket* b2 = new Bracket(gscore);
b2->setSubtype(BRACKET_AKKOLADE);
// b1->setHeight(_spatium * 7);
// b2->setHeight(_spatium * 7);
sp->append(b1, tr("Square bracket"));
sp->append(b2, tr("Curly bracket"));
paletteBox->addPalette(sp);
//-----------------------------------
// Attributes, Ornaments
//-----------------------------------
sp = new Palette;
sp->setName(tr("Articulations && Ornaments"));
sp->setGrid(42, 25);
for (int i = 0; i < ARTICULATIONS; ++i) {
Articulation* s = new Articulation(gscore);
s->setSubtype(ArticulationType(i));
sp->append(s, qApp->translate("articulation", qPrintable(s->subtypeUserName())));
}
Bend* bend = new Bend(gscore);
bend->points().append(PitchValue(0, 0, false));
bend->points().append(PitchValue(15, 100, false));
bend->points().append(PitchValue(60, 100, false));
sp->append(bend, qApp->translate("articulation", "Bend"));
TremoloBar* tb = new TremoloBar(gscore);
tb->points().append(PitchValue(0, 0, false)); // "Dip"
tb->points().append(PitchValue(30, -100, false));
tb->points().append(PitchValue(60, 0, false));
sp->append(tb, qApp->translate("articulation", "Tremolo Bar"));
paletteBox->addPalette(sp);
//-----------------------------------
// Accidentals
//-----------------------------------
sp = newAccidentalsPalette();
paletteBox->addPalette(sp);
//-----------------------------------
// Dynamics
//-----------------------------------
sp = new Palette;
sp->setName(tr("Dynamics"));
sp->setMag(.8);
sp->setGrid(42, 28);
static const char* dynS[] = {