MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / removeCurve

Method removeCurve

pj_plotting/widget/src/PlotWidgetBase.cpp:256–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void PlotWidgetBase::removeCurve(const QString& title) {
257 auto it = std::find_if(plot_->curve_list.begin(), plot_->curve_list.end(), [&title](const CurveInfo& info) {
258 return info.curve != nullptr && (info.curve->title().text() == title || info.source_name == title);
259 });
260 if (it == plot_->curve_list.end()) {
261 return;
262 }
263
264 it->curve->detach();
265 delete it->curve;
266 it->marker->detach();
267 delete it->marker;
268 plot_->curve_list.erase(it);
269 emit curveListChanged();
270}
271
272const std::list<PlotWidgetBase::CurveInfo>& PlotWidgetBase::curveList() const noexcept {
273 return plot_->curve_list;

Callers 2

CurveEditorMethod · 0.80
appendRowMethod · 0.80

Calls 6

eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
textMethod · 0.45
titleMethod · 0.45
detachMethod · 0.45

Tested by

no test coverage detected