Part: fix -Wclazy-connect-by-name
This commit is contained in:
@@ -66,6 +66,8 @@ OffsetWidget::OffsetWidget(Part::Offset* offset, QWidget* parent)
|
||||
|
||||
d->offset = offset;
|
||||
d->ui.setupUi(this);
|
||||
setupConnections();
|
||||
|
||||
d->ui.spinOffset->setUnit(Base::Unit::Length);
|
||||
d->ui.spinOffset->setRange(-INT_MAX, INT_MAX);
|
||||
d->ui.spinOffset->setSingleStep(0.1);
|
||||
@@ -114,54 +116,72 @@ OffsetWidget::~OffsetWidget()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void OffsetWidget::setupConnections()
|
||||
{
|
||||
connect(d->ui.spinOffset, qOverload<double>(&Gui::QuantitySpinBox::valueChanged),
|
||||
this, &OffsetWidget::onSpinOffsetValueChanged);
|
||||
connect(d->ui.modeType, qOverload<int>(&QComboBox::activated),
|
||||
this, &OffsetWidget::onModeTypeActivated);
|
||||
connect(d->ui.joinType, qOverload<int>(&QComboBox::activated),
|
||||
this, &OffsetWidget::onJoinTypeActivated);
|
||||
connect(d->ui.intersection, &QCheckBox::toggled,
|
||||
this, &OffsetWidget::onIntersectionToggled);
|
||||
connect(d->ui.selfIntersection, &QCheckBox::toggled,
|
||||
this, &OffsetWidget::onSelfIntersectionToggled);
|
||||
connect(d->ui.fillOffset, &QCheckBox::toggled,
|
||||
this, &OffsetWidget::onFillOffsetToggled);
|
||||
connect(d->ui.updateView, &QCheckBox::toggled,
|
||||
this, &OffsetWidget::onUpdateViewToggled);
|
||||
}
|
||||
|
||||
Part::Offset* OffsetWidget::getObject() const
|
||||
{
|
||||
return d->offset;
|
||||
}
|
||||
|
||||
void OffsetWidget::on_spinOffset_valueChanged(double val)
|
||||
void OffsetWidget::onSpinOffsetValueChanged(double val)
|
||||
{
|
||||
d->offset->Value.setValue(val);
|
||||
if (d->ui.updateView->isChecked())
|
||||
d->offset->getDocument()->recomputeFeature(d->offset);
|
||||
}
|
||||
|
||||
void OffsetWidget::on_modeType_activated(int val)
|
||||
void OffsetWidget::onModeTypeActivated(int val)
|
||||
{
|
||||
d->offset->Mode.setValue(val);
|
||||
if (d->ui.updateView->isChecked())
|
||||
d->offset->getDocument()->recomputeFeature(d->offset);
|
||||
}
|
||||
|
||||
void OffsetWidget::on_joinType_activated(int val)
|
||||
void OffsetWidget::onJoinTypeActivated(int val)
|
||||
{
|
||||
d->offset->Join.setValue((long)val);
|
||||
if (d->ui.updateView->isChecked())
|
||||
d->offset->getDocument()->recomputeFeature(d->offset);
|
||||
}
|
||||
|
||||
void OffsetWidget::on_intersection_toggled(bool on)
|
||||
void OffsetWidget::onIntersectionToggled(bool on)
|
||||
{
|
||||
d->offset->Intersection.setValue(on);
|
||||
if (d->ui.updateView->isChecked())
|
||||
d->offset->getDocument()->recomputeFeature(d->offset);
|
||||
}
|
||||
|
||||
void OffsetWidget::on_selfIntersection_toggled(bool on)
|
||||
void OffsetWidget::onSelfIntersectionToggled(bool on)
|
||||
{
|
||||
d->offset->SelfIntersection.setValue(on);
|
||||
if (d->ui.updateView->isChecked())
|
||||
d->offset->getDocument()->recomputeFeature(d->offset);
|
||||
}
|
||||
|
||||
void OffsetWidget::on_fillOffset_toggled(bool on)
|
||||
void OffsetWidget::onFillOffsetToggled(bool on)
|
||||
{
|
||||
d->offset->Fill.setValue(on);
|
||||
if (d->ui.updateView->isChecked())
|
||||
d->offset->getDocument()->recomputeFeature(d->offset);
|
||||
}
|
||||
|
||||
void OffsetWidget::on_updateView_toggled(bool on)
|
||||
void OffsetWidget::onUpdateViewToggled(bool on)
|
||||
{
|
||||
if (on) {
|
||||
d->offset->getDocument()->recomputeFeature(d->offset);
|
||||
|
||||
Reference in New Issue
Block a user