############################################################################## ######################### Theme management ################################## ##############################################################################
| 557 | // ######################### Theme management ################################## |
| 558 | // ############################################################################## |
| 559 | void 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 | |
| 584 | void KDEPlot::saveThemeConfig(const KConfig& config) { |
| 585 | // Q_D(const KDEPlot); |
nothing calls this directly
no test coverage detected