! 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 */
| 14962 | \see itemAt, plottableAt |
| 14963 | */ |
| 14964 | QCPLayoutElement *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 |
nothing calls this directly
no test coverage detected