| 485 | } |
| 486 | |
| 487 | void BarPlotDock::loadConfig(KConfig& config) { |
| 488 | KConfigGroup group = config.group(QStringLiteral("BarPlot")); |
| 489 | |
| 490 | // general |
| 491 | ui.cbType->setCurrentIndex(group.readEntry(QStringLiteral("Type"), (int)m_barPlot->type())); |
| 492 | ui.cbOrientation->setCurrentIndex(group.readEntry(QStringLiteral("Orientation"), (int)m_barPlot->orientation())); |
| 493 | |
| 494 | // box |
| 495 | ui.sbWidthFactor->setValue(round(group.readEntry(QStringLiteral("WidthFactor"), m_barPlot->widthFactor()) * 100.)); |
| 496 | backgroundWidget->loadConfig(group); |
| 497 | lineWidget->loadConfig(group); |
| 498 | |
| 499 | // values |
| 500 | valueWidget->loadConfig(group); |
| 501 | } |
| 502 | |
| 503 | void BarPlotDock::loadConfigFromTemplate(KConfig& config) { |
| 504 | auto name = TemplateHandler::templateName(config); |
no test coverage detected