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

Method refresh

pj_plotting/widget/src/CurveEditor.cpp:286–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void CurveEditor::refresh() {
287 // Clear without firing selection-change handlers; we re-evaluate at the end.
288 QSignalBlocker block_list(ui_->listWidget);
289 ui_->listWidget->clear();
290 // Row swatches are about to be destroyed — invalidate any cached pointer.
291 clearActivePicker();
292
293 if (plot_ == nullptr) {
294 return;
295 }
296
297 for (const auto& info : plot_->curveList()) {
298 if (info.curve == nullptr) {
299 continue;
300 }
301 appendRow(info.source_name, info.curve->title().text(), info.curve->pen().color(), info.curve->isVisible());
302 }
303 // Preserve the active filter across refreshes.
304 applyFilter();
305}
306
307void CurveEditor::appendRow(const QString& curve_key, const QString& display_name, QColor color, bool visible) {
308 auto* item = new QListWidgetItem();

Callers

nothing calls this directly

Calls 7

appendRowFunction · 0.85
clearMethod · 0.45
textMethod · 0.45
titleMethod · 0.45
colorMethod · 0.45
penMethod · 0.45
isVisibleMethod · 0.45

Tested by

no test coverage detected