mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-10 11:39:49 +08:00
Added "Restaure defaults" buttons to ExportClouds and PostProcessing dialogs
This commit is contained in:
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "ExportCloudsDialog.h"
|
#include "ExportCloudsDialog.h"
|
||||||
#include "ui_exportCloudsDialog.h"
|
#include "ui_exportCloudsDialog.h"
|
||||||
|
|
||||||
#include <QtGui/QFileDialog>
|
#include <QtGui/QPushButton>
|
||||||
|
|
||||||
namespace rtabmap {
|
namespace rtabmap {
|
||||||
|
|
||||||
@@ -37,6 +37,8 @@ ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
_ui = new Ui_ExportCloudsDialog();
|
_ui = new Ui_ExportCloudsDialog();
|
||||||
_ui->setupUi(this);
|
_ui->setupUi(this);
|
||||||
|
|
||||||
|
connect(_ui->buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()), this, SLOT(restoreDefaults()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportCloudsDialog::~ExportCloudsDialog()
|
ExportCloudsDialog::~ExportCloudsDialog()
|
||||||
@@ -44,15 +46,36 @@ ExportCloudsDialog::~ExportCloudsDialog()
|
|||||||
delete _ui;
|
delete _ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExportCloudsDialog::restoreDefaults()
|
||||||
|
{
|
||||||
|
setAssemble(true);
|
||||||
|
setAssembleVoxel(0.005);
|
||||||
|
if(_ui->groupBox_regenerate->isEnabled())
|
||||||
|
{
|
||||||
|
setGenerate(true);
|
||||||
|
}
|
||||||
|
setGenerateDecimation(1);
|
||||||
|
setGenerateVoxel(0.005);
|
||||||
|
setGenerateMaxDepth(4);
|
||||||
|
setBinaryFile(true);
|
||||||
|
setMLS(false);
|
||||||
|
setMLSRadius(0.04);
|
||||||
|
setMesh(false);
|
||||||
|
setMeshNormalKSearch(20);
|
||||||
|
setMeshGp3Radius(0.04);
|
||||||
|
}
|
||||||
|
|
||||||
void ExportCloudsDialog::setSaveButton()
|
void ExportCloudsDialog::setSaveButton()
|
||||||
{
|
{
|
||||||
_ui->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Save);
|
_ui->buttonBox->button(QDialogButtonBox::Ok)->setVisible(false);
|
||||||
|
_ui->buttonBox->button(QDialogButtonBox::Save)->setVisible(true);
|
||||||
_ui->checkBox_binary->setVisible(true);
|
_ui->checkBox_binary->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportCloudsDialog::setOkButton()
|
void ExportCloudsDialog::setOkButton()
|
||||||
{
|
{
|
||||||
_ui->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
_ui->buttonBox->button(QDialogButtonBox::Ok)->setVisible(true);
|
||||||
|
_ui->buttonBox->button(QDialogButtonBox::Save)->setVisible(false);
|
||||||
_ui->checkBox_binary->setVisible(false);
|
_ui->checkBox_binary->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <QtGui/QDialog>
|
#include <QtGui/QDialog>
|
||||||
|
|
||||||
class Ui_ExportCloudsDialog;
|
class Ui_ExportCloudsDialog;
|
||||||
|
class QAbstractButton;
|
||||||
|
|
||||||
namespace rtabmap {
|
namespace rtabmap {
|
||||||
|
|
||||||
@@ -75,6 +76,9 @@ public:
|
|||||||
void setMeshNormalKSearch(int k);
|
void setMeshNormalKSearch(int k);
|
||||||
void setMeshGp3Radius(double radius);
|
void setMeshGp3Radius(double radius);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void restoreDefaults();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_ExportCloudsDialog * _ui;
|
Ui_ExportCloudsDialog * _ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ PostProcessingDialog::PostProcessingDialog(QWidget * parent) :
|
|||||||
connect(_ui->detectMoreLoopClosures, SIGNAL(clicked(bool)), this, SLOT(updateButtonBox()));
|
connect(_ui->detectMoreLoopClosures, SIGNAL(clicked(bool)), this, SLOT(updateButtonBox()));
|
||||||
connect(_ui->refineNeighborLinks, SIGNAL(stateChanged(int)), this, SLOT(updateButtonBox()));
|
connect(_ui->refineNeighborLinks, SIGNAL(stateChanged(int)), this, SLOT(updateButtonBox()));
|
||||||
connect(_ui->refineLoopClosureLinks, SIGNAL(stateChanged(int)), this, SLOT(updateButtonBox()));
|
connect(_ui->refineLoopClosureLinks, SIGNAL(stateChanged(int)), this, SLOT(updateButtonBox()));
|
||||||
|
connect(_ui->buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()), this, SLOT(restoreDefaults()));
|
||||||
}
|
}
|
||||||
|
|
||||||
PostProcessingDialog::~PostProcessingDialog()
|
PostProcessingDialog::~PostProcessingDialog()
|
||||||
@@ -48,6 +49,17 @@ PostProcessingDialog::~PostProcessingDialog()
|
|||||||
delete _ui;
|
delete _ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PostProcessingDialog::restoreDefaults()
|
||||||
|
{
|
||||||
|
setDetectMoreLoopClosures(true);
|
||||||
|
setClusterRadius(0.3);
|
||||||
|
setClusterAngle(30);
|
||||||
|
setIterations(1);
|
||||||
|
setReextractFeatures(false);
|
||||||
|
setRefineNeighborLinks(false);
|
||||||
|
setRefineLoopClosureLinks(false);
|
||||||
|
}
|
||||||
|
|
||||||
void PostProcessingDialog::updateButtonBox()
|
void PostProcessingDialog::updateButtonBox()
|
||||||
{
|
{
|
||||||
_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
|
_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <QtGui/QDialog>
|
#include <QtGui/QDialog>
|
||||||
|
|
||||||
class Ui_PostProcessingDialog;
|
class Ui_PostProcessingDialog;
|
||||||
|
class QAbstractButton;
|
||||||
|
|
||||||
namespace rtabmap {
|
namespace rtabmap {
|
||||||
|
|
||||||
@@ -61,9 +62,13 @@ public:
|
|||||||
void setRefineNeighborLinks(bool on);
|
void setRefineNeighborLinks(bool on);
|
||||||
void setRefineLoopClosureLinks(bool on);
|
void setRefineLoopClosureLinks(bool on);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void restoreDefaults();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateButtonBox();
|
void updateButtonBox();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_PostProcessingDialog * _ui;
|
Ui_PostProcessingDialog * _ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ Guidelines: 4 times the voxel size, 0.025 for voxel=0.</string>
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -206,7 +206,7 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user