| 209 | } |
| 210 | |
| 211 | Py::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 | |
| 232 | Py::Object ControlPy::clearTaskWatcher(const Py::Tuple& args) |
| 233 | { |