DBViewer: added "Restore default GUI settings" menu action

This commit is contained in:
matlabbe
2017-04-24 16:20:41 -04:00
parent 6e1dbbcf4f
commit 27313bc3d6
3 changed files with 66 additions and 18 deletions
@@ -79,6 +79,7 @@ protected:
private slots: private slots:
void writeSettings(); void writeSettings();
void restoreDefaultSettings();
void configModified(); void configModified();
void openDatabase(); void openDatabase();
void updateStatistics(); void updateStatistics();
+41
View File
@@ -191,6 +191,7 @@ DatabaseViewer::DatabaseViewer(const QString & ini, QWidget * parent) :
parameters.insert(*Parameters::getDefaultParameters().find(Parameters::kRGBDLoopClosureReextractFeatures())); parameters.insert(*Parameters::getDefaultParameters().find(Parameters::kRGBDLoopClosureReextractFeatures()));
ui_->parameters_toolbox->setupUi(parameters); ui_->parameters_toolbox->setupUi(parameters);
exportDialog_->setObjectName("ExportCloudsDialog"); exportDialog_->setObjectName("ExportCloudsDialog");
restoreDefaultSettings();
this->readSettings(); this->readSettings();
setupMainLayout(ui_->actionVertical_Layout->isChecked()); setupMainLayout(ui_->actionVertical_Layout->isChecked());
@@ -237,6 +238,7 @@ DatabaseViewer::DatabaseViewer(const QString & ini, QWidget * parent) :
connect(ui_->actionRegenerate_local_grid_maps, SIGNAL(triggered()), this, SLOT(regenerateLocalMaps())); connect(ui_->actionRegenerate_local_grid_maps, SIGNAL(triggered()), this, SLOT(regenerateLocalMaps()));
connect(ui_->actionRegenerate_local_grid_maps_selected, SIGNAL(triggered()), this, SLOT(regenerateCurrentLocalMaps())); connect(ui_->actionRegenerate_local_grid_maps_selected, SIGNAL(triggered()), this, SLOT(regenerateCurrentLocalMaps()));
connect(ui_->actionReset_all_changes, SIGNAL(triggered()), this, SLOT(resetAllChanges())); connect(ui_->actionReset_all_changes, SIGNAL(triggered()), this, SLOT(resetAllChanges()));
connect(ui_->actionRestore_default_GUI_settings, SIGNAL(triggered()), this, SLOT(restoreDefaultSettings()));
//ICP buttons //ICP buttons
connect(ui_->pushButton_refine, SIGNAL(clicked()), this, SLOT(refineConstraint())); connect(ui_->pushButton_refine, SIGNAL(clicked()), this, SLOT(refineConstraint()));
@@ -621,6 +623,45 @@ void DatabaseViewer::writeSettings()
this->setWindowModified(false); this->setWindowModified(false);
} }
void DatabaseViewer::restoreDefaultSettings()
{
// reset GUI parameters
ui_->comboBox_logger_level->setCurrentIndex(1);
ui_->checkBox_alignPosesWithGroundTruth->setChecked(true);
ui_->checkBox_spanAllMaps->setChecked(true);
ui_->checkBox_ignorePoseCorrection->setChecked(false);
ui_->checkBox_ignoreGlobalLoop->setChecked(false);
ui_->checkBox_ignoreLocalLoopSpace->setChecked(false);
ui_->checkBox_ignoreLocalLoopTime->setChecked(false);
ui_->checkBox_ignoreUserLoop->setChecked(false);
ui_->spinBox_optimizationDepth->setValue(0);
ui_->doubleSpinBox_gainCompensationRadius->setValue(0.0);
ui_->doubleSpinBox_gridCellSize->setValue(0.05);
ui_->groupBox_posefiltering->setChecked(false);
ui_->doubleSpinBox_posefilteringRadius->setValue(0.1);
ui_->doubleSpinBox_posefilteringAngle->setValue(30);
ui_->checkBox_gridErode->setChecked(false);
ui_->checkBox_octomap->setChecked(false);
ui_->checkBox_mesh_quad->setChecked(true);
ui_->spinBox_mesh_angleTolerance->setValue(15);
ui_->spinBox_mesh_minClusterSize->setValue(0);
ui_->spinBox_mesh_fillDepthHoles->setValue(false);
ui_->spinBox_mesh_depthError->setValue(10);
ui_->spinBox_mesh_triangleSize->setValue(2);
ui_->spinBox_icp_decimation->setValue(1);
ui_->doubleSpinBox_icp_maxDepth->setValue(0.0);
ui_->doubleSpinBox_icp_minDepth->setValue(0.0);
ui_->checkBox_icp_from_depth->setChecked(false);
ui_->doubleSpinBox_detectMore_radius->setValue(1.0);
ui_->doubleSpinBox_detectMore_angle->setValue(30.0);
ui_->spinBox_detectMore_iterations->setValue(5);
}
void DatabaseViewer::openDatabase() void DatabaseViewer::openDatabase()
{ {
QString path = QFileDialog::getOpenFileName(this, tr("Select file"), pathDatabase_, tr("Databases (*.db)")); QString path = QFileDialog::getOpenFileName(this, tr("Select file"), pathDatabase_, tr("Databases (*.db)"));
+24 -18
View File
@@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1392</width> <width>1465</width>
<height>965</height> <height>965</height>
</rect> </rect>
</property> </property>
@@ -52,8 +52,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>337</width> <width>353</width>
<height>208</height> <height>196</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1"> <layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
@@ -210,8 +210,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>337</width> <width>353</width>
<height>208</height> <height>196</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1"> <layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1">
@@ -483,8 +483,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1392</width> <width>1465</width>
<height>22</height> <height>25</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@@ -521,6 +521,7 @@
<addaction name="actionEdit_depth_image"/> <addaction name="actionEdit_depth_image"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionReset_all_changes"/> <addaction name="actionReset_all_changes"/>
<addaction name="actionRestore_default_GUI_settings"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionView_3D_map"/> <addaction name="actionView_3D_map"/>
<addaction name="actionView_3D_laser_scans"/> <addaction name="actionView_3D_laser_scans"/>
@@ -999,15 +1000,15 @@
<item> <item>
<widget class="QToolBox" name="toolBox"> <widget class="QToolBox" name="toolBox">
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="page_3"> <widget class="QWidget" name="page_3">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>324</width> <width>339</width>
<height>188</height> <height>186</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@@ -1142,8 +1143,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>280</width> <width>282</width>
<height>608</height> <height>569</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@@ -1179,7 +1180,7 @@
<number>3</number> <number>3</number>
</property> </property>
<property name="minimum"> <property name="minimum">
<double>0.010000000000000</double> <double>0.001000000000000</double>
</property> </property>
<property name="singleStep"> <property name="singleStep">
<double>0.010000000000000</double> <double>0.010000000000000</double>
@@ -1473,8 +1474,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>272</width> <width>205</width>
<height>126</height> <height>117</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@@ -1573,8 +1574,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>272</width> <width>184</width>
<height>288</height> <height>487</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@@ -2118,7 +2119,7 @@
</action> </action>
<action name="actionReset_all_changes"> <action name="actionReset_all_changes">
<property name="text"> <property name="text">
<string>Reset all changes</string> <string>Reset link and grid map changes</string>
</property> </property>
</action> </action>
<action name="actionGenerate_g2o_graph_g2o"> <action name="actionGenerate_g2o_graph_g2o">
@@ -2162,6 +2163,11 @@
<string>Vertical Layout</string> <string>Vertical Layout</string>
</property> </property>
</action> </action>
<action name="actionRestore_default_GUI_settings">
<property name="text">
<string>Restore default GUI settings</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>