MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / layerableListAt

Method layerableListAt

3rdparty/qcustomplot/qcustomplot.cpp:16348–16369  ·  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 such that the layerable that appears on top in the plot

Source from the content-addressed store, hash-verified

16346 \see layerableAt, layoutElementAt, axisRectAt
16347*/
16348QList<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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected