SketcherGui: apply clang-format

This commit is contained in:
Abdullah Tahiri
2023-05-25 15:09:30 +02:00
committed by abdullahtahiriyo
parent dc2d861bf0
commit 78ae9c1d7d
98 changed files with 17648 additions and 13572 deletions

View File

@@ -57,16 +57,19 @@ void loadSketcherResource()
Gui::Translator::instance()->refresh();
}
namespace SketcherGui {
class Module : public Py::ExtensionModule<Module>
namespace SketcherGui
{
class Module: public Py::ExtensionModule<Module>
{
public:
Module() : Py::ExtensionModule<Module>("SketcherGui")
Module()
: Py::ExtensionModule<Module>("SketcherGui")
{
initialize("This module is the SketcherGui module."); // register with Python
initialize("This module is the SketcherGui module.");// register with Python
}
~Module() override {}
~Module() override
{}
private:
};
@@ -76,7 +79,7 @@ PyObject* initModule()
return Base::Interpreter().addModule(new Module);
}
} // namespace SketcherGui
}// namespace SketcherGui
/* Python entry */
PyMOD_INIT_FUNC(SketcherGui)
@@ -89,7 +92,7 @@ PyMOD_INIT_FUNC(SketcherGui)
Base::Interpreter().runString("import PartGui");
Base::Interpreter().runString("import Sketcher");
}
catch(const Base::Exception& e) {
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
PyMOD_Return(nullptr);
}
@@ -101,7 +104,7 @@ PyMOD_INIT_FUNC(SketcherGui)
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/elements"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/general"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/geometry"));
//Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/obsolete"));
// Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/obsolete"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/pointers"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/splines"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/tools"));
@@ -118,23 +121,29 @@ PyMOD_INIT_FUNC(SketcherGui)
SketcherGui::Workbench::init();
// Add Types to module
Base::Interpreter().addType(&SketcherGui::ViewProviderSketchGeometryExtensionPy ::Type,sketcherGuiModule,"ViewProviderSketchGeometryExtension");
Base::Interpreter().addType(&SketcherGui::ViewProviderSketchGeometryExtensionPy ::Type,
sketcherGuiModule,
"ViewProviderSketchGeometryExtension");
// init objects
SketcherGui::ViewProviderSketch ::init();
SketcherGui::ViewProviderPython ::init();
SketcherGui::ViewProviderCustom ::init();
SketcherGui::ViewProviderCustomPython ::init();
SketcherGui::SoZoomTranslation ::initClass();
SketcherGui::PropertyConstraintListItem ::init();
SketcherGui::ViewProviderSketchGeometryExtension ::init();
SketcherGui::ViewProviderSketch ::init();
SketcherGui::ViewProviderPython ::init();
SketcherGui::ViewProviderCustom ::init();
SketcherGui::ViewProviderCustomPython ::init();
SketcherGui::SoZoomTranslation ::initClass();
SketcherGui::PropertyConstraintListItem ::init();
SketcherGui::ViewProviderSketchGeometryExtension ::init();
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettings> ( QT_TRANSLATE_NOOP("QObject","Sketcher") );
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsGrid> ( QT_TRANSLATE_NOOP("QObject","Sketcher") );
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsDisplay> ( QT_TRANSLATE_NOOP("QObject","Sketcher") );
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsColors> ( QT_TRANSLATE_NOOP("QObject","Sketcher") );
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettings>(
QT_TRANSLATE_NOOP("QObject", "Sketcher"));
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsGrid>(
QT_TRANSLATE_NOOP("QObject", "Sketcher"));
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsDisplay>(
QT_TRANSLATE_NOOP("QObject", "Sketcher"));
(void)new Gui::PrefPageProducer<SketcherGui::SketcherSettingsColors>(
QT_TRANSLATE_NOOP("QObject", "Sketcher"));
// add resources and reloads the translators
// add resources and reloads the translators
loadSketcherResource();
PyMOD_Return(sketcherGuiModule);