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


C++ TextLine::setDiagonal方法代码示例

本文整理汇总了C++中TextLine::setDiagonal方法的典型用法代码示例。如果您正苦于以下问题:C++ TextLine::setDiagonal方法的具体用法?C++ TextLine::setDiagonal怎么用?C++ TextLine::setDiagonal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextLine的用法示例。


在下文中一共展示了TextLine::setDiagonal方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: newLinesPalette


//.........这里部分代码省略.........
      ottava->setLen(w);
      ottava->setPlacement(Element::Placement::BELOW);
      sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "8vb"));

      ottava = new Ottava(gscore);
      ottava->setOttavaType(Ottava::Type::OTTAVA_15MA);
      ottava->setLen(w);
      sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "15ma"));

      ottava = new Ottava(gscore);
      ottava->setOttavaType(Ottava::Type::OTTAVA_15MB);
      ottava->setLen(w);
      ottava->setPlacement(Element::Placement::BELOW);
      sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "15mb"));

      ottava = new Ottava(gscore);
      ottava->setOttavaType(Ottava::Type::OTTAVA_22MA);
      ottava->setLen(w);
      sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "22ma"));

      ottava = new Ottava(gscore);
      ottava->setOttavaType(Ottava::Type::OTTAVA_22MB);
      ottava->setLen(w);
      sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "22mb"));


      Pedal* pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginText("<sym>keyboardPedalPed</sym>");
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));
      pedal->setEndHook(true);

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setEndHook(true);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setEndHook(true);
      pedal->setEndHookType(HookType::HOOK_45);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HookType::HOOK_45);
      pedal->setEndHook(true);
      pedal->setEndHookType(HookType::HOOK_45);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HookType::HOOK_45);
      pedal->setEndHook(true);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      Trill* trill = new Trill(gscore);
      trill->setLen(w);
      sp->append(trill, QT_TRANSLATE_NOOP("Palette", "Trill line"));

      trill = new Trill(gscore);
      trill->setTrillType("upprall");
      trill->setLen(w);
      sp->append(trill, QT_TRANSLATE_NOOP("Palette", "Upprall line"));

      trill = new Trill(gscore);
      trill->setTrillType("downprall");
      trill->setLen(w);
      sp->append(trill, QT_TRANSLATE_NOOP("Palette", "Downprall line"));

      trill = new Trill(gscore);
      trill->setTrillType("prallprall");
      trill->setLen(w);
      sp->append(trill, QT_TRANSLATE_NOOP("Palette", "Prallprall line"));

      trill = new Trill(gscore);
      trill->setTrillType("pure");
      trill->setLen(w);
      sp->append(trill, QT_TRANSLATE_NOOP("Palette", "Wavy line"));

      TextLine* textLine = new TextLine(gscore);
      textLine->setLen(w);
      textLine->setBeginText("VII");
      textLine->setEndHook(true);
      sp->append(textLine, QT_TRANSLATE_NOOP("Palette", "Text line"));

      TextLine* line = new TextLine(gscore);
      line->setLen(w);
      line->setDiagonal(true);
      sp->append(line, QT_TRANSLATE_NOOP("Palette", "Line"));

      Ambitus* a = new Ambitus(gscore);
      sp->append(a, QT_TRANSLATE_NOOP("Palette", "Ambitus"));

      return sp;
      }
开发者ID:jasonmarkbeaton,项目名称:MuseScore,代码行数:101,代码来源:menus.cpp

示例2: newLinesPalette


