Added reset settings for calibration dialog

This commit is contained in:
matlabbe
2016-02-18 14:12:12 -05:00
parent 6b8ab84ba0
commit 829b52db7c
5 changed files with 13 additions and 3 deletions

View File

@@ -130,11 +130,11 @@ bool CameraImages::init(const std::string & calibrationFolder, const std::string
UDEBUG(""); UDEBUG("");
if(_dir) if(_dir)
{ {
_dir->setPath(_path, "jpg ppm png bmp pnm tiff"); _dir->setPath(_path, "jpg ppm png bmp pnm tiff pgm");
} }
else else
{ {
_dir = new UDirectory(_path, "jpg ppm png bmp pnm tiff"); _dir = new UDirectory(_path, "jpg ppm png bmp pnm tiff pgm");
} }
if(_path[_path.size()-1] != '\\' && _path[_path.size()-1] != '/') if(_path[_path.size()-1] != '\\' && _path[_path.size()-1] != '/')
{ {

View File

@@ -208,7 +208,7 @@ bool importPoses(
{ {
// timestamp,lat,lon,alt,x,y,z,roll,pitch,yaw // timestamp,lat,lon,alt,x,y,z,roll,pitch,yaw
// stamp is 1252400096825289728, transform to 125240009.6825289728 // stamp is 1252400096825289728, transform to 1252400096.825289728
double stamp = uStr2Double(strList[0].insert(10, 1, '.')); double stamp = uStr2Double(strList[0].insert(10, 1, '.'));
double x = uStr2Double(strList[4]); double x = uStr2Double(strList[4]);
double y = uStr2Double(strList[5]); double y = uStr2Double(strList[5]);

View File

@@ -58,6 +58,7 @@ public:
void saveSettings(QSettings & settings, const QString & group = "") const; void saveSettings(QSettings & settings, const QString & group = "") const;
void loadSettings(QSettings & settings, const QString & group = ""); void loadSettings(QSettings & settings, const QString & group = "");
void resetSettings();
void setSwitchedImages(bool switched); void setSwitchedImages(bool switched);
void setStereoMode(bool stereo); void setStereoMode(bool stereo);

View File

@@ -139,6 +139,13 @@ void CalibrationDialog::loadSettings(QSettings & settings, const QString & group
} }
} }
void CalibrationDialog::resetSettings()
{
this->setBoardWidth(8);
this->setBoardHeight(6);
this->setSquareSize(0.033);
}
void CalibrationDialog::setSwitchedImages(bool switched) void CalibrationDialog::setSwitchedImages(bool switched)
{ {
ui_->checkBox_switchImages->setChecked(switched); ui_->checkBox_switchImages->setChecked(switched);

View File

@@ -1753,6 +1753,8 @@ void PreferencesDialog::resetConfig()
(button == QMessageBox::Save && saveConfigTo())) (button == QMessageBox::Save && saveConfigTo()))
{ {
this->resetSettings(-1); this->resetSettings(-1);
_calibrationDialog->resetSettings();
} }
} }