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

Method axisRectAt

3rdparty/qcustomplot/qcustomplot.cpp:14994–15015  ·  view source on GitHub ↗

! Returns the layout element of type \ref QCPAxisRect at pixel position \a pos. This method ignores other layout elements even if they are visually in front of the axis rect (e.g. a \ref QCPLegend). If there is no axis rect at that position, returns \c nullptr. Only visible axis rects are used. If \ref QCPLayoutElement::setVisible on the axis rect itself or on any of its parent elements

Source from the content-addressed store, hash-verified

14992 \see layoutElementAt
14993*/
14994QCPAxisRect *QCustomPlot::axisRectAt(const QPointF &pos) const
14995{
14996 QCPAxisRect *result = nullptr;
14997 QCPLayoutElement *currentElement = mPlotLayout;
14998 bool searchSubElements = true;
14999 while (searchSubElements && currentElement)
15000 {
15001 searchSubElements = false;
15002 foreach (QCPLayoutElement *subElement, currentElement->elements(false))
15003 {
15004 if (subElement && subElement->realVisibility() && subElement->selectTest(pos, false) >= 0)
15005 {
15006 currentElement = subElement;
15007 searchSubElements = true;
15008 if (QCPAxisRect *ar = qobject_cast<QCPAxisRect*>(currentElement))
15009 result = ar;
15010 break;
15011 }
15012 }
15013 }
15014 return result;
15015}
15016
15017/*!
15018 Returns the axes that currently have selected parts, i.e. whose selection state is not \ref

Callers

nothing calls this directly

Calls 4

elementsMethod · 0.80
realVisibilityMethod · 0.80
foreachFunction · 0.70
selectTestMethod · 0.45

Tested by

no test coverage detected