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

Method load

src/frontend/dockwidgets/WorksheetDock.cpp:576–601  ·  view source on GitHub ↗

SETTINGS

Source from the content-addressed store, hash-verified

574//******************** SETTINGS *******************************
575//*************************************************************
576void WorksheetDock::load() {
577 // Geometry
578 ui.chScaleContent->setChecked(m_worksheet->scaleContent());
579 ui.sbWidth->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->pageRect().width(), m_units), m_worksheetUnit));
580 ui.sbHeight->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->pageRect().height(), m_units), m_worksheetUnit));
581 updatePaperSize();
582
583 // Background
584 QList<Background*> backgrounds;
585 for (auto* worksheet : m_worksheetList)
586 backgrounds << worksheet->background();
587
588 backgroundWidget->setBackgrounds(backgrounds);
589
590 // Layout
591 ui.cbLayout->setCurrentIndex((int)m_worksheet->layout());
592 ui.sbLayoutTopMargin->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->layoutTopMargin(), m_units), m_worksheetUnit));
593 ui.sbLayoutBottomMargin->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->layoutBottomMargin(), m_units), m_worksheetUnit));
594 ui.sbLayoutLeftMargin->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->layoutLeftMargin(), m_units), m_worksheetUnit));
595 ui.sbLayoutRightMargin->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->layoutRightMargin(), m_units), m_worksheetUnit));
596 ui.sbLayoutHorizontalSpacing->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->layoutHorizontalSpacing(), m_units), m_worksheetUnit));
597 ui.sbLayoutVerticalSpacing->setValue(Worksheet::convertFromSceneUnits(roundSceneValue(m_worksheet->layoutVerticalSpacing(), m_units), m_worksheetUnit));
598
599 ui.sbLayoutRowCount->setValue(m_worksheet->layoutRowCount());
600 ui.sbLayoutColumnCount->setValue(m_worksheet->layoutColumnCount());
601}
602
603void WorksheetDock::loadConfigFromTemplate(KConfig& config) {
604 auto name = TemplateHandler::templateName(config);

Callers 1

setWorksheetsMethod · 0.95

Calls 7

heightMethod · 0.80
setBackgroundsMethod · 0.80
setValueMethod · 0.45
widthMethod · 0.45
pageRectMethod · 0.45
backgroundMethod · 0.45
setCurrentIndexMethod · 0.45

Tested by

no test coverage detected