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

Method colorAt

src/backend/worksheet/plots/cartesian/BoxPlot.cpp:483–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483QColor BoxPlot::colorAt(int index) const {
484 Q_D(const BoxPlot);
485 if (index >= d->backgrounds.size())
486 return QColor();
487
488 const auto* background = d->backgrounds.at(index);
489 if (background->enabled())
490 return background->firstColor();
491 else {
492 const auto* borderLine = d->borderLines.at(index);
493 if (borderLine->style() != Qt::PenStyle::NoPen)
494 return borderLine->pen().color();
495 else
496 return QColor();
497 }
498}
499
500/* ============================ setter methods and undo commands ================= */
501

Callers

nothing calls this directly

Calls 4

enabledMethod · 0.80
QColorClass · 0.50
sizeMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected