mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Export: Added load and save settings buttons (#274)
This commit is contained in:
@@ -94,6 +94,8 @@ public slots:
|
|||||||
void restoreDefaults();
|
void restoreDefaults();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void loadSettings();
|
||||||
|
void saveSettings();
|
||||||
void updateReconstructionFlavor();
|
void updateReconstructionFlavor();
|
||||||
void selectDistortionModel();
|
void selectDistortionModel();
|
||||||
void updateMLSGrpVisibility();
|
void updateMLSGrpVisibility();
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <pcl/io/obj_io.h>
|
#include <pcl/io/obj_io.h>
|
||||||
#include <pcl/pcl_config.h>
|
#include <pcl/pcl_config.h>
|
||||||
#include <pcl/surface/poisson.h>
|
#include <pcl/surface/poisson.h>
|
||||||
|
#include <pcl/common/common.h>
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -87,6 +88,10 @@ ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
|
|||||||
_ui->setupUi(this);
|
_ui->setupUi(this);
|
||||||
|
|
||||||
connect(_ui->buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()), this, SLOT(restoreDefaults()));
|
connect(_ui->buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()), this, SLOT(restoreDefaults()));
|
||||||
|
QPushButton * loadSettingsButton = _ui->buttonBox->addButton("Load Settings", QDialogButtonBox::ActionRole);
|
||||||
|
QPushButton * saveSettingsButton = _ui->buttonBox->addButton("Save Settings", QDialogButtonBox::ActionRole);
|
||||||
|
connect(loadSettingsButton, SIGNAL(clicked()), this, SLOT(loadSettings()));
|
||||||
|
connect(saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings()));
|
||||||
|
|
||||||
restoreDefaults();
|
restoreDefaults();
|
||||||
_ui->comboBox_upsamplingMethod->setItemData(1, 0, Qt::UserRole - 1); // disable DISTINCT_CLOUD
|
_ui->comboBox_upsamplingMethod->setItemData(1, 0, Qt::UserRole - 1); // disable DISTINCT_CLOUD
|
||||||
@@ -660,6 +665,34 @@ void ExportCloudsDialog::restoreDefaults()
|
|||||||
this->update();
|
this->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExportCloudsDialog::loadSettings()
|
||||||
|
{
|
||||||
|
QString path = QFileDialog::getOpenFileName(this, tr("Load Settings"), _workingDirectory, tr("Config (*.ini)"));
|
||||||
|
if(path.size())
|
||||||
|
{
|
||||||
|
QSettings settings(path, QSettings::IniFormat);
|
||||||
|
settings.beginGroup("Gui");
|
||||||
|
settings.beginGroup(this->objectName());
|
||||||
|
this->loadSettings(settings);
|
||||||
|
settings.endGroup(); // "name"
|
||||||
|
settings.endGroup(); // Gui
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExportCloudsDialog::saveSettings()
|
||||||
|
{
|
||||||
|
QString path = QFileDialog::getSaveFileName(this, tr("Save Settings"), _workingDirectory, tr("Config (*.ini)"));
|
||||||
|
if(path.size())
|
||||||
|
{
|
||||||
|
QSettings settings(path, QSettings::IniFormat);
|
||||||
|
settings.beginGroup("Gui");
|
||||||
|
settings.beginGroup(this->objectName());
|
||||||
|
this->saveSettings(settings);
|
||||||
|
settings.endGroup(); // "name"
|
||||||
|
settings.endGroup(); // Gui
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ExportCloudsDialog::updateReconstructionFlavor()
|
void ExportCloudsDialog::updateReconstructionFlavor()
|
||||||
{
|
{
|
||||||
if(!_ui->checkBox_fromDepth->isChecked())
|
if(!_ui->checkBox_fromDepth->isChecked())
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-3009</y>
|
<y>0</y>
|
||||||
<width>778</width>
|
<width>778</width>
|
||||||
<height>4697</height>
|
<height>4697</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
|||||||
Reference in New Issue
Block a user