本文整理汇总了C++中Articulation::setSubtype方法的典型用法代码示例。如果您正苦于以下问题:C++ Articulation::setSubtype方法的具体用法?C++ Articulation::setSubtype怎么用?C++ Articulation::setSubtype使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Articulation
的用法示例。
在下文中一共展示了Articulation::setSubtype方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newArticulationsPalette
Palette* MuseScore::newArticulationsPalette()
{
Palette* sp = new Palette;
sp->setName(tr("Articulations && Ornaments"));
sp->setGrid(42, 25);
sp->setDrawGrid(true);
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"));
return sp;
}
示例2: noteAttributesMenu
void MuseScore::noteAttributesMenu()
{
if (noteAttributesPalette == 0) {
Palette* sp = new Palette();
sp->resize(400, 300);
noteAttributesPalette = new PaletteScrollArea(sp);
noteAttributesPalette->setRestrictHeight(false);
noteAttributesPalette->setWindowTitle(tr("MuseScore: Articulations & Ornaments"));
unsigned nn = ARTICULATIONS;
sp->setGrid(42, 30);
for (unsigned i = 0; i < nn; ++i) {
Articulation* s = new Articulation(gscore);
s->setSubtype(ArticulationType(i));
sp->append(s, qApp->translate("articulation", qPrintable(s->subtypeName())));
}
}
noteAttributesPalette->show();
noteAttributesPalette->raise();
}
示例3: populatePalette
//.........这里部分代码省略.........
sp->append(new TimeSig(gscore, 6, 4), "6/4");
sp->append(new TimeSig(gscore, 3, 8), "3/8");
sp->append(new TimeSig(gscore, 6, 8), "6/8");
sp->append(new TimeSig(gscore, 9, 8), "9/8");
sp->append(new TimeSig(gscore, 12, 8), "12/8");
sp->append(new TimeSig(gscore, TSIG_FOUR_FOUR), tr("4/4 common time"));
sp->append(new TimeSig(gscore, TSIG_ALLA_BREVE), tr("2/2 alla breve"));
paletteBox->addPalette(sp);
//-----------------------------------
// Bar Lines
//-----------------------------------
sp = new Palette;
sp->setName(tr("Barlines"));
sp->setMag(0.8);
sp->setGrid(42, 38);
struct {
BarLineType type;
const char* name;
} t[] = {
{ NORMAL_BAR, QT_TR_NOOP("Normal") },
{ BROKEN_BAR, QT_TR_NOOP("Dashed") },
{ END_BAR, QT_TR_NOOP("End Bar") },
{ DOUBLE_BAR, QT_TR_NOOP("Double Bar") },
{ START_REPEAT, QT_TR_NOOP("Start Repeat") },
{ END_REPEAT, QT_TR_NOOP("End Repeat") },
{ END_START_REPEAT, QT_TR_NOOP("End-Start Repeat") },
};
for (unsigned i = 0; i < sizeof(t)/sizeof(*t); ++i) {
BarLine* b = new BarLine(gscore);
b->setSubtype(t[i].type);
sp->append(b, tr(t[i].name));
}
paletteBox->addPalette(sp);
//-----------------------------------
// Lines
//-----------------------------------
sp = new Palette;
sp->setName(tr("Lines"));
sp->setMag(.8);
sp->setGrid(82, 23);
Slur* slur = new Slur(gscore);
slur->setId(0);
sp->append(slur, tr("Slur"));
Hairpin* gabel0 = new Hairpin(gscore);
gabel0->setSubtype(0);
sp->append(gabel0, tr("Crescendo"));
Hairpin* gabel1 = new Hairpin(gscore);
gabel1->setSubtype(1);
sp->append(gabel1, tr("Diminuendo"));
Volta* volta = new Volta(gscore);
volta->setSubtype(VOLTA_CLOSED);
volta->setText("1.");
QList<int> il;
il.append(1);
volta->setEndings(il);
sp->append(volta, tr("Prima volta"));