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

@@ -85,8 +85,8 @@ TaskPolarPatternParameters::TaskPolarPatternParameters(TaskMultiTransformParamet
{
proxy = new QWidget(parentTask);
ui->setupUi(proxy);
connect(ui->buttonOK, SIGNAL(pressed()),
parentTask, SLOT(onSubTaskButtonOK()));
connect(ui->buttonOK, &QToolButton::pressed,
parentTask, &TaskMultiTransformParameters::onSubTaskButtonOK);
QMetaObject::connectSlotsByName(this);
layout->addWidget(proxy);
@@ -105,8 +105,10 @@ TaskPolarPatternParameters::TaskPolarPatternParameters(TaskMultiTransformParamet
void TaskPolarPatternParameters::connectSignals()
{
connect(ui->buttonAddFeature, SIGNAL(toggled(bool)), this, SLOT(onButtonAddFeature(bool)));
connect(ui->buttonRemoveFeature, SIGNAL(toggled(bool)), this, SLOT(onButtonRemoveFeature(bool)));
connect(ui->buttonAddFeature, &QToolButton::toggled,
this, &TaskPolarPatternParameters::onButtonAddFeature);
connect(ui->buttonRemoveFeature, &QToolButton::toggled,
this, &TaskPolarPatternParameters::onButtonRemoveFeature);
// Create context menu
QAction* action = new QAction(tr("Remove"), this);
@@ -116,27 +118,27 @@ void TaskPolarPatternParameters::connectSignals()
action->setShortcutVisibleInContextMenu(true);
#endif
ui->listWidgetFeatures->addAction(action);
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
connect(action, &QAction::triggered,
this, &TaskPolarPatternParameters::onFeatureDeleted);
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
connect(ui->listWidgetFeatures->model(),
SIGNAL(rowsMoved(QModelIndex, int, int, QModelIndex, int)), this, SLOT(indexesMoved()));
connect(ui->listWidgetFeatures->model(), &QAbstractListModel::rowsMoved,
this, &TaskPolarPatternParameters::indexesMoved);
updateViewTimer = new QTimer(this);
updateViewTimer->setSingleShot(true);
updateViewTimer->setInterval(getUpdateViewTimeout());
connect(updateViewTimer, SIGNAL(timeout()),
this, SLOT(onUpdateViewTimer()));
connect(ui->comboAxis, SIGNAL(activated(int)),
this, SLOT(onAxisChanged(int)));
connect(ui->checkReverse, SIGNAL(toggled(bool)),
this, SLOT(onCheckReverse(bool)));
connect(ui->polarAngle, SIGNAL(valueChanged(double)),
this, SLOT(onAngle(double)));
connect(ui->spinOccurrences, SIGNAL(valueChanged(uint)),
this, SLOT(onOccurrences(uint)));
connect(ui->checkBoxUpdateView, SIGNAL(toggled(bool)),
this, SLOT(onUpdateView(bool)));
connect(updateViewTimer, &QTimer::timeout,
this, &TaskPolarPatternParameters::onUpdateViewTimer);
connect(ui->comboAxis, qOverload<int>(&QComboBox::activated),
this, &TaskPolarPatternParameters::onAxisChanged);
connect(ui->checkReverse, &QCheckBox::toggled,
this, &TaskPolarPatternParameters::onCheckReverse);
connect(ui->polarAngle, qOverload<double>(&Gui::QuantitySpinBox::valueChanged),
this, &TaskPolarPatternParameters::onAngle);
connect(ui->spinOccurrences, &Gui::UIntSpinBox::unsignedChanged,
this, &TaskPolarPatternParameters::onOccurrences);
connect(ui->checkBoxUpdateView, &QCheckBox::toggled,
this, &TaskPolarPatternParameters::onUpdateView);
}
void TaskPolarPatternParameters::setupUI()