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

Method removePlottable

3rdparty/qcustomplot/qcustomplot.cpp:14278–14295  ·  view source on GitHub ↗

! Removes the specified plottable from the plot and deletes it. If necessary, the corresponding legend item is also removed from the default legend (QCustomPlot::legend). Returns true on success. \see clearPlottables */

Source from the content-addressed store, hash-verified

14276 \see clearPlottables
14277*/
14278bool QCustomPlot::removePlottable(QCPAbstractPlottable *plottable)
14279{
14280 if (!mPlottables.contains(plottable))
14281 {
14282 qDebug() << Q_FUNC_INFO << "plottable not in list:" << reinterpret_cast<quintptr>(plottable);
14283 return false;
14284 }
14285
14286 // remove plottable from legend:
14287 plottable->removeFromLegend();
14288 // special handling for QCPGraphs to maintain the simple graph interface:
14289 if (QCPGraph *graph = qobject_cast<QCPGraph*>(plottable))
14290 mGraphs.removeOne(graph);
14291 // remove plottable:
14292 delete plottable;
14293 mPlottables.removeOne(plottable);
14294 return true;
14295}
14296
14297/*! \overload
14298

Callers

nothing calls this directly

Calls 3

removeFromLegendMethod · 0.80
containsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected