MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / update

Method update

3rdparty/qcustomplot/qcustomplot.cpp:3436–3461  ·  view source on GitHub ↗

! Updates the layout element and sub-elements. This function is automatically called before every replot by the parent layout element. It is called multiple times, once for every \ref UpdatePhase. The phases are run through in the order of the enum values. For details about what happens at the different phases, see the documentation of \ref UpdatePhase. Layout elements that have child

Source from the content-addressed store, hash-verified

3434 Subclasses should make sure to call the base class implementation.
3435*/
3436void QCPLayoutElement::update(UpdatePhase phase)
3437{
3438 if (phase == upMargins)
3439 {
3440 if (mAutoMargins != QCP::msNone)
3441 {
3442 // set the margins of this layout element according to automatic margin calculation, either directly or via a margin group:
3443 QMargins newMargins = mMargins;
3444 const QList<QCP::MarginSide> allMarginSides = QList<QCP::MarginSide>() << QCP::msLeft << QCP::msRight << QCP::msTop << QCP::msBottom;
3445 foreach (QCP::MarginSide side, allMarginSides)
3446 {
3447 if (mAutoMargins.testFlag(side)) // this side's margin shall be calculated automatically
3448 {
3449 if (mMarginGroups.contains(side))
3450 QCP::setMarginValue(newMargins, side, mMarginGroups[side]->commonMargin(side)); // this side is part of a margin group, so get the margin value from that group
3451 else
3452 QCP::setMarginValue(newMargins, side, calculateAutoMargin(side)); // this side is not part of a group, so calculate the value directly
3453 // apply minimum margin restrictions:
3454 if (QCP::getMarginValue(newMargins, side) < QCP::getMarginValue(mMinimumMargins, side))
3455 QCP::setMarginValue(newMargins, side, QCP::getMarginValue(mMinimumMargins, side));
3456 }
3457 }
3458 setMargins(newMargins);
3459 }
3460 }
3461}
3462
3463/*!
3464 Returns the suggested minimum size this layout element (the \ref outerRect) may be compressed to,

Callers 2

replotMethod · 0.45
updateLayoutMethod · 0.45

Calls 10

updateFunction · 0.85
elementCountFunction · 0.85
rectFunction · 0.85
setupTickVectorsMethod · 0.80
setOuterRectMethod · 0.80
updateGeometryMethod · 0.80
foreachFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected