MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / itemWithPlottable

Method itemWithPlottable

3rdparty/qcustomplot/qcustomplot.cpp:19368–19379  ·  view source on GitHub ↗

! Returns the QCPPlottableLegendItem which is associated with \a plottable (e.g. a \ref QCPGraph*). If such an item isn't in the legend, returns \c nullptr. \see hasItemWithPlottable */

Source from the content-addressed store, hash-verified

19366 \see hasItemWithPlottable
19367*/
19368QCPPlottableLegendItem *QCPLegend::itemWithPlottable(const QCPAbstractPlottable *plottable) const
19369{
19370 for (int i=0; i<itemCount(); ++i)
19371 {
19372 if (QCPPlottableLegendItem *pli = qobject_cast<QCPPlottableLegendItem*>(item(i)))
19373 {
19374 if (pli->plottable() == plottable)
19375 return pli;
19376 }
19377 }
19378 return nullptr;
19379}
19380
19381/*!
19382 Returns the number of items currently in the legend. It is identical to the base class

Callers 1

removeFromLegendMethod · 0.80

Calls 1

plottableMethod · 0.80

Tested by

no test coverage detected