本文整理汇总了C++中MeasureBase::x方法的典型用法代码示例。如果您正苦于以下问题:C++ MeasureBase::x方法的具体用法?C++ MeasureBase::x怎么用?C++ MeasureBase::x使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeasureBase
的用法示例。
在下文中一共展示了MeasureBase::x方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doRebuildBspTree
void Page::doRebuildBspTree()
{
int n = 0;
scanElements(&n, countElements, false);
QRectF r;
if (score()->layoutMode() == LayoutMode::LINE) {
qreal w = 0.0;
qreal h = 0.0;
if (!_systems.empty()) {
h = _systems.front()->height();
if (!_systems.front()->measures().empty()) {
MeasureBase* mb = _systems.front()->measures().back();
w = mb->x() + mb->width();
}
}
r = QRectF(0.0, 0.0, w, h);
}
else
r = abbox();
bspTree.initialize(r, n);
scanElements(&bspTree, &bspInsert, false);
bspTreeValid = true;
}
示例2: doRebuildBspTree
void Page::doRebuildBspTree()
{
QList<Element*> el;
for (System* s : _systems) {
for (MeasureBase* m : s->measures())
m->scanElements(&el, collectElements, false);
}
scanElements(&el, collectElements, false);
int n = el.size();
if (score()->layoutMode() == LayoutMode::LINE) {
if (_systems.isEmpty())
return;
if (_systems.front()->measures().isEmpty())
return;
qreal h = _systems.front()->height();
MeasureBase* mb = _systems.front()->measures().back();
qreal w = mb->x() + mb->width();
bspTree.initialize(QRectF(0.0, 0.0, w, h), n);
}
else
bspTree.initialize(abbox(), n);
for (int i = 0; i < n; ++i)
bspTree.insert(el.at(i));
bspTreeValid = true;
}