! \internal Returns the layerables at pixel position \a pos. If \a onlySelectable is set to true, only those layerables that are selectable will be considered. (Layerable subclasses communicate their selectability via the QCPLayerable::selectTest method, by returning -1.) The returned list is sorted by the layerable/drawing order such that the layerable that appears on top in the plot
| 16346 | \see layerableAt, layoutElementAt, axisRectAt |
| 16347 | */ |
| 16348 | QList<QCPLayerable*> QCustomPlot::layerableListAt(const QPointF &pos, bool onlySelectable, QList<QVariant> *selectionDetails) const |
| 16349 | { |
| 16350 | QList<QCPLayerable*> result; |
| 16351 | for (int layerIndex=mLayers.size()-1; layerIndex>=0; --layerIndex) |
| 16352 | { |
| 16353 | const QList<QCPLayerable*> layerables = mLayers.at(layerIndex)->children(); |
| 16354 | for (int i=layerables.size()-1; i>=0; --i) |
| 16355 | { |
| 16356 | if (!layerables.at(i)->realVisibility()) |
| 16357 | continue; |
| 16358 | QVariant details; |
| 16359 | double dist = layerables.at(i)->selectTest(pos, onlySelectable, selectionDetails ? &details : nullptr); |
| 16360 | if (dist >= 0 && dist < selectionTolerance()) |
| 16361 | { |
| 16362 | result.append(layerables.at(i)); |
| 16363 | if (selectionDetails) |
| 16364 | selectionDetails->append(details); |
| 16365 | } |
| 16366 | } |
| 16367 | } |
| 16368 | return result; |
| 16369 | } |
| 16370 | |
| 16371 | /*! |
| 16372 | Saves the plot to a rastered image file \a fileName in the image format \a format. The plot is |
nothing calls this directly
no test coverage detected