本文整理汇总了C++中Voice::addPhrase方法的典型用法代码示例。如果您正苦于以下问题:C++ Voice::addPhrase方法的具体用法?C++ Voice::addPhrase怎么用?C++ Voice::addPhrase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voice
的用法示例。
在下文中一共展示了Voice::addPhrase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testModel
void MainWindow::testModel() {
Phrase* phraseA = new Phrase("PhraseAAALongNameTotally","<c' e g>1 b8 a g f e d c4 d'2 e2( f4 c4 g8 -> ( a8 g4)");
Phrase* phraseB = new Phrase("PhraseB","d2 e2( f4 c4 g8 a8 g4) c'1 b8 a g f e d c4 c'1 b8 a g f e d c4");
Phrase* phraseC = new Phrase("PhraseC","e8 e e e f g f e c' c c d c b a g");
Phrase* phraseD = new Phrase("PhraseD","f1~ f");
Phrase* phraseE = new Phrase("PhraseE","<c' e g>1 b8 a g f e d c4 d'2 e2( f4 c4 g8 -> ( a8 g4)");
Phrase* phraseF = new Phrase("PhraseF","d2 e2( f4 c4 g8 a8 g4) c'1 b8 a g f e d c4 c'1 b8 a g f e d c4");
Phrase* phraseG = new Phrase("PhraseG","e8 e e e f g f e c' c c d c b a g");
Phrase* phraseH = new Phrase("PhraseH","f1~ f");
//phraseA->refresh();
//phraseB->refresh();
//phraseC->refresh();
//phraseD->refresh();
//phraseE->refresh();
//phraseF->refresh();
//phraseG->refresh();
//phraseH->refresh();
Score* scoreA = new Score("ScoreA");
Score* scoreB = new Score("ScoreB");
Score* scoreC = new Score("ScoreC");
Staff* staffA = new Staff("StaffA");
Staff* staffB = new Staff("StaffB");
Staff* staffC = new Staff("StaffC");
Staff* staffD = new Staff("StaffD");
Staff* staffE = new Staff("StaffE");
Staff* staffF = new Staff("StaffF");
Voice* voiceA = new Voice("VoiceA");
Voice* voiceB = new Voice("VoiceB");
Voice* voiceC = new Voice("VoiceC");
Voice* voiceD = new Voice("VoiceD");
Voice* voiceE = new Voice("VoiceE");
Voice* voiceF = new Voice("VoiceF");
scoreA->addStaff(staffA);
scoreA->addStaff(staffB);
scoreA->addStaff(staffC);
scoreB->addStaff(staffD);
scoreC->addStaff(staffE);
scoreC->addStaff(staffF);
staffA->addVoice(voiceA);
staffA->addVoice(voiceB);
staffB->addVoice(voiceC);
staffC->addVoice(voiceD);
staffD->addVoice(voiceE);
staffE->addVoice(voiceF);
staffF->addVoice(voiceA);
voiceA->addPhrase(phraseA);
voiceA->addPhrase(phraseB);
voiceA->addPhrase(phraseC);
voiceB->addPhrase(phraseD);
voiceB->addPhrase(phraseE);
voiceC->addPhrase(phraseF);
voiceC->addPhrase(phraseG);
voiceA->setContent("\\voiceTwo \\PhraseB");
voiceB->setContent("\\voiceOne \\PhraseD \\PhraseE");
staffA->setContent("\\VoiceB \\VoiceA");
//voiceA->refresh();
//voiceB->refresh();
//staffA->refresh();
ui->treeWidget->insertTopLevelItem(0,scoreA);
ui->treeWidget->insertTopLevelItem(1,scoreB);
ui->treeWidget->insertTopLevelItem(2,scoreC);
}