|
@@ -9,10 +9,10 @@
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
-#include "MainWindow.hpp"
|
|
|
+#include "Experiment.hpp"
|
|
|
|
|
|
|
|
|
-MainWindow::MainWindow ()
|
|
|
+Experiment::Experiment ():QMainWindow()
|
|
|
{
|
|
|
createActions ();
|
|
|
createMenus ();
|
|
@@ -106,7 +106,7 @@ MainWindow::MainWindow ()
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-MainWindow::open ()
|
|
|
+Experiment::open ()
|
|
|
{
|
|
|
QString imageFilename = QFileDialog::getOpenFileName (this,
|
|
|
QObject::
|
|
@@ -133,26 +133,28 @@ MainWindow::open ()
|
|
|
openC(imageFilename, SLLeftFilename, SLRightFilename);
|
|
|
}
|
|
|
|
|
|
-void MainWindow::leftImage(){
|
|
|
+void Experiment::leftImage(){
|
|
|
qDebug() << "Clic sur image gauche" << Qt::endl;
|
|
|
+ progressBar->setValue(0);
|
|
|
}
|
|
|
|
|
|
-void MainWindow::rightImage(){
|
|
|
+void Experiment::rightImage(){
|
|
|
qDebug() << "Clic sur image droite" << Qt::endl;
|
|
|
+ progressBar->setValue(0);
|
|
|
}
|
|
|
|
|
|
-void MainWindow::progressBarValueChanged(int value){
|
|
|
+void Experiment::progressBarValueChanged(int value){
|
|
|
if(value == maxProgressBar ){
|
|
|
QApplication::quit();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void MainWindow::ticTimer(){
|
|
|
+void Experiment::ticTimer(){
|
|
|
progressBar->setValue(progressBar->value()+time);
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-MainWindow::openC (QString image, QString leftSL, QString rightSL){
|
|
|
+Experiment::openC (QString image, QString leftSL, QString rightSL){
|
|
|
waLeft->loadImage (image.toStdString ());
|
|
|
waRight->loadImage (image.toStdString ());
|
|
|
waLeft->loadSL(leftSL.toStdString());
|
|
@@ -163,11 +165,11 @@ MainWindow::openC (QString image, QString leftSL, QString rightSL){
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-MainWindow::createActions ()
|
|
|
+Experiment::createActions ()
|
|
|
{
|
|
|
openAct = new QAction (tr ("&Open image"), this);
|
|
|
openAct->setShortcuts (QKeySequence::Open);
|
|
|
- connect (openAct, &QAction::triggered, this, &MainWindow::open);
|
|
|
+ connect (openAct, &QAction::triggered, this, &Experiment::open);
|
|
|
|
|
|
exitAct = new QAction (tr ("E&xit"), this);
|
|
|
exitAct->setShortcuts (QKeySequence::Quit);
|
|
@@ -175,7 +177,7 @@ MainWindow::createActions ()
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-MainWindow::createMenus ()
|
|
|
+Experiment::createMenus ()
|
|
|
{
|
|
|
fileMenu = menuBar ()->addMenu (tr ("&File"));
|
|
|
fileMenu->addAction (openAct);
|