PD: move to new style connect()
This commit is contained in:
@@ -78,8 +78,8 @@ TaskLinearPatternParameters::TaskLinearPatternParameters(TaskMultiTransformParam
|
||||
{
|
||||
proxy = new QWidget(parentTask);
|
||||
ui->setupUi(proxy);
|
||||
connect(ui->buttonOK, SIGNAL(pressed()),
|
||||
parentTask, SLOT(onSubTaskButtonOK()));
|
||||
connect(ui->buttonOK, &QToolButton::pressed,
|
||||
parentTask, &TaskLinearPatternParameters::onSubTaskButtonOK);
|
||||
QMetaObject::connectSlotsByName(this);
|
||||
|
||||
layout->addWidget(proxy);
|
||||
@@ -92,14 +92,17 @@ TaskLinearPatternParameters::TaskLinearPatternParameters(TaskMultiTransformParam
|
||||
|
||||
selectionMode = none;
|
||||
|
||||
blockUpdate = false; // Hack, sometimes it is NOT false although set to false in Transformed::Transformed()!!
|
||||
// Hack, sometimes it is NOT false although set to false in Transformed::Transformed()!!
|
||||
blockUpdate = false;
|
||||
setupUI();
|
||||
}
|
||||
|
||||
void TaskLinearPatternParameters::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, &TaskLinearPatternParameters::onButtonAddFeature);
|
||||
connect(ui->buttonRemoveFeature, &QToolButton::toggled,
|
||||
this, &TaskLinearPatternParameters::onButtonRemoveFeature);
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
@@ -109,27 +112,27 @@ void TaskLinearPatternParameters::connectSignals()
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
|
||||
connect(action, &QAction::triggered, this, &TaskLinearPatternParameters::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, &TaskLinearPatternParameters::indexesMoved);
|
||||
|
||||
updateViewTimer = new QTimer(this);
|
||||
updateViewTimer->setSingleShot(true);
|
||||
updateViewTimer->setInterval(getUpdateViewTimeout());
|
||||
connect(updateViewTimer, SIGNAL(timeout()),
|
||||
this, SLOT(onUpdateViewTimer()));
|
||||
connect(updateViewTimer, &QTimer::timeout,
|
||||
this, &TaskLinearPatternParameters::onUpdateViewTimer);
|
||||
|
||||
connect(ui->comboDirection, SIGNAL(activated(int)),
|
||||
this, SLOT(onDirectionChanged(int)));
|
||||
connect(ui->checkReverse, SIGNAL(toggled(bool)),
|
||||
this, SLOT(onCheckReverse(bool)));
|
||||
connect(ui->spinLength, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onLength(double)));
|
||||
connect(ui->spinOccurrences, SIGNAL(valueChanged(uint)),
|
||||
this, SLOT(onOccurrences(uint)));
|
||||
connect(ui->checkBoxUpdateView, SIGNAL(toggled(bool)),
|
||||
this, SLOT(onUpdateView(bool)));
|
||||
connect(ui->comboDirection, qOverload<int>(&QComboBox::activated),
|
||||
this, &TaskLinearPatternParameters::onDirectionChanged);
|
||||
connect(ui->checkReverse, &QCheckBox::toggled,
|
||||
this, &TaskLinearPatternParameters::onCheckReverse);
|
||||
connect(ui->spinLength, qOverload<double>(&Gui::QuantitySpinBox::valueChanged),
|
||||
this, &TaskLinearPatternParameters::onLength);
|
||||
connect(ui->spinOccurrences, &Gui::UIntSpinBox::unsignedChanged,
|
||||
this, &TaskLinearPatternParameters::onOccurrences);
|
||||
connect(ui->checkBoxUpdateView, &QCheckBox::toggled,
|
||||
this, &TaskLinearPatternParameters::onUpdateView);
|
||||
}
|
||||
|
||||
void TaskLinearPatternParameters::setupUI()
|
||||
|
||||
Reference in New Issue
Block a user