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

Method load

src/frontend/dockwidgets/ProcessBehaviorChartDock.cpp:590–640  ·  view source on GitHub ↗

Settings

Source from the content-addressed store, hash-verified

588//************************* Settings **************************
589//*************************************************************
590void ProcessBehaviorChartDock::load() {
591 // type
592 int index = ui.cbType->findData(static_cast<int>(m_plot->type()));
593 ui.cbType->setCurrentIndex(index);
594 typeChanged(index);
595
596 // limits metric
597 index = ui.cbLimitsMetric->findData(static_cast<int>(m_plot->limitsMetric()));
598 ui.cbLimitsMetric->setCurrentIndex(index);
599
600 // sample size
601 ui.sbSampleSize->setValue(static_cast<int>(m_plot->sampleSize()));
602
603 // constraints for the limits
604 const auto numberLocale = QLocale();
605 double value = m_plot->minLowerLimit();
606 if (value != -INFINITY)
607 ui.leMinLowerLimit->setText(QLocale().toString(value));
608 else
609 ui.leMinLowerLimit->setText(QString());
610
611 value = m_plot->maxUpperLimit();
612 if (value != INFINITY)
613 ui.leMaxUpperLimit->setText(QLocale().toString(value));
614 else
615 ui.leMaxUpperLimit->setText(QString());
616
617 // user exact/individual limits, relevant for P and U charts only
618 ui.chbExactLimits->setChecked(m_plot->exactLimitsEnabled());
619
620 updateLowerLimitWidgets();
621
622 // labels
623 ui.chbLabelsEnabled->setChecked(m_plot->labelsEnabled());
624 ui.chkLabelsAutoPrecision->setChecked((int)m_plot->labelsAutoPrecision());
625 ui.sbLabelsPrecision->setValue((int)m_plot->labelsPrecision());
626 ui.kfrLabelsFont->setFont(m_plot->labelsFont());
627 ui.kcbLabelsFontColor->setColor(m_plot->labelsFontColor());
628 ui.kcbLabelsBackgroundColor->setColor(m_plot->labelsBackgroundColor());
629
630 // Border
631 index = ui.cbLabelsBorderShape->findData(static_cast<int>(m_plot->labelsBorderShape()));
632 ui.cbLabelsBorderShape->setCurrentIndex(index);
633
634 QList<Line*> borderLines;
635 for (auto* plot : m_plots)
636 borderLines << plot->labelsBorderLine();
637 labelsBorderLineWidget->setLines(borderLines);
638
639 labelsEnabledChanged(ui.chbLabelsEnabled->isChecked());
640}
641
642void ProcessBehaviorChartDock::loadConfig(KConfig& config) {
643 KConfigGroup group = config.group(QStringLiteral("ProcessBehaviorChart"));

Callers

nothing calls this directly

Calls 15

labelsFontMethod · 0.80
labelsFontColorMethod · 0.80
labelsBackgroundColorMethod · 0.80
labelsBorderShapeMethod · 0.80
labelsBorderLineMethod · 0.80
setLinesMethod · 0.80
QStringClass · 0.50
typeMethod · 0.45
setCurrentIndexMethod · 0.45
setValueMethod · 0.45
sampleSizeMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected