MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / commonMargin

Method commonMargin

3rdparty/qcustomplot/qcustomplot.cpp:3099–3112  ·  view source on GitHub ↗

! \internal Returns the synchronized common margin for \a side. This is the margin value that will be used by the layout element on the respective side, if it is part of this margin group. The common margin is calculated by requesting the automatic margin (\ref QCPLayoutElement::calculateAutoMargin) of each element associated with \a side in this margin group, and choosing the larg

Source from the content-addressed store, hash-verified

3097 account, too.)
3098*/
3099int QCPMarginGroup::commonMargin(QCP::MarginSide side) const
3100{
3101 // query all automatic margins of the layout elements in this margin group side and find maximum:
3102 int result = 0;
3103 foreach (QCPLayoutElement *el, mChildren.value(side))
3104 {
3105 if (!el->autoMargins().testFlag(side))
3106 continue;
3107 int m = qMax(el->calculateAutoMargin(side), QCP::getMarginValue(el->minimumMargins(), side));
3108 if (m > result)
3109 result = m;
3110 }
3111 return result;
3112}
3113
3114/*! \internal
3115

Callers 1

foreachFunction · 0.80

Calls 3

calculateAutoMarginMethod · 0.80
foreachFunction · 0.70
valueMethod · 0.45

Tested by

no test coverage detected