本文整理汇总了C++中Icon::setIconType方法的典型用法代码示例。如果您正苦于以下问题:C++ Icon::setIconType方法的具体用法?C++ Icon::setIconType怎么用?C++ Icon::setIconType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Icon
的用法示例。
在下文中一共展示了Icon::setIconType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newNoteHeadsPalette
Palette* MuseScore::newNoteHeadsPalette()
{
Palette* sp = new Palette;
sp->setName(QT_TRANSLATE_NOOP("Palette", "Note Heads"));
sp->setMag(1.3);
sp->setGrid(33, 36);
sp->setDrawGrid(true);
for (int i = 0; i < int(NoteHead::Group::HEAD_GROUPS); ++i) {
SymId sym = Note::noteHead(0, NoteHead::Group(i), NoteHead::Type::HEAD_HALF);
// HEAD_BREVIS_ALT shows up only for brevis value
if (i == int(NoteHead::Group::HEAD_BREVIS_ALT) )
sym = Note::noteHead(0, NoteHead::Group(i), NoteHead::Type::HEAD_BREVIS);
NoteHead* nh = new NoteHead(gscore);
nh->setSym(sym);
sp->append(nh, Sym::id2userName(sym));
}
Icon* ik = new Icon(gscore);
ik->setIconType(IconType::BRACKETS);
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;
}
示例2: populateIconPalette
void populateIconPalette(Palette* p, const IconAction* a)
{
while (a->subtype != IconType::NONE) {
Icon* ik = new Icon(gscore);
ik->setIconType(a->subtype);
Shortcut* s = Shortcut::getShortcut(a->action);
QAction* action = s->action();
QIcon icon(action->icon());
ik->setAction(a->action, icon);
p->append(ik, s->help());
++a;
}
}
示例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 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;
}