! Returns the layout element at pixel position \a pos. If there is no element at that position, returns 0. 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 */
| 14269 | \see itemAt, plottableAt |
| 14270 | */ |
| 14271 | QCPLayoutElement *QCustomPlot::layoutElementAt(const QPointF &pos) const |
| 14272 | { |
| 14273 | QCPLayoutElement *currentElement = mPlotLayout; |
| 14274 | bool searchSubElements = true; |
| 14275 | while (searchSubElements && currentElement) |
| 14276 | { |
| 14277 | searchSubElements = false; |
| 14278 | foreach (QCPLayoutElement *subElement, currentElement->elements(false)) |
| 14279 | { |
| 14280 | if (subElement && subElement->realVisibility() && subElement->selectTest(pos, false) >= 0) |
| 14281 | { |
| 14282 | currentElement = subElement; |
| 14283 | searchSubElements = true; |
| 14284 | break; |
| 14285 | } |
| 14286 | } |
| 14287 | } |
| 14288 | return currentElement; |
| 14289 | } |
| 14290 | |
| 14291 | /*! |
| 14292 | Returns the layout element of type \ref QCPAxisRect at pixel position \a pos. This method ignores |
nothing calls this directly
no test coverage detected