MCPcopy Create free account
hub / github.com/cutechess/cutechess / layoutElementAt

Method layoutElementAt

projects/gui/3rdparty/qcustomplot/qcustomplot.cpp:14964–14982  ·  view source on GitHub ↗

! Returns the layout element at pixel position \a pos. If there is no element at that position, returns \c nullptr. Only visible elements are used. If \ref QCPLayoutElement::setVisible on the element itself or on any of its parent elements is set to false, it will not be considered. \see itemAt, plottableAt */

Source from the content-addressed store, hash-verified

14962 \see itemAt, plottableAt
14963*/
14964QCPLayoutElement *QCustomPlot::layoutElementAt(const QPointF &pos) const
14965{
14966 QCPLayoutElement *currentElement = mPlotLayout;
14967 bool searchSubElements = true;
14968 while (searchSubElements && currentElement)
14969 {
14970 searchSubElements = false;
14971 foreach (QCPLayoutElement *subElement, currentElement->elements(false))
14972 {
14973 if (subElement && subElement->realVisibility() && subElement->selectTest(pos, false) >= 0)
14974 {
14975 currentElement = subElement;
14976 searchSubElements = true;
14977 break;
14978 }
14979 }
14980 }
14981 return currentElement;
14982}
14983
14984/*!
14985 Returns the layout element of type \ref QCPAxisRect at pixel position \a pos. This method ignores

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