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

Method resetActions

Qt/Python/pqPythonMacroSupervisor.cxx:245–276  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

243
244//----------------------------------------------------------------------------
245void pqPythonMacroSupervisor::resetActions()
246{
247 // Delete RUN
248 Q_FOREACH (QAction* action, this->Internal->RunActionMap.values())
249 {
250 removeActionFromWidgets(action, this->Internal->RunWidgetContainers);
251 delete action;
252 }
253 this->Internal->RunActionMap.clear();
254 // Delete EDIT
255 Q_FOREACH (QAction* action, this->Internal->EditActionMap.values())
256 {
257 removeActionFromWidgets(action, this->Internal->EditWidgetContainers);
258 delete action;
259 }
260 this->Internal->EditActionMap.clear();
261 // Delete DELETE
262 Q_FOREACH (QAction* action, this->Internal->DeleteActionMap.values())
263 {
264 removeActionFromWidgets(action, this->Internal->DeleteWidgetContainers);
265 delete action;
266 }
267 this->Internal->DeleteActionMap.clear();
268
269 // Key is filename, value is macroname
270 QMap<QString, QString> macros = pqPythonMacroSupervisor::getStoredMacros();
271 QMap<QString, QString>::const_iterator itr;
272 for (itr = macros.constBegin(); itr != macros.constEnd(); ++itr)
273 {
274 this->addMacro(itr.value(), itr.key());
275 }
276}
277
278//----------------------------------------------------------------------------
279void pqPythonMacroSupervisor::addMacro(const QString& fileName)

Callers 2

addWidgetForMacrosMethod · 0.95
updateMacroListMethod · 0.95

Calls 6

addMacroMethod · 0.95
removeActionFromWidgetsFunction · 0.85
Q_FOREACHFunction · 0.70
valuesMethod · 0.45
clearMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected