PD: move to new style connect()

This commit is contained in:
wmayer
2023-01-15 14:27:33 +01:00
parent 6738aa8d9c
commit a122aa01a7
22 changed files with 385 additions and 304 deletions

View File

@@ -67,8 +67,8 @@ TaskScaledParameters::TaskScaledParameters(TaskMultiTransformParameters *parentT
{
proxy = new QWidget(parentTask);
ui->setupUi(proxy);
connect(ui->buttonOK, SIGNAL(pressed()),
parentTask, SLOT(onSubTaskButtonOK()));
connect(ui->buttonOK, &QPushButton::pressed,
parentTask, &TaskScaledParameters::onSubTaskButtonOK);
QMetaObject::connectSlotsByName(this);
layout->addWidget(proxy);
@@ -85,8 +85,8 @@ TaskScaledParameters::TaskScaledParameters(TaskMultiTransformParameters *parentT
void TaskScaledParameters::setupUI()
{
connect(ui->buttonAddFeature, SIGNAL(toggled(bool)), this, SLOT(onButtonAddFeature(bool)));
connect(ui->buttonRemoveFeature, SIGNAL(toggled(bool)), this, SLOT(onButtonRemoveFeature(bool)));
connect(ui->buttonAddFeature, &QPushButton::toggled, this, &TaskScaledParameters::onButtonAddFeature);
connect(ui->buttonRemoveFeature, &QPushButton::toggled, this, &TaskScaledParameters::onButtonRemoveFeature);
// Create context menu
QAction* action = new QAction(tr("Remove"), this);
@@ -96,15 +96,15 @@ void TaskScaledParameters::setupUI()
action->setShortcutVisibleInContextMenu(true);
#endif
ui->listWidgetFeatures->addAction(action);
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
connect(action, &QAction::triggered, this, &TaskScaledParameters::onFeatureDeleted);
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
connect(ui->spinFactor, SIGNAL(valueChanged(double)),
this, SLOT(onFactor(double)));
connect(ui->spinOccurrences, SIGNAL(valueChanged(uint)),
this, SLOT(onOccurrences(uint)));
connect(ui->checkBoxUpdateView, SIGNAL(toggled(bool)),
this, SLOT(onUpdateView(bool)));
connect(ui->spinFactor, qOverload<double>(&Gui::QuantitySpinBox::valueChanged),
this, &TaskScaledParameters::onFactor);
connect(ui->spinOccurrences, &Gui::UIntSpinBox::unsignedChanged,
this, &TaskScaledParameters::onOccurrences);
connect(ui->checkBoxUpdateView, &QCheckBox::toggled,
this, &TaskScaledParameters::onUpdateView);
// Get the feature data
PartDesign::Scaled* pcScaled = static_cast<PartDesign::Scaled*>(getObject());