MCPcopy Create free account
hub / github.com/Kitware/ParaView / writeItemSettings

Method writeItemSettings

Qt/Python/pqPythonMacroSettings.cxx:138–156  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

136
137//----------------------------------------------------------------------------
138void pqPythonMacroSettings::writeItemSettings(const QMap<QString, QString>& valueMap)
139{
140 pqSettings* settings = pqApplicationCore::instance()->settings();
141 settings->beginGroup(details::SETTINGS_GROUP(this->CurrentCategory));
142 settings->remove("Macros");
143 settings->beginWriteArray("Macros");
144 int idx = 0;
145 for (auto macroPathToolTip = valueMap.begin(); macroPathToolTip != valueMap.end();
146 macroPathToolTip++)
147 {
148 settings->setArrayIndex(idx);
149 settings->setValue(details::SETTINGS_ITEM_KEY(), macroPathToolTip.key());
150 settings->setValue(
151 details::SETTINGS_VALUE_KEY(this->CurrentCategory), macroPathToolTip.value());
152 idx++;
153 }
154 settings->endArray();
155 settings->endGroup();
156}
157
158//----------------------------------------------------------------------------
159void pqPythonMacroSettings::removeItemFromSettings(const QString& macroPath)

Callers 1

Calls 10

instanceFunction · 0.85
SETTINGS_VALUE_KEYFunction · 0.85
SETTINGS_GROUPFunction · 0.70
SETTINGS_ITEM_KEYFunction · 0.70
settingsMethod · 0.45
removeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
setValueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected