MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / getFinalMinimumOuterSize

Method getFinalMinimumOuterSize

qcustomplot.cpp:3995–4006  ·  view source on GitHub ↗

! \internal This is a helper function for the implementation of subclasses. It returns the minimum size that should finally be used for the outer rect of the passed layout element \a el. It takes into account whether a manual minimum size is set (\ref QCPLayoutElement::setMinimumSize), which size constraint is set (\ref QCPLayoutElement::setSizeConstraintRect), as well as the

Source from the content-addressed store, hash-verified

3993 size was set (\ref QCPLayoutElement::minimumOuterSizeHint).
3994*/
3995QSize QCPLayout::getFinalMinimumOuterSize(const QCPLayoutElement *el)
3996{
3997 QSize minOuterHint = el->minimumOuterSizeHint();
3998 QSize minOuter = el->minimumSize(); // depending on sizeConstraitRect this might be with respect to inner rect, so possibly add margins in next four lines (preserving unset minimum of 0)
3999 if (minOuter.width() > 0 && el->sizeConstraintRect() == QCPLayoutElement::scrInnerRect)
4000 minOuter.rwidth() += el->margins().left() + el->margins().right();
4001 if (minOuter.height() > 0 && el->sizeConstraintRect() == QCPLayoutElement::scrInnerRect)
4002 minOuter.rheight() += el->margins().top() + el->margins().bottom();
4003
4004 return QSize(minOuter.width() > 0 ? minOuter.width() : minOuterHint.width(),
4005 minOuter.height() > 0 ? minOuter.height() : minOuterHint.height());;
4006}
4007
4008/*! \internal
4009

Callers

nothing calls this directly

Calls 1

minimumOuterSizeHintMethod · 0.80

Tested by

no test coverage detected