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

Method SettingsWorksheetPage

src/frontend/SettingsWorksheetPage.cpp:20–58  ·  view source on GitHub ↗

* \brief Page for the 'General' settings of the Labplot settings dialog. */

Source from the content-addressed store, hash-verified

18 * \brief Page for the 'General' settings of the Labplot settings dialog.
19 */
20SettingsWorksheetPage::SettingsWorksheetPage(QWidget* parent)
21 : SettingsPage(parent) {
22 ui.setupUi(this);
23
24 m_cbThemes = new ThemesComboBox();
25 ui.gridLayout->addWidget(m_cbThemes, 1, 4, 1, 1);
26 QString info = i18n("Default theme for newly created worksheets and worksheet objects");
27 ui.lTheme->setToolTip(info);
28 m_cbThemes->setToolTip(info);
29
30 ui.cbPreviewThumbnailSize->addItem(i18n("Small (3cm x 3cm)"), 3);
31 ui.cbPreviewThumbnailSize->addItem(i18n("Medium (5cm x 5cm)"), 5);
32 ui.cbPreviewThumbnailSize->addItem(i18n("Big (7cm x 7cm)"), 7);
33
34 const int size = ui.cbTexEngine->height();
35 ui.lLatexWarning->setPixmap(QIcon::fromTheme(QLatin1String("state-warning")).pixmap(size, size));
36
37 // add available TeX typesetting engines
38 if (TeXRenderer::executableExists(QLatin1String("lualatex")))
39 ui.cbTexEngine->addItem(QLatin1String("LuaLaTeX"), QLatin1String("lualatex"));
40
41 if (TeXRenderer::executableExists(QLatin1String("xelatex")))
42 ui.cbTexEngine->addItem(QLatin1String("XeLaTex"), QLatin1String("xelatex"));
43
44 if (TeXRenderer::executableExists(QLatin1String("pdflatex")))
45 ui.cbTexEngine->addItem(QLatin1String("pdfLaTeX"), QLatin1String("pdflatex"));
46
47 if (TeXRenderer::executableExists(QLatin1String("latex")))
48 ui.cbTexEngine->addItem(QLatin1String("LaTeX"), QLatin1String("latex"));
49
50 connect(m_cbThemes, &ThemesComboBox::currentThemeChanged, this, &SettingsWorksheetPage::changed);
51 connect(ui.cbPreviewThumbnailSize, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SettingsWorksheetPage::changed);
52 connect(ui.chkPresenterModeInteractive, &QCheckBox::toggled, this, &SettingsWorksheetPage::changed);
53 connect(ui.chkDoubleBuffering, &QCheckBox::toggled, this, &SettingsWorksheetPage::changed);
54 connect(ui.cbTexEngine, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SettingsWorksheetPage::changed);
55 connect(ui.cbTexEngine, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SettingsWorksheetPage::checkTeX);
56
57 loadSettings();
58}
59
60QList<Settings::Type> SettingsWorksheetPage::applySettings() {
61 QList<Settings::Type> changes;

Callers

nothing calls this directly

Calls 3

setToolTipMethod · 0.80
heightMethod · 0.80
pixmapMethod · 0.45

Tested by

no test coverage detected