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

Method currentBoxChanged

src/frontend/dockwidgets/BoxPlotDock.cpp:446–472  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

444 * called when the current box number was changed, shows the box properties for the selected box.
445 */
446void BoxPlotDock::currentBoxChanged(int index) {
447 if (index == -1)
448 return;
449
450 CONDITIONAL_LOCK_RETURN;
451
452 QList<Background*> backgrounds;
453 QList<Line*> borderLines;
454 QList<Line*> medianLines;
455 for (auto* plot : m_boxPlots) {
456 auto* background = plot->backgroundAt(index);
457 if (background)
458 backgrounds << background;
459
460 auto* line = plot->borderLineAt(index);
461 if (line)
462 borderLines << line;
463
464 line = plot->medianLineAt(index);
465 if (line)
466 medianLines << line;
467 }
468
469 backgroundWidget->setBackgrounds(backgrounds);
470 borderLineWidget->setLines(borderLines);
471 medianLineWidget->setLines(medianLines);
472}
473
474void BoxPlotDock::widthFactorChanged(int value) {
475 CONDITIONAL_LOCK_RETURN;

Callers

nothing calls this directly

Calls 5

borderLineAtMethod · 0.80
medianLineAtMethod · 0.80
setBackgroundsMethod · 0.80
setLinesMethod · 0.80
backgroundAtMethod · 0.45

Tested by

no test coverage detected