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

Method applySettings

src/frontend/SettingsWorksheetPage.cpp:60–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60QList<Settings::Type> SettingsWorksheetPage::applySettings() {
61 QList<Settings::Type> changes;
62 if (!m_changed)
63 return changes;
64
65 KConfigGroup group = Settings::group(QStringLiteral("Settings_Worksheet"));
66 if (m_cbThemes->currentText() == i18n("Default"))
67 group.writeEntry(QLatin1String("Theme"), QString());
68 else
69 group.writeEntry(QLatin1String("Theme"), m_cbThemes->currentText());
70
71 qDebug() << "size " << ui.cbPreviewThumbnailSize->currentData().toInt();
72 group.writeEntry(QLatin1String("PreviewThumbnailSize"), ui.cbPreviewThumbnailSize->currentData().toInt());
73 group.writeEntry(QLatin1String("PresenterModeInteractive"), ui.chkPresenterModeInteractive->isChecked());
74 group.writeEntry(QLatin1String("DoubleBuffering"), ui.chkDoubleBuffering->isChecked());
75 group.writeEntry(QLatin1String("LaTeXEngine"), ui.cbTexEngine->itemData(ui.cbTexEngine->currentIndex()));
76
77 changes << Settings::Type::Worksheet;
78 return changes;
79}
80
81void SettingsWorksheetPage::restoreDefaults() {
82 m_cbThemes->setItemText(0, i18n("Default")); // default theme

Callers

nothing calls this directly

Calls 4

groupFunction · 0.85
currentTextMethod · 0.80
QStringClass · 0.50
currentIndexMethod · 0.45

Tested by

no test coverage detected