MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / removeFromLegend

Method removeFromLegend

qcustomplot/qcustomplot.cpp:11139–11151  ·  view source on GitHub ↗

! \overload Removes the plottable from the specifed \a legend. This means the \ref QCPPlottableLegendItem that is associated with this plottable is removed. Returns true on success, i.e. if the legend exists and a legend item associated with this plottable was found and removed. \see addToLegend, QCPLegend::removeItem */

Source from the content-addressed store, hash-verified

11137 \see addToLegend, QCPLegend::removeItem
11138*/
11139bool QCPAbstractPlottable::removeFromLegend(QCPLegend *legend) const
11140{
11141 if (!legend)
11142 {
11143 qDebug() << Q_FUNC_INFO << "passed legend is null";
11144 return false;
11145 }
11146
11147 if (QCPPlottableLegendItem *lip = legend->itemWithPlottable(this))
11148 return legend->removeItem(lip);
11149 else
11150 return false;
11151}
11152
11153/*! \overload
11154

Callers 1

removePlottableMethod · 0.80

Calls 2

itemWithPlottableMethod · 0.80
removeItemMethod · 0.80

Tested by

no test coverage detected