本文整理汇总了C++中MasterScore::changeCRlen方法的典型用法代码示例。如果您正苦于以下问题:C++ MasterScore::changeCRlen方法的具体用法?C++ MasterScore::changeCRlen怎么用?C++ MasterScore::changeCRlen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MasterScore
的用法示例。
在下文中一共展示了MasterScore::changeCRlen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: quarter
void TestMeasure::undoDelInitialVBox_269919()
{
MasterScore* score = readScore(DIR + "undoDelInitialVBox_269919.mscx");
// 1. delete initial VBox
score->startCmd();
MeasureBase* initialVBox = score->measure(0);
score->select(initialVBox);
score->cmdDeleteSelection();
score->endCmd();
// 2. change duration of first chordrest
score->startCmd();
Measure* m = score->firstMeasure();
ChordRest* cr = m->findChordRest(Fraction(0,1), 0);
Fraction quarter(4, 1);
score->changeCRlen(cr, quarter);
score->endCmd();
// 3. Undo to restore first chordrest
score->undoRedo(true, 0);
// 4. Undo to restore initial VBox resulted in assert failure crash
score->undoRedo(true, 0);
QVERIFY(saveCompareScore(score, "undoDelInitialVBox_269919.mscx", DIR + "undoDelInitialVBox_269919-ref.mscx"));
delete score;
}
示例2: testExtend
void TestChordSymbol::testExtend()
{
MasterScore* score = test_pre("extend");
Measure* m = score->firstMeasure();
Segment* s = m->first(Segment::Type::ChordRest);
ChordRest* cr = s->cr(0);
score->changeCRlen(cr, TDuration::DurationType::V_WHOLE);
score->doLayout();
test_post(score, "extend");
}