SETTINGS
| 574 | //******************** SETTINGS ******************************* |
| 575 | //************************************************************* |
| 576 | void 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 | |
| 603 | void WorksheetDock::loadConfigFromTemplate(KConfig& config) { |
| 604 | auto name = TemplateHandler::templateName(config); |
no test coverage detected