本文整理汇总了C++中MasterScore::unmanagedSpanners方法的典型用法代码示例。如果您正苦于以下问题:C++ MasterScore::unmanagedSpanners方法的具体用法?C++ MasterScore::unmanagedSpanners怎么用?C++ MasterScore::unmanagedSpanners使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MasterScore
的用法示例。
在下文中一共展示了MasterScore::unmanagedSpanners方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readScore
void TestSpanners::spanners08()
{
MasterScore* score = readScore(DIR + "lyricsline01.mscx");
QVERIFY(score);
score->doLayout();
// verify initial LyricsLine setup
System* sys = score->systems().at(0);
QVERIFY(sys->spannerSegments().size() == 1);
QVERIFY(score->unmanagedSpanners().size() == 1);
// DELETE LYRICS
Measure* msr = score->firstMeasure();
QVERIFY(msr);
Segment* seg = msr->findSegment(Segment::Type::ChordRest, 0);
QVERIFY(seg);
Ms::Chord* chord = static_cast<Ms::Chord*>(seg->element(0));
QVERIFY(chord && chord->type() == Element::Type::CHORD);
QVERIFY(chord->lyrics().size() > 0);
Lyrics* lyr = chord->lyrics(0, Element::Placement::BELOW);
score->startCmd();
score->undoRemoveElement(lyr);
score->endCmd();
// verify setup after deletion
QVERIFY(sys->spannerSegments().size() == 0);
QVERIFY(score->unmanagedSpanners().size() == 0);
// save and verify score after deletion
QVERIFY(saveCompareScore(score, "lyricsline01.mscx", DIR + "lyricsline01-ref.mscx"));
// UNDO
score->undoStack()->undo();
score->doLayout();
// verify setup after undo
QVERIFY(sys->spannerSegments().size() == 1);
QVERIFY(score->unmanagedSpanners().size() == 1);
// save and verify score after undo
QVERIFY(saveCompareScore(score, "lyricsline01.mscx", DIR + "lyricsline01.mscx"));
delete score;
}