MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / layerableListAt

Method layerableListAt

qcustomplot.cpp:15594–15615  ·  view source on GitHub ↗

! \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. If you only need to know the top-most layerable, rather

Source from the content-addressed store, hash-verified

15592 \see layerableAt, layoutElementAt, axisRectAt
15593*/
15594QList<QCPLayerable*> QCustomPlot::layerableListAt(const QPointF &pos, bool onlySelectable, QList<QVariant> *selectionDetails) const
15595{
15596 QList<QCPLayerable*> result;
15597 for (int layerIndex=mLayers.size()-1; layerIndex>=0; --layerIndex)
15598 {
15599 const QList<QCPLayerable*> layerables = mLayers.at(layerIndex)->children();
15600 for (int i=layerables.size()-1; i>=0; --i)
15601 {
15602 if (!layerables.at(i)->realVisibility())
15603 continue;
15604 QVariant details;
15605 double dist = layerables.at(i)->selectTest(pos, onlySelectable, selectionDetails ? &details : 0);
15606 if (dist >= 0 && dist < selectionTolerance())
15607 {
15608 result.append(layerables.at(i));
15609 if (selectionDetails)
15610 selectionDetails->append(details);
15611 }
15612 }
15613 }
15614 return result;
15615}
15616
15617/*!
15618 Saves the plot to a rastered image file \a fileName in the image format \a format. The plot is

Callers

nothing calls this directly

Calls 6

selectionToleranceFunction · 0.85
atMethod · 0.80
realVisibilityMethod · 0.80
appendMethod · 0.80
sizeMethod · 0.45
selectTestMethod · 0.45

Tested by

no test coverage detected