本文整理汇总了C++中MasterScore::systems方法的典型用法代码示例。如果您正苦于以下问题:C++ MasterScore::systems方法的具体用法?C++ MasterScore::systems怎么用?C++ MasterScore::systems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MasterScore
的用法示例。
在下文中一共展示了MasterScore::systems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: minWidth
void TestMeasure::minWidth()
{
MasterScore* score = readScore(DIR + "measure-2.mscx");
int n = score->systems().size();
int measuresSystem[n];
for (int i = 0; i < n; ++i)
measuresSystem[i] = score->systems().at(i)->measures().size();
score->doLayout();
Measure* m1 = score->systems().at(1)->lastMeasure();
Measure* m2 = score->systems().at(2)->firstMeasure();
qreal mw1 = m1->minWidth1();
qreal mw2 = m2->minWidth1();
score->doLayout();
QCOMPARE(mw1, m1->minWidth1());
QCOMPARE(mw2, m2->minWidth1());
// after second layout nothing should be changed:
for (int i = 0; i < n; ++i) {
QCOMPARE(measuresSystem[i], int(score->systems().at(i)->measures().size()));
}
}
示例2: readScore
void TestSpanners::spanners13()
{
DropData dropData;
LayoutBreak* brk;
MasterScore* score = readScore(DIR + "lyricsline06.mscx");
QVERIFY(score);
score->doLayout();
// DROP A BREAK AT FIRST MEASURE AND VERIFY
Measure* msr = score->firstMeasure();
QVERIFY(msr);
brk = new LayoutBreak(score);
brk->setLayoutBreakType(LayoutBreak::Type::LINE);
dropData.pos = msr->pagePos();
dropData.element = brk;
score->startCmd();
msr->drop(dropData);
score->endCmd();
// VERIFY SEGMENTS IN SYSTEMS AND THEN SCORE
for (System* sys : score->systems())
QVERIFY(sys->spannerSegments().size() == 1);
QVERIFY(saveCompareScore(score, "lyricsline06.mscx", DIR + "lyricsline06-ref.mscx"));
// UNDO AND VERIFY
score->undoStack()->undo();
score->doLayout(); // systems need to be re-computed
QVERIFY(saveCompareScore(score, "lyricsline06.mscx", DIR + "lyricsline06.mscx"));
delete score;
}