-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.cpp
58 lines (49 loc) · 1.15 KB
/
mainwindow.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 "mainwindow.h"
#include "ui_mainwindow.h"
#include <QFileDialog>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->e = new Engine();
this->c = new Configurator();
this->staticSeg = false;
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_3_clicked()
{
exit(0);
}
void MainWindow::on_pushButton_2_clicked()
{
this->staticSeg = true;
this->c->start();
}
void MainWindow::on_pushButton_clicked()
{
if(this->staticSeg){
this->e->setSergmentationValues(this->c->lowerY,this->c->upperY,this->c->lowerCR,this->c->upperCR,this->c->lowerCB,this->c->upperCB);
}
this->e->start();
}
void MainWindow::on_radioButton_4_clicked()
{
QString fileName = QFileDialog::getOpenFileName(this,tr("Ouvrir Video"), "/", tr("Video (*.avi *.mov)"));
this->e->setVideo(fileName.toStdString());
}
void MainWindow::on_radioButton_3_clicked()
{
this->e->setCam();
}
void MainWindow::on_radioButton_clicked()
{
this->e->isDynamicSeg(false);
}
void MainWindow::on_radioButton_2_clicked()
{
this->e->isDynamicSeg(true);
}