MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / axisRects

Method axisRects

qcustomplot/qcustomplot.cpp:14239–14260  ·  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

14237 \see axisRectCount, axisRect, QCPLayoutGrid::setFillOrder
14238*/
14239QList<QCPAxisRect*> QCustomPlot::axisRects() const
14240{
14241 QList<QCPAxisRect*> result;
14242 QStack<QCPLayoutElement*> elementStack;
14243 if (mPlotLayout)
14244 elementStack.push(mPlotLayout);
14245
14246 while (!elementStack.isEmpty())
14247 {
14248 foreach (QCPLayoutElement *element, elementStack.pop()->elements(false))
14249 {
14250 if (element)
14251 {
14252 elementStack.push(element);
14253 if (QCPAxisRect *ar = qobject_cast<QCPAxisRect*>(element))
14254 result.append(ar);
14255 }
14256 }
14257 }
14258
14259 return result;
14260}
14261
14262/*!
14263 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