From 1df78febf324e75792ac96deb00b2811d4fac990 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 25 Aug 2024 14:07:09 +0200 Subject: [PATCH] Part: Prepare for clang-format --- src/Mod/Part/App/AppPart.cpp | 2 ++ src/Mod/Part/Gui/DlgExtrusion.cpp | 2 ++ src/Mod/Part/Gui/DlgFilletEdges.cpp | 2 ++ src/Mod/Part/Gui/DlgProjectionOnSurface.cpp | 2 ++ src/Mod/Part/Gui/DlgRevolution.cpp | 2 ++ src/Mod/Part/Gui/TaskAttacher.cpp | 2 ++ src/Mod/Part/Gui/TaskFaceAppearances.cpp | 14 ++++++-------- src/Mod/Part/Gui/TaskLoft.cpp | 2 ++ src/Mod/Part/Gui/TaskOffset.cpp | 2 ++ src/Mod/Part/Gui/TaskSweep.cpp | 2 ++ src/Mod/Part/Gui/TaskThickness.cpp | 2 ++ 11 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index cb5cf4a71c..8b8737b945 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -200,6 +200,7 @@ PyObject* Part::PartExceptionOCCRangeError; PyObject* Part::PartExceptionOCCConstructionError; PyObject* Part::PartExceptionOCCDimensionError; +// clang-format off PyMOD_INIT_FUNC(Part) { // load dependent module @@ -564,3 +565,4 @@ PyMOD_INIT_FUNC(Part) PyMOD_Return(partModule); } +// clang-format on diff --git a/src/Mod/Part/Gui/DlgExtrusion.cpp b/src/Mod/Part/Gui/DlgExtrusion.cpp index a8c1f005d6..3f2f39aca7 100644 --- a/src/Mod/Part/Gui/DlgExtrusion.cpp +++ b/src/Mod/Part/Gui/DlgExtrusion.cpp @@ -143,6 +143,7 @@ DlgExtrusion::~DlgExtrusion() void DlgExtrusion::setupConnections() { + // clang-format off connect(ui->rbDirModeCustom, &QRadioButton::toggled, this, &DlgExtrusion::onDirModeCustomToggled); connect(ui->rbDirModeEdge, &QRadioButton::toggled, @@ -161,6 +162,7 @@ void DlgExtrusion::setupConnections() this, &DlgExtrusion::onCheckSymmetricToggled); connect(ui->txtLink, &QLineEdit::textChanged, this, &DlgExtrusion::onTextLinkTextChanged); + // clang-format on } void DlgExtrusion::changeEvent(QEvent *e) diff --git a/src/Mod/Part/Gui/DlgFilletEdges.cpp b/src/Mod/Part/Gui/DlgFilletEdges.cpp index 7ce7a6ce88..9ca6e974d4 100644 --- a/src/Mod/Part/Gui/DlgFilletEdges.cpp +++ b/src/Mod/Part/Gui/DlgFilletEdges.cpp @@ -308,6 +308,7 @@ DlgFilletEdges::~DlgFilletEdges() void DlgFilletEdges::setupConnections() { + // clang-format off connect(ui->shapeObject, qOverload(&QComboBox::activated), this, &DlgFilletEdges::onShapeObjectActivated); connect(ui->selectEdges, &QRadioButton::toggled, @@ -326,6 +327,7 @@ void DlgFilletEdges::setupConnections() connect(ui->filletEndRadius, qOverload(&Gui::QuantitySpinBox::valueChanged), this, &DlgFilletEdges::onFilletEndRadiusValueChanged); + // clang-format on } void DlgFilletEdges::onSelectionChanged(const Gui::SelectionChanges& msg) diff --git a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp index fc0781421e..b6ab88eaa0 100644 --- a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp +++ b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp @@ -207,6 +207,7 @@ DlgProjectionOnSurface::~DlgProjectionOnSurface() void PartGui::DlgProjectionOnSurface::setupConnections() { + // clang-format off connect(ui->pushButtonAddFace, &QPushButton::clicked, this, @@ -259,6 +260,7 @@ void PartGui::DlgProjectionOnSurface::setupConnections() qOverload(&QDoubleSpinBox::valueChanged), this, &DlgProjectionOnSurface::onDoubleSpinBoxSolidDepthValueChanged); + // clang-format on } void PartGui::DlgProjectionOnSurface::slotDeletedDocument(const App::Document& Doc) diff --git a/src/Mod/Part/Gui/DlgRevolution.cpp b/src/Mod/Part/Gui/DlgRevolution.cpp index b193a1e777..a6b3255e2e 100644 --- a/src/Mod/Part/Gui/DlgRevolution.cpp +++ b/src/Mod/Part/Gui/DlgRevolution.cpp @@ -142,6 +142,7 @@ DlgRevolution::~DlgRevolution() void DlgRevolution::setupConnections() { + // clang-format off connect(ui->selectLine, &QPushButton::clicked, this, &DlgRevolution::onSelectLineClicked); connect(ui->btnX, &QPushButton::clicked, @@ -152,6 +153,7 @@ void DlgRevolution::setupConnections() this, &DlgRevolution::onButtonZClicked); connect(ui->txtAxisLink, &QLineEdit::textChanged, this, &DlgRevolution::onAxisLinkTextChanged); + // clang-format on } Base::Vector3d DlgRevolution::getDirection() const diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index a0e0e7d236..133e9cefea 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -123,6 +123,7 @@ TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidge ui->setupUi(proxy); QMetaObject::connectSlotsByName(this); + // clang-format off connect(ui->attachmentOffsetX, qOverload(&Gui::QuantitySpinBox::valueChanged), this, &TaskAttacher::onAttachmentOffsetXChanged); connect(ui->attachmentOffsetY, qOverload(&Gui::QuantitySpinBox::valueChanged), @@ -155,6 +156,7 @@ TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidge this, &TaskAttacher::onRefName4); connect(ui->listOfModes, &QListWidget::itemSelectionChanged, this, &TaskAttacher::onModeSelect); + // clang-format on this->groupLayout()->addWidget(proxy); diff --git a/src/Mod/Part/Gui/TaskFaceAppearances.cpp b/src/Mod/Part/Gui/TaskFaceAppearances.cpp index e28aac6685..b6d87647ee 100644 --- a/src/Mod/Part/Gui/TaskFaceAppearances.cpp +++ b/src/Mod/Part/Gui/TaskFaceAppearances.cpp @@ -278,18 +278,16 @@ FaceAppearances::~FaceAppearances() void FaceAppearances::setupConnections() { + // clang-format off connect(d->ui->defaultButton, &QPushButton::clicked, this, &FaceAppearances::onDefaultButtonClicked); connect(d->ui->boxSelection, &QPushButton::toggled, this, &FaceAppearances::onBoxSelectionToggled); - connect(d->ui->widgetMaterial, - &MatGui::MaterialTreeWidget::materialSelected, - this, - &FaceAppearances::onMaterialSelected); - connect(d->ui->buttonCustomAppearance, - &QPushButton::clicked, - this, - &FaceAppearances::onButtonCustomAppearanceClicked); + connect(d->ui->widgetMaterial, &MatGui::MaterialTreeWidget::materialSelected, + this, &FaceAppearances::onMaterialSelected); + connect(d->ui->buttonCustomAppearance, &QPushButton::clicked, + this, &FaceAppearances::onButtonCustomAppearanceClicked); + // clang-format on } void FaceAppearances::slotUndoDocument(const Gui::Document& Doc) diff --git a/src/Mod/Part/Gui/TaskLoft.cpp b/src/Mod/Part/Gui/TaskLoft.cpp index fe8669407d..c9e25de6a4 100644 --- a/src/Mod/Part/Gui/TaskLoft.cpp +++ b/src/Mod/Part/Gui/TaskLoft.cpp @@ -73,10 +73,12 @@ LoftWidget::LoftWidget(QWidget* parent) d->ui.selector->setAvailableLabel(tr("Available profiles")); d->ui.selector->setSelectedLabel(tr("Selected profiles")); + // clang-format off connect(d->ui.selector->availableTreeWidget(), &QTreeWidget::currentItemChanged, this, &LoftWidget::onCurrentItemChanged); connect(d->ui.selector->selectedTreeWidget(), &QTreeWidget::currentItemChanged, this, &LoftWidget::onCurrentItemChanged); + // clang-format on findShapes(); } diff --git a/src/Mod/Part/Gui/TaskOffset.cpp b/src/Mod/Part/Gui/TaskOffset.cpp index ab555b8186..38e744d801 100644 --- a/src/Mod/Part/Gui/TaskOffset.cpp +++ b/src/Mod/Part/Gui/TaskOffset.cpp @@ -112,6 +112,7 @@ OffsetWidget::~OffsetWidget() void OffsetWidget::setupConnections() { + // clang-format off connect(d->ui.spinOffset, qOverload(&Gui::QuantitySpinBox::valueChanged), this, &OffsetWidget::onSpinOffsetValueChanged); connect(d->ui.modeType, qOverload(&QComboBox::activated), @@ -126,6 +127,7 @@ void OffsetWidget::setupConnections() this, &OffsetWidget::onFillOffsetToggled); connect(d->ui.updateView, &QCheckBox::toggled, this, &OffsetWidget::onUpdateViewToggled); + // clang-format on } Part::Offset* OffsetWidget::getObject() const diff --git a/src/Mod/Part/Gui/TaskSweep.cpp b/src/Mod/Part/Gui/TaskSweep.cpp index 118eefc918..efecba6a2b 100644 --- a/src/Mod/Part/Gui/TaskSweep.cpp +++ b/src/Mod/Part/Gui/TaskSweep.cpp @@ -132,12 +132,14 @@ SweepWidget::SweepWidget(QWidget* parent) d->ui.selector->setSelectedLabel(tr("Selected profiles")); d->ui.labelPath->clear(); + // clang-format off connect(d->ui.buttonPath, &QPushButton::toggled, this, &SweepWidget::onButtonPathToggled); connect(d->ui.selector->availableTreeWidget(), &QTreeWidget::currentItemChanged, this, &SweepWidget::onCurrentItemChanged); connect(d->ui.selector->selectedTreeWidget(), &QTreeWidget::currentItemChanged, this, &SweepWidget::onCurrentItemChanged); + // clang-format on findShapes(); } diff --git a/src/Mod/Part/Gui/TaskThickness.cpp b/src/Mod/Part/Gui/TaskThickness.cpp index ff70c304f5..3146c4c019 100644 --- a/src/Mod/Part/Gui/TaskThickness.cpp +++ b/src/Mod/Part/Gui/TaskThickness.cpp @@ -119,6 +119,7 @@ ThicknessWidget::~ThicknessWidget() void ThicknessWidget::setupConnections() { + // clang-format off connect(d->ui.spinOffset, qOverload(&Gui::QuantitySpinBox::valueChanged), this, &ThicknessWidget::onSpinOffsetValueChanged); connect(d->ui.modeType, qOverload(&QComboBox::activated), @@ -133,6 +134,7 @@ void ThicknessWidget::setupConnections() this, &ThicknessWidget::onFacesButtonToggled); connect(d->ui.updateView, &QCheckBox::toggled, this, &ThicknessWidget::onUpdateViewToggled); + // clang-format on } Part::Thickness* ThicknessWidget::getObject() const