From 32bbdb0ab25e6c04c03d5e793b43c36a9fe94164 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 15 Jan 2023 22:23:53 +0100 Subject: [PATCH] FEM: move to new style connect() --- src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp | 8 ++++---- src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp | 4 ++-- src/Mod/Fem/Gui/TaskFemConstraintForce.cpp | 4 ++-- src/Mod/Fem/Gui/TaskFemConstraintGear.cpp | 4 ++-- src/Mod/Fem/Gui/TaskTetParameter.cpp | 6 ++++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp index f1002c1a81..ff734f14c2 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp @@ -101,10 +101,10 @@ TaskFemConstraintBearing::TaskFemConstraintBearing(ViewProviderFemConstraint *Co connect(ui->spinDistance, qOverload(&QDoubleSpinBox::valueChanged), this, &TaskFemConstraintBearing::onDistanceChanged); - connect(ui->buttonReference, SIGNAL(pressed()), - this, SLOT(onButtonReference())); - connect(ui->buttonLocation, SIGNAL(pressed()), - this, SLOT(onButtonLocation())); + connect(ui->buttonReference, &QPushButton::pressed, + this, [=]{onButtonReference(true);}); + connect(ui->buttonLocation, &QPushButton::pressed, + this, [=]{onButtonLocation(true);}); connect(ui->checkAxial, &QCheckBox::toggled, this, &TaskFemConstraintBearing::onCheckAxial); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp index 9073b057a6..c8f7fd21c4 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp @@ -148,8 +148,8 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(ViewProviderFemCo connect(ui->comboThermalBoundaryType, qOverload(&QComboBox::currentIndexChanged), this, &TaskFemConstraintFluidBoundary::onThermalBoundaryTypeChanged); - connect(ui->buttonDirection, SIGNAL(pressed()), - this, SLOT(onButtonDirection())); + connect(ui->buttonDirection, &QPushButton::pressed, + this, [=]{onButtonDirection(true);}); connect(ui->checkReverse, &QCheckBox::toggled, this, &TaskFemConstraintFluidBoundary::onCheckReverse); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp index 3a50e39ecf..97db698df1 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp @@ -58,8 +58,8 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce* C // create a context menu for the listview of the references createDeleteAction(ui->listReferences); - deleteAction->connect(deleteAction, SIGNAL(triggered()), this, SLOT(onReferenceDeleted())); - + connect(deleteAction, &QAction::triggered, + this, &TaskFemConstraintForce::onReferenceDeleted); connect(ui->spinForce, qOverload(&Gui::QuantitySpinBox::valueChanged), this, &TaskFemConstraintForce::onForceChanged); connect(ui->buttonDirection, &QToolButton::clicked, diff --git a/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp b/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp index 59f8b766a6..b9c1c23554 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp @@ -54,8 +54,8 @@ TaskFemConstraintGear::TaskFemConstraintGear(ViewProviderFemConstraint *Constrai this, &TaskFemConstraintGear::onForceChanged); connect(ui->spinForceAngle, qOverload(&QDoubleSpinBox::valueChanged), this, &TaskFemConstraintGear::onForceAngleChanged); - connect(ui->buttonDirection, SIGNAL(pressed()), - this, SLOT(onButtonDirection())); + connect(ui->buttonDirection, &QPushButton::pressed, + this, [=]{onButtonDirection(true);}); connect(ui->checkReversed, &QCheckBox::toggled, this, &TaskFemConstraintGear::onCheckReversed); diff --git a/src/Mod/Fem/Gui/TaskTetParameter.cpp b/src/Mod/Fem/Gui/TaskTetParameter.cpp index 569f1e36a6..2854612b4a 100644 --- a/src/Mod/Fem/Gui/TaskTetParameter.cpp +++ b/src/Mod/Fem/Gui/TaskTetParameter.cpp @@ -63,14 +63,16 @@ TaskTetParameter::TaskTetParameter(Fem::FemMeshShapeNetgenObject *pcObject,QWidg this, &TaskTetParameter::maxSizeValueChanged); QObject::connect(ui->comboBox_Fineness, qOverload(&QComboBox::activated), this, &TaskTetParameter::SwitchMethod); - QObject::connect(ui->checkBox_SecondOrder,SIGNAL(stateChanged (int)),this,SLOT(setQuadric(int))); + QObject::connect(ui->checkBox_SecondOrder, &QCheckBox::stateChanged, + this, &TaskTetParameter::setQuadric); QObject::connect(ui->doubleSpinBox_GrowthRate, qOverload(&QDoubleSpinBox::valueChanged), this, &TaskTetParameter::setGrowthRate); QObject::connect(ui->spinBox_SegsPerEdge, qOverload(&QSpinBox::valueChanged), this, &TaskTetParameter::setSegsPerEdge); QObject::connect(ui->spinBox_SegsPerRadius, qOverload(&QSpinBox::valueChanged), this, &TaskTetParameter::setSegsPerRadius); - QObject::connect(ui->checkBox_Optimize,SIGNAL(stateChanged (int)),this,SLOT(setOptimize(int))); + QObject::connect(ui->checkBox_Optimize, &QCheckBox::stateChanged, + this, &TaskTetParameter::setOptimize); if(pcObject->FemMesh.getValue().getInfo().numNode == 0) touched = true;