本文整理汇总了C++中BarLine::spanStaff方法的典型用法代码示例。如果您正苦于以下问题:C++ BarLine::spanStaff方法的具体用法?C++ BarLine::spanStaff怎么用?C++ BarLine::spanStaff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BarLine
的用法示例。
在下文中一共展示了BarLine::spanStaff方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readScore
void TestBarline::barline04()
{
Score* score = readScore(DIR + "barline04.mscx");
QVERIFY(score);
score->doLayout();
score->startCmd();
// 'go' to 5th measure
Measure* msr = score->firstMeasure();
for (int i=0; i < 4; i++)
msr = msr->nextMeasure();
// check span data of measure-initial start-repeat bar line
Segment* seg = msr->findSegment(SegmentType::StartRepeatBarLine, msr->tick());
QVERIFY2(seg != nullptr, "No SegStartRepeatBarLine segment in measure 5.");
BarLine* bar = static_cast<BarLine*>(seg->element(0));
QVERIFY2(bar != nullptr, "No start-repeat barline in measure 5.");
bar->undoChangeProperty(Pid::BARLINE_SPAN, 2);
bar->undoChangeProperty(Pid::BARLINE_SPAN_FROM, 2);
bar->undoChangeProperty(Pid::BARLINE_SPAN_TO, 6);
score->endCmd();
QVERIFY2(bar->spanStaff() && bar->spanFrom() == 2 && bar->spanTo() == 6,
"Wrong span data in start-repeat barline of measure 5.");
// check start-repeat bar ine in second staff is gone
QVERIFY2(seg->element(1) == nullptr, "Extra start-repeat barline in 2nd staff of measure 5.");
// QVERIFY(saveCompareScore(score, "barline04.mscx", DIR + "barline04-ref.mscx"));
delete score;
}