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

Method addWidgetForMacros

Qt/Python/pqPythonMacroSupervisor.cxx:183–205  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

181}
182//----------------------------------------------------------------------------
183void pqPythonMacroSupervisor::addWidgetForMacros(QWidget* widget, int actionType)
184{
185 QList<QPointer<QWidget>>* widgetContainers = nullptr;
186 switch (actionType)
187 {
188 case 0: // run
189 widgetContainers = &this->Internal->RunWidgetContainers;
190 break;
191 case 1: // edit
192 widgetContainers = &this->Internal->EditWidgetContainers;
193 break;
194 case 2: // delete
195 widgetContainers = &this->Internal->DeleteWidgetContainers;
196 break;
197 }
198
199 if (widget && !widgetContainers->contains(widget))
200 {
201 addPlaceHolderIfNeeded(widget);
202 widgetContainers->append(widget);
203 }
204 this->resetActions();
205}
206//----------------------------------------------------------------------------
207QMap<QString, QString> pqPythonMacroSupervisor::getStoredMacros()
208{

Callers 3

addWidgetForRunMacrosMethod · 0.95

Calls 4

resetActionsMethod · 0.95
addPlaceHolderIfNeededFunction · 0.85
containsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected