improve TaskDialog API doc
This commit is contained in:
@@ -61,16 +61,38 @@ void ControlPy::init_type()
|
||||
behaviors().supportRepr();
|
||||
behaviors().supportGetattr();
|
||||
behaviors().supportSetattr();
|
||||
add_varargs_method("showDialog",&ControlPy::showDialog,"showDialog()");
|
||||
add_varargs_method("activeDialog",&ControlPy::activeDialog,"activeDialog()");
|
||||
add_varargs_method("closeDialog",&ControlPy::closeDialog,"closeDialog()");
|
||||
add_varargs_method("addTaskWatcher",&ControlPy::addTaskWatcher,"addTaskWatcher()");
|
||||
add_varargs_method("clearTaskWatcher",&ControlPy::clearTaskWatcher,"clearTaskWatcher()");
|
||||
add_varargs_method("isAllowedAlterDocument",&ControlPy::isAllowedAlterDocument,"isAllowedAlterDocument()");
|
||||
add_varargs_method("isAllowedAlterView",&ControlPy::isAllowedAlterView,"isAllowedAlterView()");
|
||||
add_varargs_method("isAllowedAlterSelection",&ControlPy::isAllowedAlterSelection,"isAllowedAlterSelection()");
|
||||
add_varargs_method("showTaskView",&ControlPy::showTaskView,"showTaskView()");
|
||||
add_varargs_method("showModelView",&ControlPy::showModelView,"showModelView()");
|
||||
add_varargs_method("showDialog",&ControlPy::showDialog,
|
||||
"show the given dialog in the task panel\n"
|
||||
"showDialog(dialog)\n"
|
||||
"--\n"
|
||||
"if a task is already active a RuntimeError is raised");
|
||||
add_varargs_method("activeDialog",&ControlPy::activeDialog,
|
||||
"check if a dialog is active in the task panel\n"
|
||||
"activeDialog() --> bool");
|
||||
add_varargs_method("closeDialog",&ControlPy::closeDialog,
|
||||
"close the active dialog\n"
|
||||
"closeDialog()");
|
||||
add_varargs_method("addTaskWatcher",&ControlPy::addTaskWatcher,
|
||||
"install a (list of) TaskWatcher\n"
|
||||
"addTaskWatcher(TaskWatcher | list)");
|
||||
add_varargs_method("clearTaskWatcher",&ControlPy::clearTaskWatcher,
|
||||
"remove all TaskWatchers\n"
|
||||
"clearTaskWatcher()");
|
||||
add_varargs_method("isAllowedAlterDocument",&ControlPy::isAllowedAlterDocument,
|
||||
"return the permission to alter the current Document\n"
|
||||
"isAllowedAlterDocument() --> bool");
|
||||
add_varargs_method("isAllowedAlterView",&ControlPy::isAllowedAlterView,
|
||||
"return the permission to alter the current View\n"
|
||||
"isAllowedAlterView() --> bool");
|
||||
add_varargs_method("isAllowedAlterSelection",&ControlPy::isAllowedAlterSelection,
|
||||
"return the permission to alter the current Selection\n"
|
||||
"isAllowedAlterSelection() --> bool");
|
||||
add_varargs_method("showTaskView",&ControlPy::showTaskView,
|
||||
"show the Task panel\n"
|
||||
"showTaskView()");
|
||||
add_varargs_method("showModelView",&ControlPy::showModelView,
|
||||
"show the Model panel\n"
|
||||
"showModelView()");
|
||||
}
|
||||
|
||||
ControlPy::ControlPy()
|
||||
@@ -312,7 +334,7 @@ TaskDialogPython::TaskDialogPython(const Py::Object& o) : dlg(o)
|
||||
}
|
||||
}
|
||||
else if (dlg.hasAttr(std::string("form"))) {
|
||||
Py::Object f(dlg.getAttr(std::string("form")));
|
||||
Py::Object f(dlg.getAttr(std::string("form")));
|
||||
Py::List widgets;
|
||||
if (f.isList()) {
|
||||
widgets = f;
|
||||
|
||||
Reference in New Issue
Block a user