-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialog.cpp
58 lines (48 loc) · 1.52 KB
/
dialog.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "dialog.h"
#include "./ui_dialog.h"
#include "calibrationpictures.h"
#include "visualizerstereocamera.h"
#include <QFileDialog>
Dialog::Dialog(QWidget *parent)
: QDialog(parent)
, ui(new Ui::Dialog)
{
ui->setupUi(this);
this->setWindowTitle("Calibration Images");
}
Dialog::~Dialog()
{
delete ui;
}
void Dialog::on_pushButton_clicked()
{
String textPath = ui->txtPathLeftCamera->text().toStdString();
this->calibrationPictures.setPathLeftCamera(textPath);
this->calibrationPictures.takeCalibrationImages();
QString numOfSavingImages = QString::number(this->calibrationPictures.getNumOfSavingImages());
}
void Dialog::on_pushButton_2_clicked()
{
this->calibrationPictures.setExit('q');
}
void Dialog::on_btnSaveImages_clicked()
{
this->calibrationPictures.setStartTakingImages('s');
}
void Dialog::on_btnStopSaving_clicked()
{
this->calibrationPictures.setStartTakingImages('e');
}
void Dialog::on_btnSelectDir_clicked()
{
QString dirPath = QFileDialog::getExistingDirectory(this,tr("open Directory"),"/home", QFileDialog::ShowDirsOnly);
//create the folders
QString dirRightFolder = "Right";
QString dirLeftFolder = "Left";
QDir dir(dirPath);
dir.mkdir(dirRightFolder);
dir.mkdir(dirLeftFolder);
String pathCalibrationPictures = dirPath.toStdString();
this->calibrationPictures.setPathCalibrationPicturesLeftCamera(pathCalibrationPictures+"/Left");
this->calibrationPictures.setPathCalibrationPicturesRightCamera(pathCalibrationPictures+"/Right");
}