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:
@@ -54,6 +54,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <pcl/io/obj_io.h>
|
||||
#include <pcl/pcl_config.h>
|
||||
#include <pcl/surface/poisson.h>
|
||||
#include <pcl/common/common.h>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDir>
|
||||
@@ -87,6 +88,10 @@ ExportCloudsDialog::ExportCloudsDialog(QWidget *parent) :
|
||||
_ui->setupUi(this);
|
||||
|
||||
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();
|
||||
_ui->comboBox_upsamplingMethod->setItemData(1, 0, Qt::UserRole - 1); // disable DISTINCT_CLOUD
|
||||
@@ -660,6 +665,34 @@ void ExportCloudsDialog::restoreDefaults()
|
||||
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()
|
||||
{
|
||||
if(!_ui->checkBox_fromDepth->isChecked())
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-3009</y>
|
||||
<y>0</y>
|
||||
<width>778</width>
|
||||
<height>4697</height>
|
||||
</rect>
|
||||
|
||||
Reference in New Issue
Block a user