From d9f8516c4a87db75a68034cb739c193e7fe14aba Mon Sep 17 00:00:00 2001 From: Uwe Date: Sat, 5 Feb 2022 02:39:25 +0100 Subject: [PATCH] [PD] Extrude: modernize SignalSlot connection as suggested recently by @chennes --- .../PartDesign/Gui/TaskExtrudeParameters.cpp | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp b/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp index de2b3cea7f..4c8d91c850 100644 --- a/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp @@ -194,40 +194,40 @@ void TaskExtrudeParameters::connectSlots() { QMetaObject::connectSlotsByName(this); - connect(ui->lengthEdit, SIGNAL(valueChanged(double)), - this, SLOT(onLengthChanged(double))); - connect(ui->lengthEdit2, SIGNAL(valueChanged(double)), - this, SLOT(onLength2Changed(double))); - connect(ui->offsetEdit, SIGNAL(valueChanged(double)), - this, SLOT(onOffsetChanged(double))); - connect(ui->taperEdit, SIGNAL(valueChanged(double)), - this, SLOT(onTaperChanged(double))); - connect(ui->taperEdit2, SIGNAL(valueChanged(double)), - this, SLOT(onTaper2Changed(double))); - connect(ui->directionCB, SIGNAL(activated(int)), - this, SLOT(onDirectionCBChanged(int))); - connect(ui->checkBoxAlongDirection, SIGNAL(toggled(bool)), - this, SLOT(onAlongSketchNormalChanged(bool))); - connect(ui->checkBoxDirection, SIGNAL(toggled(bool)), - this, SLOT(onDirectionToggled(bool))); - connect(ui->XDirectionEdit, SIGNAL(valueChanged(double)), - this, SLOT(onXDirectionEditChanged(double))); - connect(ui->YDirectionEdit, SIGNAL(valueChanged(double)), - this, SLOT(onYDirectionEditChanged(double))); - connect(ui->ZDirectionEdit, SIGNAL(valueChanged(double)), - this, SLOT(onZDirectionEditChanged(double))); - connect(ui->checkBoxMidplane, SIGNAL(toggled(bool)), - this, SLOT(onMidplaneChanged(bool))); - connect(ui->checkBoxReversed, SIGNAL(toggled(bool)), - this, SLOT(onReversedChanged(bool))); - connect(ui->changeMode, SIGNAL(currentIndexChanged(int)), - this, SLOT(onModeChanged(int))); - connect(ui->buttonFace, SIGNAL(clicked()), - this, SLOT(onButtonFace())); - connect(ui->lineFaceName, SIGNAL(textEdited(QString)), - this, SLOT(onFaceName(QString))); - connect(ui->checkBoxUpdateView, SIGNAL(toggled(bool)), - this, SLOT(onUpdateView(bool))); + connect(ui->lengthEdit, QOverload::of(&Gui::PrefQuantitySpinBox::valueChanged), + this, &TaskExtrudeParameters::onLengthChanged); + connect(ui->lengthEdit2, QOverload::of(&Gui::PrefQuantitySpinBox::valueChanged), + this, &TaskExtrudeParameters::onLength2Changed); + connect(ui->offsetEdit, QOverload::of(&Gui::PrefQuantitySpinBox::valueChanged), + this, &TaskExtrudeParameters::onOffsetChanged); + connect(ui->taperEdit, QOverload::of(&Gui::PrefQuantitySpinBox::valueChanged), + this, &TaskExtrudeParameters::onTaperChanged); + connect(ui->taperEdit2, QOverload::of(&Gui::PrefQuantitySpinBox::valueChanged), + this, &TaskExtrudeParameters::onTaper2Changed); + connect(ui->directionCB, QOverload::of(&QComboBox::activated), + this, &TaskExtrudeParameters::onDirectionCBChanged); + connect(ui->checkBoxAlongDirection, &QCheckBox::toggled, + this, &TaskExtrudeParameters::onAlongSketchNormalChanged); + connect(ui->checkBoxDirection, &QCheckBox::toggled, + this, &TaskExtrudeParameters::onDirectionToggled); + connect(ui->XDirectionEdit, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &TaskExtrudeParameters::onXDirectionEditChanged); + connect(ui->YDirectionEdit, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &TaskExtrudeParameters::onYDirectionEditChanged); + connect(ui->ZDirectionEdit, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &TaskExtrudeParameters::onZDirectionEditChanged); + connect(ui->checkBoxMidplane, &QCheckBox::toggled, + this, &TaskExtrudeParameters::onMidplaneChanged); + connect(ui->checkBoxReversed, &QCheckBox::toggled, + this, &TaskExtrudeParameters::onReversedChanged); + connect(ui->changeMode, QOverload::of(&QComboBox::currentIndexChanged), + this, &TaskExtrudeParameters::onModeChanged); + connect(ui->buttonFace, &QPushButton::clicked, + this, &TaskExtrudeParameters::onButtonFace); + connect(ui->lineFaceName, &QLineEdit::textEdited, + this, &TaskExtrudeParameters::onFaceName); + connect(ui->checkBoxUpdateView, &QCheckBox::toggled, + this, &TaskExtrudeParameters::onUpdateView); } void TaskExtrudeParameters::tryRecomputeFeature()