############################################################################## ######################### Theme management ################################## ##############################################################################
| 506 | // ######################### Theme management ################################## |
| 507 | // ############################################################################## |
| 508 | void RunChart::loadThemeConfig(const KConfig& config) { |
| 509 | KConfigGroup group; |
| 510 | if (config.hasGroup(QStringLiteral("Theme"))) |
| 511 | group = config.group(QStringLiteral("XYCurve")); // when loading from the theme config, use the same properties as for XYCurve |
| 512 | else |
| 513 | group = config.group(QStringLiteral("RunChart")); |
| 514 | |
| 515 | Q_D(RunChart); |
| 516 | const auto* plot = d->m_plot; |
| 517 | int index = plot->curveChildIndex(this); |
| 518 | QColor themeColor = plot->themeColorPalette(index); |
| 519 | |
| 520 | d->suppressRecalc = true; |
| 521 | |
| 522 | d->dataCurve->line()->loadThemeConfig(group, themeColor); |
| 523 | d->dataCurve->symbol()->loadThemeConfig(group, themeColor); |
| 524 | |
| 525 | themeColor = plot->themeColorPalette(index + 1); |
| 526 | |
| 527 | d->centerCurve->line()->loadThemeConfig(group, themeColor); |
| 528 | d->centerCurve->symbol()->setStyle(Symbol::Style::NoSymbols); |
| 529 | |
| 530 | d->suppressRecalc = false; |
| 531 | d->recalcShapeAndBoundingRect(); |
| 532 | } |
| 533 | |
| 534 | void RunChart::saveThemeConfig(const KConfig& config) { |
| 535 | Q_D(const RunChart); |
nothing calls this directly
no test coverage detected