本文整理汇总了C++中TextLine::spannerSegments方法的典型用法代码示例。如果您正苦于以下问题:C++ TextLine::spannerSegments方法的具体用法?C++ TextLine::spannerSegments怎么用?C++ TextLine::spannerSegments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextLine
的用法示例。
在下文中一共展示了TextLine::spannerSegments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: elementPropertyAction
//.........这里部分代码省略.........
else if (cmd == "insert-hbox") {
HBox* s = new HBox(score());
double w = width() - s->leftMargin() * MScore::DPMM - s->rightMargin() * MScore::DPMM;
s->setBoxWidth(Spatium(w / s->spatium()));
s->setParent(e);
score()->undoAddElement(s);
score()->select(s, SELECT_SINGLE, 0);
startEdit(s);
}
else if (cmd == "picture")
mscore->addImage(score(), e);
else if (cmd == "v-props") {
VoltaSegment* vs = static_cast<VoltaSegment*>(e);
VoltaProperties vp;
vp.setText(vs->volta()->text());
vp.setEndings(vs->volta()->endings());
int rv = vp.exec();
if (rv) {
QString txt = vp.getText();
QList<int> l = vp.getEndings();
if (txt != vs->volta()->text())
score()->undoChangeVoltaText(vs->volta(), txt);
if (l != vs->volta()->endings())
score()->undoChangeVoltaEnding(vs->volta(), l);
}
}
else if (cmd == "l-props") {
TextLineSegment* vs = static_cast<TextLineSegment*>(e);
TextLine* nTl = vs->textLine()->clone();
LineProperties lp(nTl);
if (lp.exec()) {
score()->undoChangeElement(vs->textLine(), nTl);
// force new text
foreach(SpannerSegment* l, nTl->spannerSegments())
static_cast<TextLineSegment*>(l)->clearText();
}
else
delete nTl;
}
else if (cmd == "tr-props") {
TremoloBar* tb = static_cast<TremoloBar*>(e);
TremoloBarProperties bp(tb, 0);
if (bp.exec())
score()->undo(new ChangeTremoloBar(tb, bp.points()));
}
if (cmd == "ts-courtesy") {
TimeSig* ts = static_cast<TimeSig*>(e);
score()->undo(new ChangeTimesig(static_cast<TimeSig*>(e), !ts->showCourtesySig(), ts->sig(),
ts->stretch(), ts->numeratorString(), ts->denominatorString(), ts->timeSigType()));
}
else if (cmd == "ts-props") {
TimeSig* ts = static_cast<TimeSig*>(e);
TimeSig r(*ts);
TimeSigProperties vp(&r);
int rv = vp.exec();
if (rv) {
bool stretchChanged = r.stretch() != ts->stretch();
if (r.numeratorString() != ts->numeratorString()
|| r.denominatorString() != ts->denominatorString()
|| r.sig() != ts->sig()
|| stretchChanged
|| r.timeSigType() != ts->timeSigType()) {
score()->undo(new ChangeTimesig(ts, r.showCourtesySig(), r.sig(), r.stretch(),
r.numeratorString(), r.denominatorString(), r.timeSigType()));
if (stretchChanged)
score()->timesigStretchChanged(ts, ts->measure(), ts->staffIdx());