Robot: Apply clang format

This commit is contained in:
wmayer
2023-09-11 10:53:40 +02:00
committed by wwmayer
parent 3acb817ee7
commit 4bc2b1b03c
47 changed files with 1592 additions and 1263 deletions

View File

@@ -50,13 +50,15 @@ void loadRobotResource()
Gui::Translator::instance()->refresh();
}
namespace RobotGui {
class Module : public Py::ExtensionModule<Module>
namespace RobotGui
{
class Module: public Py::ExtensionModule<Module>
{
public:
Module() : Py::ExtensionModule<Module>("RobotGui")
Module()
: Py::ExtensionModule<Module>("RobotGui")
{
initialize("This module is the RobotGui module."); // register with Python
initialize("This module is the RobotGui module.");// register with Python
}
private:
@@ -67,7 +69,7 @@ PyObject* initModule()
return Base::Interpreter().addModule(new Module);
}
} // namespace RobotGui
}// namespace RobotGui
/* Python entry */
@@ -93,7 +95,7 @@ PyMOD_INIT_FUNC(RobotGui)
// default displacement while e.g. picking
Base::Interpreter().runString("_DefDisplacement = FreeCAD.Vector(0,0,0)");
}
catch(const Base::Exception& e) {
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
PyMOD_Return(nullptr);
}
@@ -106,6 +108,7 @@ PyMOD_INIT_FUNC(RobotGui)
CreateRobotCommandsInsertRobots();
CreateRobotCommandsTrajectory();
// clang-format off
// addition objects
RobotGui::Workbench ::init();
RobotGui::ViewProviderRobotObject ::init();
@@ -113,8 +116,9 @@ PyMOD_INIT_FUNC(RobotGui)
RobotGui::ViewProviderEdge2TracObject ::init();
RobotGui::ViewProviderTrajectoryCompound ::init();
RobotGui::ViewProviderTrajectoryDressUp ::init();
// clang-format on
// add resources and reloads the translators
// add resources and reloads the translators
loadRobotResource();
PyMOD_Return(mod);