! 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 */
| 14242 | \see itemAt, plottableAt |
| 14243 | */ |
| 14244 | QCPLayoutElement *QCustomPlot::layoutElementAt(const QPointF &pos) const |
| 14245 | { |
| 14246 | QCPLayoutElement *currentElement = mPlotLayout; |
| 14247 | bool searchSubElements = true; |
| 14248 | while (searchSubElements && currentElement) |
| 14249 | { |
| 14250 | searchSubElements = false; |
| 14251 | Q_FOREACH (QCPLayoutElement *subElement, currentElement->elements(false)) |
| 14252 | { |
| 14253 | if (subElement && subElement->realVisibility() && subElement->selectTest(pos, false) >= 0) |
| 14254 | { |
| 14255 | currentElement = subElement; |
| 14256 | searchSubElements = true; |
| 14257 | break; |
| 14258 | } |
| 14259 | } |
| 14260 | } |
| 14261 | return currentElement; |
| 14262 | } |
| 14263 | |
| 14264 | /*! |
| 14265 | Returns the layout element of type \ref QCPAxisRect at pixel position \a pos. This method ignores |
nothing calls this directly
no test coverage detected