void MsScWriter::endMeasure(const Bww::MeasureEndFlags mef) { qDebug() << "MsScWriter::endMeasure()"; if (mef.repeatEnd) currentMeasure->setRepeatFlags(Ms::RepeatEnd); if (mef.endingEnd) { if (lastVolta) { qDebug("adding volta\n"); if (ending == 1) lastVolta->setVoltaType(Ms::VoltaType::CLOSED); else lastVolta->setVoltaType(Ms::VoltaType::OPEN); lastVolta->setEndElement(currentMeasure); currentMeasure->addSpannerBack(lastVolta); lastVolta = 0; } else { qDebug("lastVolta == 0 on stop\n"); } } if (mef.lastOfSystem) { Ms::LayoutBreak* lb = new Ms::LayoutBreak(score); lb->setTrack(0); lb->setLayoutBreakType(Ms::LAYOUT_BREAK_LINE); currentMeasure->add(lb); } if (mef.lastOfPart && !mef.repeatEnd) { currentMeasure->setEndBarLineType(Ms::END_BAR, false, true); } else if (mef.doubleBarLine) { currentMeasure->setEndBarLineType(Ms::DOUBLE_BAR, false, true); } // BarLine* barLine = new BarLine(score); // bool visible = true; // barLine->setSubtype(NORMAL_BAR); // barLine->setTrack(0); // currentMeasure->setEndBarLineType(barLine->subtype(), false, visible); }
void MsScWriter::endMeasure(const Bww::MeasureEndFlags mef) { qDebug() << "MsScWriter::endMeasure()"; if (mef.repeatEnd) currentMeasure->setRepeatEnd(true); if (mef.endingEnd) { if (lastVolta) { qDebug("adding volta"); if (ending == 1) lastVolta->setVoltaType(Ms::Volta::Type::CLOSED); else lastVolta->setVoltaType(Ms::Volta::Type::OPEN); lastVolta->setTick2(tick); lastVolta = 0; } else { qDebug("lastVolta == 0 on stop"); } } if (mef.lastOfSystem) { Ms::LayoutBreak* lb = new Ms::LayoutBreak(score); lb->setTrack(0); lb->setLayoutBreakType(Ms::LayoutBreak::Type::LINE); currentMeasure->add(lb); } if (mef.lastOfPart && !mef.repeatEnd) { //TODO currentMeasure->setEndBarLineType(Ms::BarLineType::END, false, true); } else if (mef.doubleBarLine) { //TODO currentMeasure->setEndBarLineType(Ms::BarLineType::DOUBLE, false, true); } // BarLine* barLine = new BarLine(score); // bool visible = true; // barLine->setSubtype(BarLineType::NORMAL); // barLine->setTrack(0); // currentMeasure->setEndBarLineType(barLine->subtype(), false, visible); }