MCPcopy Create free account
hub / github.com/KDE/labplot / ~WelcomeScreenHelper

Method ~WelcomeScreenHelper

src/frontend/welcomescreen/WelcomeScreenHelper.cpp:52–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52WelcomeScreenHelper::~WelcomeScreenHelper() {
53 // save width&height ratio values
54 KConfigGroup conf(KSharedConfig::openConfig(), "WelcomeScreenHelper");
55
56 int widthCount = m_widthScale.size();
57 conf.writeEntry("width_count", widthCount);
58 int currentWidthIndex = 0;
59
60 for (auto item = m_widthScale.begin(); item != m_widthScale.end() && currentWidthIndex < widthCount; ++item) {
61 conf.writeEntry("widthName_" + QString::number(currentWidthIndex), item.key());
62 conf.writeEntry("widthValue_" + QString::number(currentWidthIndex), QString::number(item.value()));
63 currentWidthIndex++;
64 }
65
66 int heightCount = m_heightScale.size();
67 conf.writeEntry("height_count", widthCount);
68 int currentHeightIndex = 0;
69
70 for (auto item = m_heightScale.begin(); item != m_heightScale.end() && currentHeightIndex < heightCount; ++item) {
71 conf.writeEntry("heightName_" + QString::number(currentHeightIndex), item.key());
72 conf.writeEntry("heightValue_" + QString::number(currentHeightIndex), QString::number(item.value()));
73 currentHeightIndex++;
74 }
75}
76
77/**
78 * @brief Loads the saved configuration

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected