本文整理汇总了C++中Accidental::subtypeUserName方法的典型用法代码示例。如果您正苦于以下问题:C++ Accidental::subtypeUserName方法的具体用法?C++ Accidental::subtypeUserName怎么用?C++ Accidental::subtypeUserName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accidental
的用法示例。
在下文中一共展示了Accidental::subtypeUserName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newAccidentalsPalette
Palette* MuseScore::newAccidentalsPalette(bool basic)
{
Palette* sp = new Palette;
sp->setName(QT_TRANSLATE_NOOP("Palette", "Accidentals"));
sp->setGrid(33, 36);
sp->setDrawGrid(true);
if (basic) {
static Accidental::AccidentalType types[] = {
Accidental::ACC_NONE,
Accidental::ACC_SHARP,
Accidental::ACC_FLAT,
Accidental::ACC_SHARP2,
Accidental::ACC_FLAT2,
Accidental::ACC_NATURAL
};
for (auto i : types) {
Accidental* s = new Accidental(gscore);
s->setAccidentalType(Accidental::AccidentalType(i));
sp->append(s, s->subtypeUserName());
}
}
else {
for (int i = Accidental::ACC_SHARP; i < Accidental::ACC_END; ++i) {
Accidental* s = new Accidental(gscore);
s->setAccidentalType(Accidental::AccidentalType(i));
sp->append(s, s->subtypeUserName());
}
}
AccidentalBracket* ab = new AccidentalBracket(gscore);
sp->append(ab, QT_TRANSLATE_NOOP("Palette", "round bracket"));
return sp;
}
示例2: newAccidentalsPalette
Palette* MuseScore::newAccidentalsPalette(bool basic)
{
Palette* sp = new Palette;
sp->setName(QT_TRANSLATE_NOOP("Palette", "Accidentals"));
sp->setGrid(33, 36);
sp->setDrawGrid(true);
if (basic) {
static AccidentalType types[] = {
AccidentalType::NONE,
AccidentalType::SHARP,
AccidentalType::FLAT,
AccidentalType::SHARP2,
AccidentalType::FLAT2,
AccidentalType::NATURAL
};
for (auto i : types) {
Accidental* s = new Accidental(gscore);
s->setAccidentalType(AccidentalType(i));
sp->append(s, qApp->translate("accidental", s->subtypeUserName()));
}
}
else {
for (int i = int(AccidentalType::SHARP); i < int(AccidentalType::END); ++i) {
Accidental* s = new Accidental(gscore);
s->setAccidentalType(AccidentalType(i));
if (s->symbol() != SymId::noSym)
sp->append(s, qApp->translate("accidental", s->subtypeUserName()));
else
delete s;
}
}
Icon* ik = new Icon(gscore);
ik->setIconType(IconType::BRACKETS);
const Shortcut* s = Shortcut::getShortcut("add-brackets");
QAction* action = s->action();
QIcon icon(action->icon());
ik->setAction("add-brackets", icon);
sp->append(ik, s->help());
return sp;
}
示例3: newAccidentalsPalette
Palette* MuseScore::newAccidentalsPalette(bool basic)
{
Palette* sp = new Palette;
sp->setName(QT_TRANSLATE_NOOP("Palette", "Accidentals"));
sp->setGrid(33, 36);
sp->setDrawGrid(true);
if (basic) {
static Accidental::Type types[] = {
Accidental::Type::NONE,
Accidental::Type::SHARP,
Accidental::Type::FLAT,
Accidental::Type::SHARP2,
Accidental::Type::FLAT2,
Accidental::Type::NATURAL
};
for (auto i : types) {
Accidental* s = new Accidental(gscore);
s->setAccidentalType(Accidental::Type(i));
sp->append(s, s->subtypeUserName());
}
}
else {
for (int i = int(Accidental::Type::SHARP); i < int(Accidental::Type::END); ++i) {
Accidental* s = new Accidental(gscore);
s->setAccidentalType(Accidental::Type(i));
if (s->symbol() != SymId::noSym)
sp->append(s, s->subtypeUserName());
else
delete s;
}
}
AccidentalBracket* ab = new AccidentalBracket(gscore);
sp->append(ab, QT_TRANSLATE_NOOP("Palette", "round brackets"));
return sp;
}
示例4: newAccidentalsPalette
Palette* MuseScore::newAccidentalsPalette()
{
Palette* sp = new Palette;
sp->setName(QT_TRANSLATE_NOOP("Palette", "Accidentals"));
sp->setGrid(33, 36);
sp->setDrawGrid(true);
for (int i = Accidental::ACC_SHARP; i < Accidental::ACC_END; ++i) {
Accidental* s = new Accidental(gscore);
s->setAccidentalType(Accidental::AccidentalType(i));
sp->append(s, s->subtypeUserName());
}
AccidentalBracket* ab = new AccidentalBracket(gscore);
sp->append(ab, QT_TRANSLATE_NOOP("Palette", "round bracket"));
return sp;
}
示例5: newAccidentalsPalette
Palette* MuseScore::newAccidentalsPalette()
{
Palette* sp = new Palette;
sp->setName(qApp->translate("accidental", "Accidentals"));
sp->setGrid(33, 36);
sp->setDrawGrid(true);
for (int i = Accidental::ACC_SHARP; i < Accidental::ACC_END; ++i) {
Accidental* s = new Accidental(gscore);
s->setSubtype(Accidental::AccidentalType(i));
sp->append(s, qApp->translate("accidental", s->subtypeUserName()));
}
AccidentalBracket* ab = new AccidentalBracket(gscore);
sp->append(ab, qApp->translate("accidental", "round bracket"));
return sp;
}