本文整理汇总了C++中MeasureBase::prev方法的典型用法代码示例。如果您正苦于以下问题:C++ MeasureBase::prev方法的具体用法?C++ MeasureBase::prev怎么用?C++ MeasureBase::prev使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeasureBase
的用法示例。
在下文中一共展示了MeasureBase::prev方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: prevMeasure
Measure* MeasureBase::prevMeasure() const
{
MeasureBase* m = prev();
while (m) {
if (m->isMeasure())
return toMeasure(m);
m = m->prev();
}
return 0;
}
示例2: prev
Segment* Segment::prev1() const
{
if (prev())
return prev();
MeasureBase* m = measure();
for (;;) {
m = m->prev();
if (m == 0)
return 0;
if (m->type() == MEASURE)
return static_cast<Measure*>(m)->last();
}
}
示例3: prevMeasureMM
Measure* MeasureBase::prevMeasureMM() const
{
MeasureBase* m = prev();
while (m) {
if (m->isMeasure()) {
Measure* mm = toMeasure(m);
if (score()->styleB(StyleIdx::createMultiMeasureRests)) {
if (mm->mmRestCount() >= 0) {
if (mm->hasMMRest())
return mm->mmRest();
return mm;
}
}
else
return mm;
}
m = m->prev();
}
return 0;
}
示例4: prevMeasure
ChordRest* Score::prevMeasure(ChordRest* element)
{
if (!element)
return 0;
MeasureBase* mb = element->measure()->prev();
while (mb && mb->type() != Element::MEASURE)
mb = mb->prev();
Measure* measure = static_cast<Measure*>(mb);
int startTick = element->measure()->first()->nextChordRest(element->track())->tick();
bool last = false;
if ((selection().state() == SEL_RANGE)
&& selection().isEndActive() && selection().startSegment()->tick() <= startTick)
last = true;
else if (element->tick() != startTick) {
measure = element->measure();
}
if (!measure) {
measure = element->measure();
last = false;
}
int staff = element->staffIdx();
Segment* startSeg = last ? measure->last() : measure->first();
for (Segment* seg = startSeg; seg; seg = last ? seg->prev() : seg->next()) {
int etrack = (staff+1) * VOICES;
for (int track = staff * VOICES; track < etrack; ++track) {
Element* pel = seg->element(track);
if (pel && pel->isChordRest())
return static_cast<ChordRest*>(pel);
}
}
return 0;
}