//.........这里部分代码省略.........
      ottava->setPlacement(Element::Placement::BELOW);
      sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "8vb"));

      if (!basic) {
            ottava = new Ottava(gscore);
            ottava->setOttavaType(Ottava::Type::OTTAVA_15MA);
            ottava->setLen(w);
            sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "15ma"));

            ottava = new Ottava(gscore);
            ottava->setOttavaType(Ottava::Type::OTTAVA_15MB);
            ottava->setLen(w);
            ottava->setPlacement(Element::Placement::BELOW);
            sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "15mb"));

            ottava = new Ottava(gscore);
            ottava->setOttavaType(Ottava::Type::OTTAVA_22MA);
            ottava->setLen(w);
            sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "22ma"));

            ottava = new Ottava(gscore);
            ottava->setOttavaType(Ottava::Type::OTTAVA_22MB);
            ottava->setLen(w);
            sp->append(ottava, QT_TRANSLATE_NOOP("Palette", "22mb"));
            }

      Pedal* pedal;
      if (!basic) {
            pedal = new Pedal(gscore);
            pedal->setLen(w);
            pedal->setBeginText("<sym>keyboardPedalPed</sym>");
            pedal->setContinueText("(<sym>keyboardPedalPed</sym>)");
            pedal->setEndHook(true);
            sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

            pedal = new Pedal(gscore);
            pedal->setLen(w);
            pedal->setBeginText("<sym>keyboardPedalPed</sym>");
            pedal->setContinueText("(<sym>keyboardPedalPed</sym>)");
            pedal->setEndText("<sym>keyboardPedalUp</sym>");
            Align align = pedal->endTextElement()->textStyle().align();
            align = (align & AlignmentFlags::VMASK) | AlignmentFlags::HCENTER;
            pedal->endTextElement()->textStyle().setAlign(align);
            pedal->setLineVisible(false);
            sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));
            }

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setEndHook(true);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setEndHook(true);
      pedal->setEndHookType(HookType::HOOK_45);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HookType::HOOK_45);
      pedal->setEndHook(true);
      pedal->setEndHookType(HookType::HOOK_45);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HookType::HOOK_45);
      pedal->setEndHook(true);
      sp->append(pedal, QT_TRANSLATE_NOOP("Palette", "Pedal"));

      if (!basic) {
            for (int i = 0; i < trillTableSize(); i++) {
                  Trill* trill = new Trill(gscore);
                  trill->setTrillType(trillTable[i].type);
                  trill->setLen(w);
                  sp->append(trill, qApp->translate("trillType", trillTable[i].userName.toUtf8().constData()));
                  }

            TextLine* textLine = new TextLine(gscore);
            textLine->setLen(w);
            textLine->setBeginText("VII");
            textLine->setEndHook(true);
            sp->append(textLine, QT_TRANSLATE_NOOP("Palette", "Text line"));

            TextLine* line = new TextLine(gscore);
            line->setLen(w);
            line->setDiagonal(true);
            sp->append(line, QT_TRANSLATE_NOOP("Palette", "Line"));

            Ambitus* a = new Ambitus(gscore);
            sp->append(a, QT_TRANSLATE_NOOP("Palette", "Ambitus"));
            }

      return sp;
      }
开发者ID:silongzhou,项目名称:MuseScore,代码行数:101,代码来源:menus.cpp

示例3: lineMenu


