MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / addTaskWatcher

Method addTaskWatcher

src/Gui/TaskView/TaskDialogPython.cpp:211–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211Py::Object ControlPy::addTaskWatcher(const Py::Tuple& args)
212{
213 PyObject* arg0;
214 if (!PyArg_ParseTuple(args.ptr(), "O", &arg0)) {
215 throw Py::Exception();
216 }
217
218 std::vector<Gui::TaskView::TaskWatcher*> watcher;
219 Py::Sequence list(arg0);
220 for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
221 auto w = new TaskWatcherPython(*it);
222 watcher.push_back(w);
223 }
224
225 Gui::TaskView::TaskView* taskView = Gui::Control().taskPanel();
226 if (taskView) {
227 taskView->addTaskWatcher(watcher);
228 }
229 return Py::None();
230}
231
232Py::Object ControlPy::clearTaskWatcher(const Py::Tuple& args)
233{

Callers

nothing calls this directly

Calls 6

taskPanelMethod · 0.80
ExceptionClass · 0.50
ptrMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected