! \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
| 3097 | account, too.) |
| 3098 | */ |
| 3099 | int 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 |
no test coverage detected