//.........这里部分代码省略.........
            volta->setSubtype(VOLTA_CLOSED);

            sp->append(volta, tr("Prima volta"));

            volta = new Volta(gscore);
            volta->setLen(l);
            volta->setText("2.");
            il.clear();
            il.append(2);
            volta->setEndings(il);
            volta->setSubtype(VOLTA_CLOSED);
            sp->append(volta, tr("Seconda volta"));

            volta = new Volta(gscore);
            volta->setLen(l);
            volta->setText("3.");
            il.clear();
            il.append(3);
            volta->setEndings(il);
            volta->setSubtype(VOLTA_CLOSED);
            sp->append(volta, tr("Terza volta"));

            volta = new Volta(gscore);
            volta->setLen(l);
            volta->setText("2.");
            il.clear();
            il.append(2);
            volta->setEndings(il);
            volta->setSubtype(VOLTA_OPEN);
            sp->append(volta, tr("Seconda volta"));

            //--------

            Ottava* ottava = new Ottava(gscore);
            ottava->setSubtype(0);
            ottava->setLen(l);
            sp->append(ottava, tr("8va"));

            ottava = new Ottava(gscore);
            ottava->setSubtype(1);
            ottava->setLen(l);
            sp->append(ottava, tr("15ma"));

            ottava = new Ottava(gscore);
            ottava->setSubtype(2);
            ottava->setLen(l);
            sp->append(ottava, tr("8vb"));

            ottava = new Ottava(gscore);
            ottava->setSubtype(3);
            ottava->setLen(l);
            sp->append(ottava, tr("15mb"));

            //-------

            Pedal* pedal = new Pedal(gscore);
            pedal->setLen(l);
            sp->append(pedal, tr("Pedal"));

            pedal = new Pedal(gscore);
            pedal->setLen(l);
            pedal->setEndHookType(HOOK_45);
            sp->append(pedal, tr("Pedal"));

            pedal = new Pedal(gscore);
            pedal->setLen(l);
            pedal->setBeginSymbol(-1);
            pedal->setBeginHook(true);
            pedal->setBeginHookHeight(Spatium(-1.5));
            pedal->setBeginHookType(HOOK_45);
            pedal->setEndHookType(HOOK_45);
            sp->append(pedal, tr("Pedal"));

            pedal = new Pedal(gscore);
            pedal->setLen(l);
            pedal->setBeginSymbol(-1);
            pedal->setBeginHook(true);
            pedal->setBeginHookHeight(Spatium(-1.5));
            pedal->setBeginHookType(HOOK_45);
            sp->append(pedal, tr("Pedal"));

            //-------

            Trill* trill = new Trill(gscore);
            trill->setLen(l);
            sp->append(trill, tr("Trill line"));

            TextLine* textLine = new TextLine(gscore);
            textLine->setBeginText("VII");
            sp->append(textLine, tr("Text line"));
            textLine->setEndHook(true);
            textLine->setEndHookHeight(Spatium(1.5));

            TextLine* line = new TextLine(gscore);
            line->setDiagonal(true);
            sp->append(line, tr("Line"));
            }
      linePalette->show();
      linePalette->raise();
      }
开发者ID:Mistobaan,项目名称:MuseScore,代码行数:101,代码来源:menus.cpp

示例4: newLinesPalette


