Multi component view (#1729)

* Multi component view implemented except for rotations. Rotations can cause segfaults.

* Implemented: handling rotations and applied rotations on optimized poses. Addition of a notion of main component (for saves in db) abd a node selection tool.

* New feature: merge component using selected nodes

* Refactored with suggestions.

* Fixing QSet error on older Qt versions

---------

Co-authored-by: matlabbe <[email protected]>
This commit is contained in:
Pierre ELIS
2026-08-01 08:33:53 -07:00
committed by GitHub
co-authored by matlabbe
parent d9f3337f97
commit bef4eaf679
11 changed files with 1525 additions and 441 deletions
+17
View File
@@ -47,6 +47,7 @@ ExportDialog::ExportDialog(QWidget * parent) :
connect(_ui->spinBox_ignored, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->doubleSpinBox_framerate, SIGNAL(valueChanged(double)), this, SIGNAL(configChanged()));
connect(_ui->spinBox_session, SIGNAL(valueChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->checkBox_selected_nodes, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->checkBox_rgb, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->checkBox_depth, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
connect(_ui->checkBox_depth2d, SIGNAL(stateChanged(int)), this, SIGNAL(configChanged()));
@@ -70,6 +71,8 @@ void ExportDialog::saveSettings(QSettings & settings, const QString & group) con
settings.setValue("framesIgnored", this->framesIgnored());
settings.setValue("targetFramerate", this->targetFramerate());
settings.setValue("sessionExported", this->sessionExported());
settings.setValue("currentComponentOnly", this->currentComponentOnly());
settings.setValue("selectedNodesOnly", this->selectedNodesOnly());
settings.setValue("rgbExported", this->isRgbExported());
settings.setValue("depthExported", this->isDepthExported());
settings.setValue("depth2dExported", this->isDepth2dExported());
@@ -90,6 +93,8 @@ void ExportDialog::loadSettings(QSettings & settings, const QString & group)
_ui->spinBox_ignored->setValue(settings.value("framesIgnored", this->framesIgnored()).toInt());
_ui->doubleSpinBox_framerate->setValue(settings.value("targetFramerate", this->targetFramerate()).toDouble());
_ui->spinBox_session->setValue(settings.value("sessionExported", this->sessionExported()).toInt());
_ui->checkBox_current_component->setChecked(settings.value("currentComponentOnly", this->currentComponentOnly()).toBool());
_ui->checkBox_selected_nodes->setChecked(settings.value("selectedNodesOnly", this->selectedNodesOnly()).toBool());
_ui->checkBox_rgb->setChecked(settings.value("rgbExported", this->isRgbExported()).toBool());
_ui->checkBox_depth->setChecked(settings.value("depthExported", this->isDepthExported()).toBool());
_ui->checkBox_depth2d->setChecked(settings.value("depth2dExported", this->isDepth2dExported()).toBool());
@@ -106,6 +111,8 @@ void ExportDialog::restoreDefaults()
_ui->spinBox_ignored->setValue(0);
_ui->doubleSpinBox_framerate->setValue(0);
_ui->spinBox_session->setValue(-1);
_ui->checkBox_current_component->setChecked(false);
_ui->checkBox_selected_nodes->setChecked(false);
_ui->checkBox_rgb->setChecked(true);
_ui->checkBox_depth->setChecked(true);
_ui->checkBox_depth2d->setChecked(true);
@@ -142,6 +149,16 @@ int ExportDialog::sessionExported() const
return _ui->spinBox_session->value();
}
bool ExportDialog::currentComponentOnly() const
{
return _ui->checkBox_current_component->isChecked();
}
bool ExportDialog::selectedNodesOnly() const
{
return _ui->checkBox_selected_nodes->isChecked();
}
bool ExportDialog::isRgbExported() const
{
return _ui->checkBox_rgb->isChecked();