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

Function foreach

3rdparty/qcustomplot/qcustomplot.h:4089–4105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4087 double resultDistance = mSelectionTolerance; // only regard clicks with distances smaller than mSelectionTolerance as selections, so initialize with that value
4088
4089 foreach (QCPAbstractPlottable *plottable, mPlottables)
4090 {
4091 PlottableType *currentPlottable = qobject_cast<PlottableType*>(plottable);
4092 if (!currentPlottable || (onlySelectable && !currentPlottable->selectable())) // we could have also passed onlySelectable to the selectTest function, but checking here is faster, because we have access to QCPAbstractPlottable::selectable
4093 continue;
4094 if (currentPlottable->clipRect().contains(pos.toPoint())) // only consider clicks where the plottable is actually visible
4095 {
4096 QVariant details;
4097 double currentDistance = currentPlottable->selectTest(pos, false, dataIndex ? &details : nullptr);
4098 if (currentDistance >= 0 && currentDistance < resultDistance)
4099 {
4100 resultPlottable = currentPlottable;
4101 resultDetails = details;
4102 resultDistance = currentDistance;
4103 }
4104 }
4105 }
4106
4107 if (resultPlottable && dataIndex)
4108 {

Callers

nothing calls this directly

Calls 3

clipRectMethod · 0.80
containsMethod · 0.45
selectTestMethod · 0.45

Tested by

no test coverage detected