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

Method modifyStandardButtons

src/Gui/TaskView/TaskDialogPython.cpp:957–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

955}
956
957void 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
977bool TaskDialogPython::isAllowedAlterDocument() const
978{

Callers 1

showDialogMethod · 0.45

Calls 5

loadGuiModuleMethod · 0.80
loadWidgetsModuleMethod · 0.80
fromQWidgetMethod · 0.80
applyMethod · 0.45
reportExceptionMethod · 0.45

Tested by

no test coverage detected