[Gui] modernize some connect() settings

- addresses #6166
This commit is contained in:
Uwe
2023-01-12 02:01:35 +01:00
committed by wwmayer
parent 0410dc8f4d
commit 5ad737ccdc
17 changed files with 73 additions and 87 deletions

View File

@@ -45,16 +45,16 @@ SketcherGeneralWidget::SketcherGeneralWidget(QWidget *parent)
ui->renderingOrder->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
// connecting the needed signals
connect(ui->checkBoxShowGrid, SIGNAL(toggled(bool)),
this, SIGNAL(emitToggleGridView(bool)));
connect(ui->checkBoxGridSnap, SIGNAL(toggled(bool)),
this, SIGNAL(emitToggleGridSnap(bool)));
connect(ui->gridSize, SIGNAL(valueChanged(double)),
this, SIGNAL(emitSetGridSize(double)));
connect(ui->checkBoxAutoconstraints, SIGNAL(toggled(bool)),
this, SIGNAL(emitToggleAutoconstraints(bool)));
connect(ui->checkBoxRedundantAutoconstraints, SIGNAL(toggled(bool)),
this, SIGNAL(emitToggleAvoidRedundant(bool)));
connect(ui->checkBoxShowGrid, &Gui::PrefCheckBox::toggled,
this, &SketcherGeneralWidget::emitToggleGridView);
connect(ui->checkBoxGridSnap, &Gui::PrefCheckBox::toggled,
this, &SketcherGeneralWidget::emitToggleGridSnap);
connect(ui->gridSize, qOverload<double>(&Gui::PrefQuantitySpinBox::valueChanged),
this, &SketcherGeneralWidget::emitSetGridSize);
connect(ui->checkBoxAutoconstraints, &Gui::PrefCheckBox::toggled,
this, &SketcherGeneralWidget::emitToggleAutoconstraints);
connect(ui->checkBoxRedundantAutoconstraints,
&Gui::PrefCheckBox::toggled, this, &SketcherGeneralWidget::emitToggleAvoidRedundant);
ui->renderingOrder->installEventFilter(this);
}

View File

@@ -292,12 +292,11 @@ QtColorPicker::QtColorPicker(QWidget *parent,
// Create color grid popup and connect to it.
popup = new ColorPickerPopup(cols, withColorDialog, this);
connect(popup, SIGNAL(selected(const QColor &)),
SLOT(setCurrentColor(const QColor &)));
connect(popup, SIGNAL(hid()), SLOT(popupClosed()));
connect(popup, &ColorPickerPopup::selected, this, &QtColorPicker::setCurrentColor);
connect(popup, &ColorPickerPopup::hid, this, &QtColorPicker::popupClosed);
// Connect this push button's pressed() signal.
connect(this, SIGNAL(toggled(bool)), SLOT(buttonPressed(bool)));
connect(this, &QtColorPicker::toggled, this, &QtColorPicker::buttonPressed);
}
/*!