diff --git a/BrainATUMtome/mainwindow.cpp b/BrainATUMtome/mainwindow.cpp
index 1a039d4..ac8c4c1 100644
--- a/BrainATUMtome/mainwindow.cpp
+++ b/BrainATUMtome/mainwindow.cpp
@@ -3,11 +3,20 @@
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
- ui(new Ui::MainWindow)
+ ui(new Ui::MainWindow),
+ m_driverEpos(nullptr),
+ m_driverMicrotome(nullptr),
+ m_driverSyringe(nullptr),
+ m_thread_driverEpos(nullptr),
+ m_thread_driverMicrotome(nullptr),
+ m_thread_driverSyringe(nullptr)
{
ui->setupUi(this);
+ configure_controlEpos();
+
/* --- configure DriverEpos --- */
+ /*
m_driverEpos = new DriverEpos(nullptr);
m_thread_driverEpos = new QThread(this);
m_driverEpos->moveToThread(m_thread_driverEpos);
@@ -39,8 +48,10 @@ MainWindow::MainWindow(QWidget *parent) :
}
});
ui->radioButton_dep_motorsBoth->setChecked(true);
+ */
/* --- configure DriverMicrotome --- */
+ /*
m_driverMicrotome = new DriverMicrotome(nullptr);
m_thread_driverMicrotome = new QThread(this);
m_driverMicrotome->moveToThread(m_thread_driverMicrotome);
@@ -100,9 +111,10 @@ MainWindow::MainWindow(QWidget *parent) :
QIntValidator *validator_feedStep = new QIntValidator(1, 15000, this);
ui->lineEdit_dmt_feedStep->setValidator(validator_feedStep);
-
+ */
/* --- configure DriverSyringe --- */
+ /*
m_driverSyringe = new DriverSyringe(nullptr);
m_thread_driverSyringe = new QThread(this);
m_driverSyringe->moveToThread(m_thread_driverSyringe);
@@ -111,72 +123,98 @@ MainWindow::MainWindow(QWidget *parent) :
connect(m_driverSyringe, &DriverSyringe::error, this, &MainWindow::on_error_throw);
connect(ui->pushButton_dsy_pump, &QPushButton::clicked, m_driverSyringe, &DriverSyringe::on_uirequest_pump);
-
+ */
/* --- configure VideoProducer --- */
+ /*
m_videoProducer = new VideoProducer(nullptr);
m_thread_videoProducer = new QThread(this);
m_videoProducer->moveToThread(m_thread_videoProducer);
connect(m_thread_videoProducer, &QThread::finished, m_videoProducer, &VideoProducer::deleteLater);
m_thread_videoProducer->start();
+ */
/* --- configure VideoConverter --- */
+ /*
m_videoConverter = new VideoConverter(nullptr);
m_thread_videoConverter = new QThread(this);
m_videoConverter->moveToThread(m_thread_videoConverter);
connect(m_thread_videoConverter, &QThread::finished, m_videoConverter, &VideoConverter::deleteLater);
m_thread_videoConverter->start();
+ */
/* --- configure VideoWriter --- */
+ /*
m_videoWriter = new VideoWriter(nullptr);
m_thread_videoWriter = new QThread(this);
m_videoWriter->moveToThread(m_thread_videoWriter);
connect(m_thread_videoWriter, &QThread::finished, m_videoWriter, &VideoWriter::deleteLater);
m_thread_videoWriter->start();
+ */
/* --- connect Video Signal/Slots --- */
+ /*
connect(ui->pushButton_dvs_record, &QPushButton::clicked, m_videoProducer, &VideoProducer::start);
connect(ui->pushButton_dvs_snap, &QPushButton::clicked, m_videoProducer, &VideoProducer::stop);
connect(m_videoProducer, &VideoProducer::frameReady, m_videoConverter, &VideoConverter::on_convertFrame);
connect(m_videoConverter, &VideoConverter::pixmapReady, ui->widget_videoViewer, &VideoViewer::on_pixmapReady);
connect(m_videoProducer, &VideoProducer::error, this, &MainWindow::on_error_throw);
connect(m_videoWriter, &VideoWriter::error, this, &MainWindow::on_error_throw);
-
+ */
}
MainWindow::~MainWindow()
{
// destroy DriverEpos thread
- m_thread_driverEpos->quit();
- m_thread_driverEpos->wait();
+ if (m_thread_driverEpos != nullptr)
+ {
+ m_thread_driverEpos->quit();
+ m_thread_driverEpos->wait();
+ }
+
// destroy DriverMicrotome thread
- m_thread_driverMicrotome->quit();
- m_thread_driverMicrotome->wait();
+ if (m_thread_driverMicrotome != nullptr)
+ {
+ m_thread_driverMicrotome->quit();
+ m_thread_driverMicrotome->wait();
+ }
+
// destroy DriverSyringe thread
- m_thread_driverSyringe->quit();
- m_thread_driverSyringe->wait();
+ if (m_thread_driverSyringe != nullptr)
+ {
+ m_thread_driverSyringe->quit();
+ m_thread_driverSyringe->wait();
+ }
+
// destroy VideoProducer thread
- m_thread_videoProducer->quit();
- m_thread_videoProducer->wait();
+ // m_thread_videoProducer->quit();
+ // m_thread_videoProducer->wait();
// destroy VideoConverter thread
- m_thread_videoConverter->quit();
- m_thread_videoConverter->wait();
+ // m_thread_videoConverter->quit();
+ // m_thread_videoConverter->wait();
// destroy VideoWriter thread
- m_thread_videoWriter->quit();
- m_thread_videoWriter->wait();
+ // m_thread_videoWriter->quit();
+ // m_thread_videoWriter->wait();
delete ui;
}
+void MainWindow::configure_controlEpos()
+{
+ //connect(ui->pushButton_epos_lower_cw, &Q)
+}
+
+
void MainWindow::on_pushButton_dep_run_clicked()
{
+ /*
if (QString::compare(ui->pushButton_dep_run->text(), "Run") == 0)
{
ui->pushButton_dep_run->setText("Stop");
@@ -191,6 +229,7 @@ void MainWindow::on_pushButton_dep_run_clicked()
ui->groupBox_dep_direction->setEnabled(true);
command_DriverEpos(false);
}
+ */
}
@@ -217,6 +256,7 @@ void MainWindow::on_pushButton_dmt_cut_clicked()
void MainWindow::command_DriverEpos(bool state)
{
+ /*
quint8 motors = 0x00;
if (ui->radioButton_dep_motorsLower->isChecked())
{
@@ -238,14 +278,17 @@ void MainWindow::command_DriverEpos(bool state)
bool tension = (state) ? ui->checkBox_dep_motorsTension->isChecked() : false; // false tension instructs stop
emit uirequest_dep_run(motors, velocity, direction, tension);
+ */
}
void MainWindow::on_lineEdit_dep_velocity_returnPressed()
{
+ /*
if (QString::compare(ui->pushButton_dep_run->text(), "Stop") != 0)
return;
command_DriverEpos(true);
+ */
}
diff --git a/BrainATUMtome/mainwindow.h b/BrainATUMtome/mainwindow.h
index fd91415..a379590 100644
--- a/BrainATUMtome/mainwindow.h
+++ b/BrainATUMtome/mainwindow.h
@@ -9,10 +9,10 @@
#include "driverepos.h"
#include "drivermicrotome.h"
#include "driversyringe.h"
-#include "videoproducer.h"
-#include "videoconverter.h"
-#include "videowriter.h"
-#include "videoviewer.h"
+//#include "videoproducer.h"
+//#include "videoconverter.h"
+//#include "videowriter.h"
+//#include "videoviewer.h"
namespace Ui {
class MainWindow;
@@ -32,19 +32,22 @@ class MainWindow : public QMainWindow
DriverEpos *m_driverEpos;
DriverMicrotome *m_driverMicrotome;
DriverSyringe *m_driverSyringe;
- VideoProducer *m_videoProducer;
- VideoConverter *m_videoConverter;
- VideoWriter *m_videoWriter;
+ //VideoProducer *m_videoProducer;
+ //VideoConverter *m_videoConverter;
+ //VideoWriter *m_videoWriter;
QThread *m_thread_driverEpos;
QThread *m_thread_driverMicrotome;
QThread *m_thread_driverSyringe;
- QThread *m_thread_videoProducer;
- QThread *m_thread_videoConverter;
- QThread *m_thread_videoWriter;
+ //QThread *m_thread_videoProducer;
+ //QThread *m_thread_videoConverter;
+ //sQThread *m_thread_videoWriter;
void command_DriverEpos(bool state);
+ void configure_controlEpos();
+
+
private slots:
void on_error_throw(const QString &errorSource, const QString &errorMessage);
void on_pushButton_dep_run_clicked();
diff --git a/BrainATUMtome/mainwindow.ui b/BrainATUMtome/mainwindow.ui
index 4b41879..db3be07 100644
--- a/BrainATUMtome/mainwindow.ui
+++ b/BrainATUMtome/mainwindow.ui
@@ -20,180 +20,256 @@
MainWindow
-
+
-
-
-
-
- 0
- 0
-
-
-
-
- 276
- 210
-
-
-
-
- 240
- 210
-
-
+
EPOS
-
- false
-
-
-
-
-
-
-
-
-
- velocity [rpm]
-
-
-
- -
-
-
- 1000
-
-
-
-
-
- -
-
+
+
-
+
- Motors
+ Upper
-
-
-
-
+
+
-
+
- tension
+ CW
-
- false
+
+ true
+
+
+ true
+
+
+ true
- -
-
+
-
+
- both
+ CCW
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ OFF
+
+
+ true
- false
+ true
true
+
+ true
+
- -
-
+
-
+
- upper
+ 1000
- -
-
+
-
+
- lower
+ [rpm]
- -
-
-
- true
-
+
-
+
- Direction
+ Lower
-
-
-
-
-
+
+
-
+
+
+ CW
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ CCW
+
+
+ true
+
+
+ true
+
+
true
+
+
+ -
+
- positive (CCW)
+ OFF
true
- false
+ true
+
+
+ true
+
+
+ true
- -
-
-
+
-
+
+
+ 1000
+
+
+
+ -
+
+
+ [rpm]
+
+
+
+
+
+
+ -
+
+
+ Tension
+
+
+
-
+
+
+ ON
+
+
+ true
+
+
true
+
+ true
+
+
+
+ -
+
- negative (CW)
+ OFF
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Run
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
+ -
+
+
+ Sync
+
+
+
-
+
+
+ ON
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ OFF
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+
+
-
-
+
- -
+
-
@@ -337,7 +413,10 @@
- -
+
-
+
+
+ -
@@ -391,73 +470,6 @@
- -
-
-
- Log
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 276
- 60
-
-
-
- Camera
-
-
-
-
-
-
- Record
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Snap
-
-
-
-
-
-
-
-
- VideoViewer
- QWidget
-
- 1
-
-