MCPcopy Create free account
hub / github.com/ZhuYanzhen1/miniFOC / layerableListAt

Method layerableListAt

tools/qcustomplot.cpp:16329–16350  ·  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

16327 \see layerableAt, layoutElementAt, axisRectAt
16328*/
16329QList<QCPLayerable*> QCustomPlot::layerableListAt(const QPointF &pos, bool onlySelectable, QList<QVariant> *selectionDetails) const
16330{
16331 QList<QCPLayerable*> result;
16332 for (int layerIndex=mLayers.size()-1; layerIndex>=0; --layerIndex)
16333 {
16334 const QList<QCPLayerable*> layerables = mLayers.at(layerIndex)->children();
16335 for (int i=layerables.size()-1; i>=0; --i)
16336 {
16337 if (!layerables.at(i)->realVisibility())
16338 continue;
16339 QVariant details;
16340 double dist = layerables.at(i)->selectTest(pos, onlySelectable, selectionDetails ? &details : nullptr);
16341 if (dist >= 0 && dist < selectionTolerance())
16342 {
16343 result.append(layerables.at(i));
16344 if (selectionDetails)
16345 selectionDetails->append(details);
16346 }
16347 }
16348 }
16349 return result;
16350}
16351
16352/*!
16353 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