MCPcopy Create free account
hub / github.com/KDE/labplot / barNumberChanged

Method barNumberChanged

src/frontend/dockwidgets/BarPlotDock.cpp:398–418  ·  view source on GitHub ↗

"Bars"-tab ! * called when the current bar number was changed, shows the bar properties for the selected bar. */

Source from the content-addressed store, hash-verified

396 * called when the current bar number was changed, shows the bar properties for the selected bar.
397 */
398void BarPlotDock::barNumberChanged(int index) {
399 if (index == -1)
400 return;
401
402 CONDITIONAL_LOCK_RETURN;
403
404 QList<Background*> backgrounds;
405 QList<Line*> lines;
406 for (auto* plot : m_barPlots) {
407 auto* background = plot->backgroundAt(index);
408 if (background)
409 backgrounds << background;
410
411 auto* line = plot->lineAt(index);
412 if (line)
413 lines << line;
414 }
415
416 backgroundWidget->setBackgrounds(backgrounds);
417 lineWidget->setLines(lines);
418}
419
420void BarPlotDock::widthFactorChanged(int value) {
421 CONDITIONAL_LOCK_RETURN;

Callers

nothing calls this directly

Calls 4

setBackgroundsMethod · 0.80
setLinesMethod · 0.80
backgroundAtMethod · 0.45
lineAtMethod · 0.45

Tested by

no test coverage detected