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

Method saveConfigAsTemplate

src/frontend/dockwidgets/CartesianPlotDock.cpp:1967–1995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1965}
1966
1967void CartesianPlotDock::saveConfigAsTemplate(KConfig& config) {
1968 KConfigGroup group = config.group(QStringLiteral("CartesianPlot"));
1969
1970 // General
1971 // we don't load/save the settings in the general-tab, since they are not style related.
1972 // It doesn't make sense to load/save them in the template.
1973
1974 // Title
1975 KConfigGroup plotTitleGroup = config.group(QStringLiteral("CartesianPlotTitle"));
1976 labelWidget->saveConfig(plotTitleGroup);
1977
1978 // Layout
1979 group.writeEntry(QStringLiteral("HorizontalPadding"), m_plot->horizontalPadding());
1980 group.writeEntry(QStringLiteral("VerticalPadding"), m_plot->verticalPadding());
1981 group.writeEntry(QStringLiteral("RightPadding"), m_plot->rightPadding());
1982 group.writeEntry(QStringLiteral("BottomPadding"), m_plot->bottomPadding());
1983 group.writeEntry(QStringLiteral("SymmetricPadding"), m_plot->symmetricPadding());
1984
1985 // Scale breakings
1986 // TODO
1987
1988 // Area
1989 backgroundWidget->saveConfig(group);
1990 group.writeEntry(QStringLiteral("BorderType"), static_cast<int>(m_plot->plotArea()->borderType()));
1991 borderLineWidget->saveConfig(group);
1992 group.writeEntry(QStringLiteral("BorderCornerRadius"), m_plot->plotArea()->borderCornerRadius());
1993
1994 config.sync();
1995}
1996
1997void CartesianPlotDock::loadTheme(const QString& theme) {
1998 for (auto* plot : m_plotList)

Callers

nothing calls this directly

Calls 3

plotAreaMethod · 0.80
groupMethod · 0.45
saveConfigMethod · 0.45

Tested by

no test coverage detected