Sketcher: move to new style connect()
This commit is contained in:
@@ -140,11 +140,13 @@ void EditDatumDialog::exec(bool atCursor)
|
||||
|
||||
ui_ins_datum->cbDriving->setChecked(! Constr->isDriving);
|
||||
|
||||
connect(ui_ins_datum->cbDriving, SIGNAL(toggled(bool)), this, SLOT(drivingToggled(bool)));
|
||||
connect(ui_ins_datum->labelEdit, SIGNAL(valueChanged(const Base::Quantity&)), this, SLOT(datumChanged()));
|
||||
connect(ui_ins_datum->labelEdit, SIGNAL(showFormulaDialog(bool)), this, SLOT(formEditorOpened(bool)));
|
||||
connect(&dlg, SIGNAL(accepted()), this, SLOT(accepted()));
|
||||
connect(&dlg, SIGNAL(rejected()), this, SLOT(rejected()));
|
||||
connect(ui_ins_datum->cbDriving, &QCheckBox::toggled, this, &EditDatumDialog::drivingToggled);
|
||||
connect(ui_ins_datum->labelEdit, qOverload<const Base::Quantity&>(&Gui::QuantitySpinBox::valueChanged),
|
||||
this, &EditDatumDialog::datumChanged);
|
||||
connect(ui_ins_datum->labelEdit, &Gui::QuantitySpinBox::showFormulaDialog,
|
||||
this, &EditDatumDialog::formEditorOpened);
|
||||
connect(&dlg, &QDialog::accepted, this, &EditDatumDialog::accepted);
|
||||
connect(&dlg, &QDialog::rejected, this, &EditDatumDialog::rejected);
|
||||
|
||||
if (atCursor) {
|
||||
dlg.show(); // Need to show the dialog so geometry is computed
|
||||
|
||||
@@ -41,10 +41,10 @@ SketchOrientationDialog::SketchOrientationDialog()
|
||||
ui->setupUi(this);
|
||||
onPreview();
|
||||
|
||||
connect(ui->Reverse_checkBox, SIGNAL(clicked(bool)), this, SLOT(onPreview()));
|
||||
connect(ui->XY_radioButton , SIGNAL(clicked(bool)), this, SLOT(onPreview()));
|
||||
connect(ui->XZ_radioButton , SIGNAL(clicked(bool)), this, SLOT(onPreview()));
|
||||
connect(ui->YZ_radioButton , SIGNAL(clicked(bool)), this, SLOT(onPreview()));
|
||||
connect(ui->Reverse_checkBox, &QCheckBox::clicked, this, &SketchOrientationDialog::onPreview);
|
||||
connect(ui->XY_radioButton , &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
|
||||
connect(ui->XZ_radioButton , &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
|
||||
connect(ui->YZ_radioButton , &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
|
||||
}
|
||||
|
||||
SketchOrientationDialog::~SketchOrientationDialog()
|
||||
|
||||
@@ -131,7 +131,7 @@ SketcherSettingsDisplay::SketcherSettingsDisplay(QWidget* parent)
|
||||
ui->comboBox->addItem(QIcon(px), QString(), QVariant(it->second));
|
||||
}
|
||||
|
||||
connect(ui->btnTVApply, SIGNAL(clicked(bool)), this, SLOT(onBtnTVApplyClicked(bool)));
|
||||
connect(ui->btnTVApply, &QPushButton::clicked, this, &SketcherSettingsDisplay::onBtnTVApplyClicked);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -257,8 +257,8 @@ ElementView::ElementView(QWidget *parent) : QListWidget(parent)
|
||||
setItemDelegate(elementItemDelegate);
|
||||
|
||||
QObject::connect(
|
||||
elementItemDelegate, SIGNAL(itemHovered(QModelIndex)),
|
||||
this, SLOT(onIndexHovered(QModelIndex))
|
||||
elementItemDelegate, &ElementItemDelegate::itemHovered,
|
||||
this, &ElementView::onIndexHovered
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -207,33 +207,33 @@ TaskSketcherGeneral::TaskSketcherGeneral(ViewProviderSketch *sketchView)
|
||||
|
||||
// connecting the needed signals
|
||||
QObject::connect(
|
||||
widget, SIGNAL(emitToggleGridView(bool)),
|
||||
this , SLOT (onToggleGridView(bool))
|
||||
widget, &SketcherGeneralWidget::emitToggleGridView,
|
||||
this , &TaskSketcherGeneral::onToggleGridView
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
widget, SIGNAL(emitToggleGridSnap(bool)),
|
||||
this , SLOT (onToggleGridSnap(bool))
|
||||
widget, &SketcherGeneralWidget::emitToggleGridSnap,
|
||||
this , &TaskSketcherGeneral::onToggleGridSnap
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
widget, SIGNAL(emitSetGridSize(double)),
|
||||
this , SLOT (onSetGridSize(double))
|
||||
widget, &SketcherGeneralWidget::emitSetGridSize,
|
||||
this , &TaskSketcherGeneral::onSetGridSize
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
widget, SIGNAL(emitToggleAutoconstraints(bool)),
|
||||
this , SLOT (onToggleAutoconstraints(bool))
|
||||
widget, &SketcherGeneralWidget::emitToggleAutoconstraints,
|
||||
this , &TaskSketcherGeneral::onToggleAutoconstraints
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
widget, SIGNAL(emitToggleAvoidRedundant(bool)),
|
||||
this , SLOT (onToggleAvoidRedundant(bool))
|
||||
widget, &SketcherGeneralWidget::emitToggleAvoidRedundant,
|
||||
this , &TaskSketcherGeneral::onToggleAvoidRedundant
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
widget, SIGNAL(emitRenderOrderChanged()),
|
||||
this , SLOT (onRenderOrderChanged())
|
||||
widget, &SketcherGeneralWidget::emitRenderOrderChanged,
|
||||
this , &TaskSketcherGeneral::onRenderOrderChanged
|
||||
);
|
||||
|
||||
Gui::Selection().Attach(this);
|
||||
|
||||
Reference in New Issue
Block a user