//.........这里部分代码省略.........
      sp->append(volta, qApp->translate("lines", "Seconda volta"));

      volta = new Volta(gscore);
      volta->setSubtype(Volta::VOLTA_CLOSED);
      volta->setLen(w);
      volta->setText("3.");
      il.clear();
      il.append(3);
      volta->setEndings(il);
      sp->append(volta, qApp->translate("lines", "Terza volta"));

      volta = new Volta(gscore);
      volta->setSubtype(Volta::VOLTA_OPEN);
      volta->setLen(w);
      volta->setText("2.");
      il.clear();
      il.append(2);
      volta->setEndings(il);
      sp->append(volta, qApp->translate("lines", "Seconda volta 2"));

      Ottava* ottava = new Ottava(gscore);
      ottava->setSubtype(Ottava::OTTAVA_8VA);
      ottava->setLen(w);
      sp->append(ottava, qApp->translate("lines", "8va"));

      ottava = new Ottava(gscore);
      ottava->setSubtype(Ottava::OTTAVA_15MA);
      ottava->setLen(w);
      sp->append(ottava, qApp->translate("lines", "15ma"));

      ottava = new Ottava(gscore);
      ottava->setSubtype(Ottava::OTTAVA_8VB);
      ottava->setLen(w);
      sp->append(ottava, qApp->translate("lines", "8vb"));

      ottava = new Ottava(gscore);
      ottava->setSubtype(Ottava::OTTAVA_15MB);
      ottava->setLen(w);
      sp->append(ottava, qApp->translate("lines", "15mb"));

      Pedal* pedal = new Pedal(gscore);
      pedal->setLen(w);
      sp->append(pedal, qApp->translate("lines", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setEndHookType(HOOK_45);
      sp->append(pedal, qApp->translate("lines", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginSymbol(noSym);
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HOOK_45);
      pedal->setEndHookType(HOOK_45);
      sp->append(pedal, qApp->translate("lines", "Pedal"));

      pedal = new Pedal(gscore);
      pedal->setLen(w);
      pedal->setBeginSymbol(noSym);
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HOOK_45);
      sp->append(pedal, qApp->translate("lines", "Pedal"));

      Trill* trill = new Trill(gscore);
      trill->setLen(w);
      sp->append(trill, qApp->translate("lines", "Trill line"));

      trill = new Trill(gscore);
      trill->setSubtype("upprall");
      trill->setLen(w);
      sp->append(trill, qApp->translate("lines", "Upprall line"));

      trill = new Trill(gscore);
      trill->setSubtype("downprall");
      trill->setLen(w);
      sp->append(trill, qApp->translate("lines", "Downprall line"));

      trill = new Trill(gscore);
      trill->setSubtype("prallprall");
      trill->setLen(w);
      sp->append(trill, qApp->translate("lines", "Prallprall line"));
      
      trill = new Trill(gscore);
      trill->setSubtype("pure");
      trill->setLen(w);
      sp->append(trill, qApp->translate("lines", "Wavy line"));

      TextLine* textLine = new TextLine(gscore);
      textLine->setLen(w);
      textLine->setBeginText("VII", gscore->textStyle(TEXT_STYLE_TEXTLINE));
      textLine->setEndHook(true);
      sp->append(textLine, qApp->translate("lines", "Text line"));

      TextLine* line = new TextLine(gscore);
      line->setLen(w);
      line->setDiagonal(true);
      sp->append(line, qApp->translate("lines", "Line"));
      return sp;
      }
开发者ID:aeliot,项目名称:MuseScore,代码行数:101,代码来源:menus.cpp

示例5: populatePalette


//.........这里部分代码省略.........
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HOOK_45);
      pedal->setEndHookType(HOOK_45);
      sp->append(pedal, tr("Pedal"));

      pedal = new Pedal(gscore);
      //pedal->setLen(l);
      pedal->setBeginSymbol(-1);
      pedal->setBeginHook(true);
      pedal->setBeginHookType(HOOK_45);
      sp->append(pedal, tr("Pedal"));

      Trill* trill = new Trill(gscore);
      sp->append(trill, tr("Trill line"));

      trill = new Trill(gscore);
      trill->setSubtype("upprall");
      sp->append(trill, tr("Upprall line"));

      trill = new Trill(gscore);
      trill->setSubtype("downprall");
      sp->append(trill, tr("Downprall line"));

      trill = new Trill(gscore);
      trill->setSubtype("prallprall");
      sp->append(trill, tr("Prallprall line"));

      TextLine* textLine = new TextLine(gscore);
      textLine->setBeginText("VII");
      textLine->setEndHook(true);
      sp->append(textLine, tr("Text line"));

      TextLine* line = new TextLine(gscore);
      line->setDiagonal(true);
      sp->append(line, tr("Line"));

      paletteBox->addPalette(sp);

      //-----------------------------------
      //    Arpeggio && Glissando
      //-----------------------------------

      sp = new Palette();
      sp->setName(tr("Arpeggio && Glissando"));
      sp->setGrid(27, 60);

      for (int i = 0; i < 4; ++i) {
            Arpeggio* a = new Arpeggio(gscore);
            a->setSubtype(ArpeggioType(i));
            sp->append(a, tr("Arpeggio"));
            }
      for (int i = 0; i < 2; ++i) {
            Glissando* a = new Glissando(gscore);
            a->setSubtype(i);
            sp->append(a, tr("Glissando"));
            }
      paletteBox->addPalette(sp);

      //-----------------------------------
      //    Symbols: Breath
      //-----------------------------------

      sp = new Palette();
      sp->setName(tr("Breath && Pauses"));
      sp->setGrid(42, 40);
开发者ID:Mistobaan,项目名称:MuseScore,代码行数:66,代码来源:menus.cpp


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