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

Method loadConfig

src/frontend/widgets/ValueWidget.cpp:392–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392void ValueWidget::loadConfig(const KConfigGroup& group) {
393 ui.cbType->setCurrentIndex(group.readEntry("ValuesType", (int)m_value->type()));
394 ui.cbPosition->setCurrentIndex(group.readEntry("ValuesPosition", (int)m_value->position()));
395 ui.sbDistance->setValue(Worksheet::convertFromSceneUnits(group.readEntry("ValuesDistance", m_value->distance()), Worksheet::Unit::Point));
396 ui.sbRotation->setValue(group.readEntry("ValuesRotation", m_value->rotationAngle()));
397 ui.sbOpacity->setValue(round(group.readEntry("ValuesOpacity", m_value->opacity()) * 100.0));
398 this->updateWidgets();
399 ui.lePrefix->setText(group.readEntry("ValuesPrefix", m_value->prefix()));
400 ui.leSuffix->setText(group.readEntry("ValuesSuffix", m_value->suffix()));
401 QFont font = m_value->font();
402 font.setPointSizeF(round(Worksheet::convertFromSceneUnits(font.pointSizeF(), Worksheet::Unit::Point)));
403 ui.kfrFont->setFont(group.readEntry("ValuesFont", font));
404 ui.kcbColor->setColor(group.readEntry("ValuesColor", m_value->color()));
405}
406
407void ValueWidget::saveConfig(KConfigGroup& group) const {
408 group.writeEntry("ValuesType", ui.cbType->currentIndex());

Callers

nothing calls this directly

Calls 11

updateWidgetsMethod · 0.95
positionMethod · 0.80
suffixMethod · 0.80
fontMethod · 0.80
setCurrentIndexMethod · 0.45
typeMethod · 0.45
setValueMethod · 0.45
setTextMethod · 0.45
setFontMethod · 0.45
setColorMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected