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

Method loadThemeConfig

src/backend/worksheet/plots/cartesian/KDEPlot.cpp:559–582  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

557// ######################### Theme management ##################################
558// ##############################################################################
559void KDEPlot::loadThemeConfig(const KConfig& config) {
560 KConfigGroup group;
561 if (config.hasGroup(QStringLiteral("Theme")))
562 group = config.group(QStringLiteral("XYCurve")); // when loading from the theme config, use the same properties as for XYCurve
563 else
564 group = config.group(QStringLiteral("KDEPlot"));
565
566 Q_D(KDEPlot);
567 const auto* plot = d->m_plot;
568 int index = plot->curveChildIndex(this);
569 const QColor themeColor = plot->themeColorPalette(index);
570
571 d->suppressRecalc = true;
572
573 d->estimationCurve->line()->loadThemeConfig(group, themeColor);
574 d->estimationCurve->background()->loadThemeConfig(group, themeColor);
575
576 d->rugCurve->symbol()->loadThemeConfig(group, themeColor);
577 d->rugCurve->line()->setStyle(Qt::NoPen);
578 d->rugCurve->symbol()->setStyle(Symbol::Style::NoSymbols);
579
580 d->suppressRecalc = false;
581 d->recalcShapeAndBoundingRect();
582}
583
584void KDEPlot::saveThemeConfig(const KConfig& config) {
585 // Q_D(const KDEPlot);

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected