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

Method loadThemeConfig

src/backend/worksheet/plots/cartesian/QQPlot.cpp:698–718  ·  view source on GitHub ↗

############################################################################## ######################### Theme management ################################## ##############################################################################

Source from the content-addressed store, hash-verified

696// ######################### Theme management ##################################
697// ##############################################################################
698void QQPlot::loadThemeConfig(const KConfig& config) {
699 KConfigGroup group;
700 if (config.hasGroup(QStringLiteral("Theme")))
701 group = config.group(QStringLiteral("XYCurve")); // when loading from the theme config, use the same properties as for XYCurve
702 else
703 group = config.group(QStringLiteral("QQPlot"));
704
705 Q_D(QQPlot);
706 const auto* plot = d->m_plot;
707 int index = plot->curveChildIndex(this);
708 const QColor themeColor = plot->themeColorPalette(index);
709
710 d->suppressRecalc = true;
711
712 d->referenceCurve->line()->loadThemeConfig(group, themeColor);
713 d->percentilesCurve->line()->setStyle(Qt::NoPen);
714 d->percentilesCurve->symbol()->loadThemeConfig(group, themeColor);
715
716 d->suppressRecalc = false;
717 d->recalcShapeAndBoundingRect();
718}
719
720void QQPlot::saveThemeConfig(const KConfig& config) {
721 Q_D(const QQPlot);

Callers

nothing calls this directly

Calls 7

curveChildIndexMethod · 0.80
groupMethod · 0.45
themeColorPaletteMethod · 0.45
lineMethod · 0.45
setStyleMethod · 0.45
symbolMethod · 0.45

Tested by

no test coverage detected