| 955 | } |
| 956 | |
| 957 | void TaskDialogPython::modifyStandardButtons(QDialogButtonBox* buttonBox) |
| 958 | { |
| 959 | Base::PyGILStateLocker lock; |
| 960 | try { |
| 961 | if (dlg.hasAttr(std::string("modifyStandardButtons"))) { |
| 962 | Gui::PythonWrapper wrap; |
| 963 | wrap.loadGuiModule(); |
| 964 | wrap.loadWidgetsModule(); |
| 965 | Py::Callable method(dlg.getAttr(std::string("modifyStandardButtons"))); |
| 966 | Py::Tuple args(1); |
| 967 | args.setItem(0, wrap.fromQWidget(buttonBox, "QDialogButtonBox")); |
| 968 | method.apply(args); |
| 969 | } |
| 970 | } |
| 971 | catch (Py::Exception&) { |
| 972 | Base::PyException e; // extract the Python error text |
| 973 | e.reportException(); |
| 974 | } |
| 975 | } |
| 976 | |
| 977 | bool TaskDialogPython::isAllowedAlterDocument() const |
| 978 | { |
no test coverage detected