Mesh: fix -Wclazy-connect-by-name

This commit is contained in:
wmayer
2023-03-31 17:12:02 +02:00
committed by wwmayer
parent 1c5ea5f278
commit 11c628feeb
12 changed files with 162 additions and 83 deletions

View File

@@ -34,6 +34,7 @@ Selection::Selection(QWidget* parent)
: QWidget(parent), ui(new Ui_Selection())
{
ui->setupUi(this);
setupConnections();
ui->addSelection->installEventFilter(this);
ui->clearSelection->installEventFilter(this);
@@ -53,6 +54,18 @@ Selection::~Selection()
meshSel.setEnabledViewerSelection(true);
}
void Selection::setupConnections()
{
connect(ui->addSelection, &QPushButton::clicked,
this, &Selection::onAddSelectionClicked);
connect(ui->clearSelection, &QPushButton::clicked,
this, &Selection::onClearSelectionClicked);
connect(ui->visibleTriangles, &QPushButton::clicked,
this, &Selection::onVisibleTrianglesToggled);
connect(ui->screenTriangles, &QPushButton::clicked,
this, &Selection::onScreenTrianglesToggled);
}
void Selection::setObjects(const std::vector<Gui::SelectionObject>& o)
{
meshSel.setObjects(o);
@@ -85,22 +98,22 @@ bool Selection::eventFilter(QObject* o, QEvent* e)
return false;
}
void Selection::on_addSelection_clicked()
void Selection::onAddSelectionClicked()
{
meshSel.startSelection();
}
void Selection::on_clearSelection_clicked()
void Selection::onClearSelectionClicked()
{
meshSel.clearSelection();
}
void Selection::on_visibleTriangles_toggled(bool on)
void Selection::onVisibleTrianglesToggled(bool on)
{
meshSel.setCheckOnlyVisibleTriangles(on);
}
void Selection::on_screenTriangles_toggled(bool on)
void Selection::onScreenTrianglesToggled(bool on)
{
meshSel.setCheckOnlyPointToUserTriangles(on);
}