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

Method loadConfig

src/frontend/dockwidgets/BoxPlotDock.cpp:693–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693void BoxPlotDock::loadConfig(KConfig& config) {
694 KConfigGroup group = config.group(QStringLiteral("BoxPlot"));
695
696 // general
697 ui.cbOrdering->setCurrentIndex(group.readEntry(QStringLiteral("Ordering"), (int)m_boxPlot->ordering()));
698 ui.cbOrientation->setCurrentIndex(group.readEntry(QStringLiteral("Orientation"), (int)m_boxPlot->orientation()));
699 ui.chkVariableWidth->setChecked(group.readEntry(QStringLiteral("QStringLiteral(VariableWidth"), m_boxPlot->variableWidth()));
700 ui.chkNotches->setChecked(group.readEntry(QStringLiteral("NotchesEnabled"), m_boxPlot->notchesEnabled()));
701
702 // box
703 ui.sbWidthFactor->setValue(round(group.readEntry(QStringLiteral("WidthFactor"), m_boxPlot->widthFactor()) * 100.));
704 backgroundWidget->loadConfig(group);
705 borderLineWidget->loadConfig(group);
706 medianLineWidget->loadConfig(group);
707
708 // symbols
709 symbolCategoryChanged();
710 ui.chkJitteringEnabled->setChecked(group.readEntry(QStringLiteral("JitteringEnabled"), m_boxPlot->jitteringEnabled()));
711
712 // whiskers
713 ui.cbWhiskersType->setCurrentIndex(group.readEntry(QStringLiteral("WhiskersType"), (int)m_boxPlot->whiskersType()));
714 ui.leWhiskersRangeParameter->setText(QLocale().toString(m_boxPlot->whiskersRangeParameter()));
715 whiskersLineWidget->loadConfig(group);
716
717 // whiskers cap
718 ui.sbWhiskersCapSize->setValue(
719 Worksheet::convertFromSceneUnits(group.readEntry(QStringLiteral("WhiskersCapSize"), m_boxPlot->whiskersCapSize()), Worksheet::Unit::Point));
720 whiskersCapLineWidget->loadConfig(group);
721
722 // Margin plots
723 ui.chkRugEnabled->setChecked(m_boxPlot->rugEnabled());
724 ui.sbRugWidth->setValue(Worksheet::convertFromSceneUnits(m_boxPlot->rugWidth(), Worksheet::Unit::Point));
725 ui.sbRugLength->setValue(Worksheet::convertFromSceneUnits(m_boxPlot->rugLength(), Worksheet::Unit::Point));
726 ui.sbRugOffset->setValue(Worksheet::convertFromSceneUnits(m_boxPlot->rugOffset(), Worksheet::Unit::Point));
727}
728
729void BoxPlotDock::loadConfigFromTemplate(KConfig& config) {
730 auto name = TemplateHandler::templateName(config);

Callers 1

Calls 6

groupMethod · 0.45
setCurrentIndexMethod · 0.45
orientationMethod · 0.45
setValueMethod · 0.45
setTextMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected