MCPcopy Create free account
hub / github.com/ZhuYanzhen1/miniFOC / axisRects

Method axisRects

tools/qcustomplot.cpp:14929–14950  ·  view source on GitHub ↗

! Returns all axis rects in the plot. The order of the axis rects is given by the fill order of the \ref QCPLayout that is holding them. For example, if the axis rects are in the top level grid layout (accessible via \ref QCustomPlot::plotLayout), they are ordered from left to right, top to bottom, if the layout's default \ref QCPLayoutGrid::setFillOrder "setFillOrder" of \ref QCPLayo

Source from the content-addressed store, hash-verified

14927 \see axisRectCount, axisRect, QCPLayoutGrid::setFillOrder
14928*/
14929QList<QCPAxisRect*> QCustomPlot::axisRects() const
14930{
14931 QList<QCPAxisRect*> result;
14932 QStack<QCPLayoutElement*> elementStack;
14933 if (mPlotLayout)
14934 elementStack.push(mPlotLayout);
14935
14936 while (!elementStack.isEmpty())
14937 {
14938 foreach (QCPLayoutElement *element, elementStack.pop()->elements(false))
14939 {
14940 if (element)
14941 {
14942 elementStack.push(element);
14943 if (QCPAxisRect *ar = qobject_cast<QCPAxisRect*>(element))
14944 result.append(ar);
14945 }
14946 }
14947 }
14948
14949 return result;
14950}
14951
14952/*!
14953 Returns the layout element at pixel position \a pos. If there is no element at that position,

Callers 1

QCPAbstractItemMethod · 0.80

Calls 4

elementsMethod · 0.80
appendMethod · 0.80
foreachFunction · 0.70
isEmptyMethod · 0.45

Tested by

no test coverage detected