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

Method loadConfig

src/frontend/dockwidgets/BarPlotDock.cpp:487–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487void 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
503void BarPlotDock::loadConfigFromTemplate(KConfig& config) {
504 auto name = TemplateHandler::templateName(config);

Callers 1

Calls 5

groupMethod · 0.45
setCurrentIndexMethod · 0.45
typeMethod · 0.45
orientationMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected