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

Method addErrorBar

src/backend/worksheet/plots/cartesian/BarPlot.cpp:431–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429}
430
431ErrorBar* BarPlotPrivate::addErrorBar(const KConfigGroup& group) {
432 auto* errorBar = new ErrorBar(QStringLiteral("errorBar"), ErrorBar::Dimension::Y);
433 errorBar->setHidden(true);
434 q->addChild(errorBar);
435 if (!q->isLoading())
436 errorBar->init(group);
437
438 q->connect(errorBar, &ErrorBar::updatePixmapRequested, [=] {
439 updatePixmap();
440 });
441
442 q->connect(errorBar, &ErrorBar::updateRequested, [=] {
443 const int index = errorBars.indexOf(errorBar);
444 if (index != -1)
445 updateErrorBars(index);
446 });
447
448 errorBars << errorBar;
449
450 return errorBar;
451}
452
453/*!
454 called when the size of the plot or its data ranges (manual changes, zooming, etc.) were changed.

Callers 2

initMethod · 0.80
loadMethod · 0.80

Calls 5

isLoadingMethod · 0.80
setHiddenMethod · 0.45
addChildMethod · 0.45
initMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected