RE: fix -Wclazy-connect-by-name
This commit is contained in:
@@ -63,6 +63,8 @@ FitBSplineSurfaceWidget::FitBSplineSurfaceWidget(const App::DocumentObjectT& obj
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
d->ui.setupUi(this);
|
||||
connect(d->ui.makePlacement, &QPushButton::clicked,
|
||||
this, &FitBSplineSurfaceWidget::onMakePlacementClicked);
|
||||
d->obj = obj;
|
||||
restoreSettings();
|
||||
}
|
||||
@@ -103,7 +105,7 @@ void FitBSplineSurfaceWidget::saveSettings()
|
||||
d->ui.uvdir->onSave();
|
||||
}
|
||||
|
||||
void FitBSplineSurfaceWidget::on_makePlacement_clicked()
|
||||
void FitBSplineSurfaceWidget::onMakePlacementClicked()
|
||||
{
|
||||
try {
|
||||
App::GeoFeature* geo = d->obj.getObjectAs<App::GeoFeature>();
|
||||
|
||||
@@ -44,8 +44,8 @@ private:
|
||||
void saveSettings();
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_makePlacement_clicked();
|
||||
private:
|
||||
void onMakePlacementClicked();
|
||||
|
||||
private:
|
||||
class Private;
|
||||
|
||||
@@ -46,6 +46,7 @@ SegmentationManual::SegmentationManual(QWidget* parent, Qt::WindowFlags fl)
|
||||
, ui(new Ui_SegmentationManual)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setupConnections();
|
||||
ui->spSelectComp->setRange(1, INT_MAX);
|
||||
ui->spSelectComp->setValue(10);
|
||||
|
||||
@@ -59,6 +60,32 @@ SegmentationManual::~SegmentationManual()
|
||||
{
|
||||
}
|
||||
|
||||
void SegmentationManual::setupConnections()
|
||||
{
|
||||
connect(ui->selectRegion, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onSelectRegionClicked);
|
||||
connect(ui->selectAll, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onSelectAllClicked);
|
||||
connect(ui->selectComponents, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onSelectComponentsClicked);
|
||||
connect(ui->selectTriangle, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onSelectTriangleClicked);
|
||||
connect(ui->deselectAll, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onDeselectAllClicked);
|
||||
connect(ui->visibleTriangles, &QCheckBox::toggled,
|
||||
this, &SegmentationManual::onVisibleTrianglesToggled);
|
||||
connect(ui->screenTriangles, &QCheckBox::toggled,
|
||||
this, &SegmentationManual::onScreenTrianglesToggled);
|
||||
connect(ui->cbSelectComp, &QCheckBox::toggled,
|
||||
this, &SegmentationManual::onSelectCompToggled);
|
||||
connect(ui->planeDetect, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onPlaneDetectClicked);
|
||||
connect(ui->cylinderDetect, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onCylinderDetectClicked);
|
||||
connect(ui->sphereDetect, &QPushButton::clicked,
|
||||
this, &SegmentationManual::onSphereDetectClicked);
|
||||
}
|
||||
|
||||
void SegmentationManual::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
@@ -67,41 +94,41 @@ void SegmentationManual::changeEvent(QEvent *e)
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
|
||||
void SegmentationManual::on_selectRegion_clicked()
|
||||
void SegmentationManual::onSelectRegionClicked()
|
||||
{
|
||||
meshSel.startSelection();
|
||||
}
|
||||
|
||||
void SegmentationManual::on_selectAll_clicked()
|
||||
void SegmentationManual::onSelectAllClicked()
|
||||
{
|
||||
// select the complete meshes
|
||||
meshSel.fullSelection();
|
||||
}
|
||||
|
||||
void SegmentationManual::on_deselectAll_clicked()
|
||||
void SegmentationManual::onDeselectAllClicked()
|
||||
{
|
||||
// deselect all meshes
|
||||
meshSel.clearSelection();
|
||||
}
|
||||
|
||||
void SegmentationManual::on_selectComponents_clicked()
|
||||
void SegmentationManual::onSelectComponentsClicked()
|
||||
{
|
||||
// select components up to a certain size
|
||||
int size = ui->spSelectComp->value();
|
||||
meshSel.selectComponent(size);
|
||||
}
|
||||
|
||||
void SegmentationManual::on_visibleTriangles_toggled(bool on)
|
||||
void SegmentationManual::onVisibleTrianglesToggled(bool on)
|
||||
{
|
||||
meshSel.setCheckOnlyVisibleTriangles(on);
|
||||
}
|
||||
|
||||
void SegmentationManual::on_screenTriangles_toggled(bool on)
|
||||
void SegmentationManual::onScreenTrianglesToggled(bool on)
|
||||
{
|
||||
meshSel.setCheckOnlyPointToUserTriangles(on);
|
||||
}
|
||||
|
||||
void SegmentationManual::on_cbSelectComp_toggled(bool on)
|
||||
void SegmentationManual::onSelectCompToggled(bool on)
|
||||
{
|
||||
meshSel.setAddComponentOnClick(on);
|
||||
}
|
||||
@@ -157,7 +184,7 @@ static void findGeometry(int minFaces, double tolerance,
|
||||
}
|
||||
};
|
||||
|
||||
void SegmentationManual::on_planeDetect_clicked()
|
||||
void SegmentationManual::onPlaneDetectClicked()
|
||||
{
|
||||
auto func = [=](const std::vector<Base::Vector3f>& points,
|
||||
const std::vector<Base::Vector3f>& normal) -> MeshCore::AbstractSurfaceFit* {
|
||||
@@ -176,7 +203,7 @@ void SegmentationManual::on_planeDetect_clicked()
|
||||
Private::findGeometry(ui->numPln->value(), ui->tolPln->value(), func);
|
||||
}
|
||||
|
||||
void SegmentationManual::on_cylinderDetect_clicked()
|
||||
void SegmentationManual::onCylinderDetectClicked()
|
||||
{
|
||||
auto func = [=](const std::vector<Base::Vector3f>& points,
|
||||
const std::vector<Base::Vector3f>& normal) -> MeshCore::AbstractSurfaceFit* {
|
||||
@@ -201,7 +228,7 @@ void SegmentationManual::on_cylinderDetect_clicked()
|
||||
Private::findGeometry(ui->numCyl->value(), ui->tolCyl->value(), func);
|
||||
}
|
||||
|
||||
void SegmentationManual::on_sphereDetect_clicked()
|
||||
void SegmentationManual::onSphereDetectClicked()
|
||||
{
|
||||
auto func = [=](const std::vector<Base::Vector3f>& points,
|
||||
const std::vector<Base::Vector3f>& normal) -> MeshCore::AbstractSurfaceFit* {
|
||||
@@ -269,7 +296,7 @@ void SegmentationManual::createSegment()
|
||||
meshSel.clearSelection();
|
||||
}
|
||||
|
||||
void SegmentationManual::on_selectTriangle_clicked()
|
||||
void SegmentationManual::onSelectTriangleClicked()
|
||||
{
|
||||
meshSel.selectTriangle();
|
||||
meshSel.setAddComponentOnClick(ui->cbSelectComp->isChecked());
|
||||
|
||||
@@ -50,18 +50,19 @@ public:
|
||||
void reject();
|
||||
void createSegment();
|
||||
|
||||
public Q_SLOTS:
|
||||
void on_selectRegion_clicked();
|
||||
void on_selectAll_clicked();
|
||||
void on_selectComponents_clicked();
|
||||
void on_selectTriangle_clicked();
|
||||
void on_deselectAll_clicked();
|
||||
void on_visibleTriangles_toggled(bool);
|
||||
void on_screenTriangles_toggled(bool);
|
||||
void on_cbSelectComp_toggled(bool);
|
||||
void on_planeDetect_clicked();
|
||||
void on_cylinderDetect_clicked();
|
||||
void on_sphereDetect_clicked();
|
||||
public:
|
||||
void setupConnections();
|
||||
void onSelectRegionClicked();
|
||||
void onSelectAllClicked();
|
||||
void onSelectComponentsClicked();
|
||||
void onSelectTriangleClicked();
|
||||
void onDeselectAllClicked();
|
||||
void onVisibleTrianglesToggled(bool);
|
||||
void onScreenTrianglesToggled(bool);
|
||||
void onSelectCompToggled(bool);
|
||||
void onPlaneDetectClicked();
|
||||
void onCylinderDetectClicked();
|
||||
void onSphereDetectClicked();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
Reference in New Issue
Block a user