29 #include "ui_exportBundlerDialog.h" 31 #include <QFileDialog> 32 #include <QPushButton> 39 _ui =
new Ui_ExportBundlerDialog();
42 connect(
_ui->toolButton_path, SIGNAL(clicked()),
this, SLOT(
getPath()));
45 connect(
_ui->buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()),
this, SLOT(
restoreDefaults()));
47 connect(
_ui->doubleSpinBox_laplacianVariance, SIGNAL(valueChanged(
double)),
this, SIGNAL(
configChanged()));
48 connect(
_ui->doubleSpinBox_linearSpeed, SIGNAL(valueChanged(
double)),
this, SIGNAL(
configChanged()));
49 connect(
_ui->doubleSpinBox_angularSpeed, SIGNAL(valueChanged(
double)),
this, SIGNAL(
configChanged()));
51 _ui->lineEdit_path->setText(QDir::currentPath());
63 settings.beginGroup(group);
78 settings.beginGroup(group);
80 _ui->doubleSpinBox_linearSpeed->setValue(settings.value(
"maxLinearSpeed", this->maxLinearSpeed()).toDouble());
81 _ui->doubleSpinBox_angularSpeed->setValue(settings.value(
"maxAngularSpeed", this->maxAngularSpeed()).toDouble());
82 _ui->doubleSpinBox_laplacianVariance->setValue(settings.value(
"laplacianThr", this->laplacianThreshold()).toDouble());
91 _ui->lineEdit_path->setText((path.isEmpty()?QDir::currentPath():path) +
"/bundler");
96 _ui->doubleSpinBox_linearSpeed->setValue(0);
97 _ui->doubleSpinBox_angularSpeed->setValue(0);
98 _ui->doubleSpinBox_laplacianVariance->setValue(0);
103 QString path = QFileDialog::getExistingDirectory(
this, tr(
"Exporting cameras in Bundler format..."),
_ui->lineEdit_path->text());
106 _ui->lineEdit_path->setText(path);
112 return _ui->lineEdit_path->text();
117 return _ui->doubleSpinBox_linearSpeed->value();
121 return _ui->doubleSpinBox_angularSpeed->value();
125 return _ui->doubleSpinBox_laplacianVariance->value();
ExportBundlerDialog(QWidget *parent=0)
virtual ~ExportBundlerDialog()
void setWorkingDirectory(const QString &path)
double maxAngularSpeed() const
QString outputPath() const
double laplacianThreshold() const
void saveSettings(QSettings &settings, const QString &group="") const
double maxLinearSpeed() const
Ui_ExportBundlerDialog * _ui
void loadSettings(QSettings &settings, const QString &group="")