当前位置: 首页>>代码示例>>C++>>正文


C++ Accidental::subtypeUserName方法代码示例

本文整理汇总了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;
}
开发者ID:CafeCat,项目名称:MuseScore,代码行数:33,代码来源:menus.cpp

示例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;
      }
开发者ID:silongzhou,项目名称:MuseScore,代码行数:41,代码来源:menus.cpp

示例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;
      }
开发者ID:jasonmarkbeaton,项目名称:MuseScore,代码行数:36,代码来源:menus.cpp

示例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;
}
开发者ID:sbradl,项目名称:MuseScore,代码行数:16,代码来源:menus.cpp

示例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;
      }
开发者ID:aeliot,项目名称:MuseScore,代码行数:16,代码来源:menus.cpp


注:本文中的Accidental::subtypeUserName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。