diff --git a/archive/BrainATUMtome.pro b/archive/BrainATUMtome.pro new file mode 100644 index 0000000..d6c7db2 --- /dev/null +++ b/archive/BrainATUMtome.pro @@ -0,0 +1,67 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2018-06-19T12:10:34 +# +#------------------------------------------------- + +QT += core gui serialport + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = BrainATUMtome +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + + +SOURCES += \ + main.cpp \ + mainwindow.cpp \ + driverepos.cpp \ + driverserialport.cpp \ + driversyringe.cpp \ + drivermicrotome.cpp \ + videoproducer.cpp \ + videoconverter.cpp \ + videoviewer.cpp \ + videowriter.cpp \ + loggerevents.cpp + +HEADERS += \ + mainwindow.h \ + driverepos.h \ + driverserialport.h \ + driversyringe.h \ + drivermicrotome.h \ + videoproducer.h \ + videoconverter.h \ + videoviewer.h \ + videowriter.h \ + loggerevents.h + +FORMS += \ + mainwindow.ui + + +win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../libs/opencv/lib/ -lopencv_world340 +else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../libs/opencv/lib/ -lopencv_world340d + +INCLUDEPATH += $$PWD/../libs/opencv/include +DEPENDPATH += $$PWD/../libs/opencv/include + + + +win32: LIBS += -L$$PWD/../libs/epos/lib/ -lEposCmd64 + +INCLUDEPATH += $$PWD/../libs/epos/include +DEPENDPATH += $$PWD/../libs/epos/include + diff --git a/BrainATUMtome/driverepos.cpp b/archive/driverepos.cpp similarity index 100% rename from BrainATUMtome/driverepos.cpp rename to archive/driverepos.cpp diff --git a/BrainATUMtome/driverepos.h b/archive/driverepos.h similarity index 100% rename from BrainATUMtome/driverepos.h rename to archive/driverepos.h diff --git a/BrainATUMtome/drivermicrotome.cpp b/archive/drivermicrotome.cpp similarity index 100% rename from BrainATUMtome/drivermicrotome.cpp rename to archive/drivermicrotome.cpp diff --git a/BrainATUMtome/drivermicrotome.h b/archive/drivermicrotome.h similarity index 100% rename from BrainATUMtome/drivermicrotome.h rename to archive/drivermicrotome.h diff --git a/BrainATUMtome/driverserialport.cpp b/archive/driverserialport.cpp similarity index 100% rename from BrainATUMtome/driverserialport.cpp rename to archive/driverserialport.cpp diff --git a/BrainATUMtome/driverserialport.h b/archive/driverserialport.h similarity index 100% rename from BrainATUMtome/driverserialport.h rename to archive/driverserialport.h diff --git a/BrainATUMtome/driversyringe.cpp b/archive/driversyringe.cpp similarity index 100% rename from BrainATUMtome/driversyringe.cpp rename to archive/driversyringe.cpp diff --git a/BrainATUMtome/driversyringe.h b/archive/driversyringe.h similarity index 100% rename from BrainATUMtome/driversyringe.h rename to archive/driversyringe.h diff --git a/BrainATUMtome/loggerevents.cpp b/archive/loggerevents.cpp similarity index 100% rename from BrainATUMtome/loggerevents.cpp rename to archive/loggerevents.cpp diff --git a/BrainATUMtome/loggerevents.h b/archive/loggerevents.h similarity index 100% rename from BrainATUMtome/loggerevents.h rename to archive/loggerevents.h diff --git a/archive/main.cpp b/archive/main.cpp new file mode 100644 index 0000000..b48f94e --- /dev/null +++ b/archive/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/archive/mainwindow.cpp b/archive/mainwindow.cpp new file mode 100644 index 0000000..78ce57a --- /dev/null +++ b/archive/mainwindow.cpp @@ -0,0 +1,394 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + 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), + m_epos_motors(0), + m_epos_velocity(1000) + +{ + ui->setupUi(this); + + configure_controlEpos(); + + /* --- configure DriverEpos --- */ + /* + m_driverEpos = new DriverEpos(nullptr); + m_thread_driverEpos = new QThread(this); + m_driverEpos->moveToThread(m_thread_driverEpos); + connect(m_thread_driverEpos, &QThread::finished, m_driverEpos, &DriverEpos::deleteLater); + m_thread_driverEpos->start(); + + connect(m_driverEpos, &DriverEpos::error, this, &MainWindow::on_error_throw); + connect(this, &MainWindow::uirequest_dep_run, m_driverEpos, &DriverEpos::on_uirequest_run); + QIntValidator *validator_velocity = new QIntValidator(0, 15000, this); + ui->lineEdit_dep_velocity->setValidator(validator_velocity); + QButtonGroup *radioButtonGroup_direction = new QButtonGroup(this); + radioButtonGroup_direction->addButton(ui->radioButton_dep_directionPositive); + radioButtonGroup_direction->addButton(ui->radioButton_dep_directionNegative); + connect(ui->radioButton_dep_motorsBoth, &QRadioButton::toggled, + [this, radioButtonGroup_direction](bool checked){ + if (checked) + { + ui->checkBox_dep_motorsTension->setChecked(true); + radioButtonGroup_direction->setExclusive(false); + ui->radioButton_dep_directionPositive->setChecked(false); + ui->radioButton_dep_directionNegative->setChecked(false); + ui->groupBox_dep_direction->setDisabled(true); + } + else + { + radioButtonGroup_direction->setExclusive(true); + ui->radioButton_dep_directionPositive->setChecked(true); + ui->groupBox_dep_direction->setDisabled(false); + } + }); + 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); + connect(m_thread_driverMicrotome, &QThread::finished, m_driverMicrotome, &DriverMicrotome::deleteLater); + m_thread_driverMicrotome->start(); + + connect(m_driverMicrotome, &DriverMicrotome::error, this, &MainWindow::on_error_throw); + connect(this, &MainWindow::uirequest_dmt_cuttingMotroOff, m_driverMicrotome, &DriverMicrotome::on_uirequest_cuttingMotorOff); + connect(this, &MainWindow::uirequest_dmt_cuttingMotorOn, m_driverMicrotome, &DriverMicrotome::on_uirequest_cuttingMotorOn); + connect(this, &MainWindow::uirequest_dmt_setCuttingSpeed, m_driverMicrotome, &DriverMicrotome::on_uirequest_setCuttingSpeed); + connect(this, &MainWindow::uirequest_dmt_setReturnSpeed, m_driverMicrotome, &DriverMicrotome::on_uirequest_setReturnSpeed); + connect(this, &MainWindow::uirequest_dmt_setFeed, m_driverMicrotome, &DriverMicrotome::on_uirequest_setFeed); + + connect(ui->lineEdit_dmt_cuttingSpeed, &QLineEdit::returnPressed, + [this](){emit uirequest_dmt_setCuttingSpeed(ui->lineEdit_dmt_cuttingSpeed->text().toUInt());}); + connect(ui->comboBox_dmt_returnSpeed, &QComboBox::currentTextChanged, + [this](){emit uirequest_dmt_setReturnSpeed(ui->comboBox_dmt_returnSpeed->currentText().toUInt());}); + connect(ui->lineEdit_dmt_feedStep, &QLineEdit::returnPressed, + [this](){emit uirequest_dmt_setFeed(ui->lineEdit_dmt_feedStep->text().toUInt());}); + + connect(m_driverMicrotome, &DriverMicrotome::sections, + [this](quint32 sections){ui->label_dmt_sections->setText(QString::number(sections));}); + connect(m_driverMicrotome, &DriverMicrotome::advance, + [this](quint32 positionLeft, float ratioLeft) + {ui->label_dmt_advanceRemaining->setText( + QString("%1 (%2%)").arg(QString::number(positionLeft), QString::number(ratioLeft)));}); + connect(m_driverMicrotome, &DriverMicrotome::cuttingSpeed, + [this](quint32 speed){ui->lineEdit_dmt_cuttingSpeed->setText(QString::number(speed));}); + connect(m_driverMicrotome, &DriverMicrotome::returnSpeed, + [this](quint32 speed){ + int index = ui->comboBox_dmt_returnSpeed->findText(QString::number(speed),Qt::MatchExactly); + if (index == -1) + { + ui->comboBox_dmt_returnSpeed->setCurrentText(QString::number(speed)); + } + else + { + ui->comboBox_dmt_returnSpeed->setCurrentIndex(index); + } + }); + connect(m_driverMicrotome, &DriverMicrotome::feedStep, + [this](quint16 step){ui->lineEdit_dmt_feedStep->setText(QString::number(step));}); + connect(m_driverMicrotome, &DriverMicrotome::cuttingMotorEnabled, + [this](bool status){ + if (status) + { + ui->pushButton_dmt_cut->setText("Stop"); + } + else + { + ui->pushButton_dmt_cut->setText("Start"); + } + }); + + QIntValidator *validator_cuttingSpeed = new QIntValidator(50, 100000, this); + ui->lineEdit_dmt_cuttingSpeed->setValidator(validator_cuttingSpeed); + + 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); + connect(m_thread_driverSyringe, &QThread::finished, m_driverSyringe, &DriverSyringe::deleteLater); + m_thread_driverSyringe->start(); + + 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 + if (m_thread_driverEpos != nullptr) + { + m_thread_driverEpos->quit(); + m_thread_driverEpos->wait(); + } + + + // destroy DriverMicrotome thread + if (m_thread_driverMicrotome != nullptr) + { + m_thread_driverMicrotome->quit(); + m_thread_driverMicrotome->wait(); + } + + + // destroy DriverSyringe thread + if (m_thread_driverSyringe != nullptr) + { + m_thread_driverSyringe->quit(); + m_thread_driverSyringe->wait(); + } + + + // destroy VideoProducer thread + // m_thread_videoProducer->quit(); + // m_thread_videoProducer->wait(); + + // destroy VideoConverter thread + // m_thread_videoConverter->quit(); + // m_thread_videoConverter->wait(); + + // destroy VideoWriter thread + // m_thread_videoWriter->quit(); + // m_thread_videoWriter->wait(); + + delete ui; +} + + +void MainWindow::configure_controlEpos() +{ + QButtonGroup *radioButtonGroup_epos_tension = new QButtonGroup(this); + radioButtonGroup_epos_tension->addButton(ui->radioButton_epos_tension_off, RADIOBUTTON_EPOS_TENSION_OFF); + radioButtonGroup_epos_tension->addButton(ui->radioButton_epos_tension_on, RADIOBUTTON_EPOS_TENSION_ON); + connect(radioButtonGroup_epos_tension, QOverload::of(&QButtonGroup::buttonClicked), this, &MainWindow::on_radioButton_epos_clicked); + + QButtonGroup *radioButtonGroup_epos_lower = new QButtonGroup(this); + radioButtonGroup_epos_lower->addButton(ui->radioButton_epos_lower_off, RADIOBUTTON_EPOS_LOWER_OFF); + radioButtonGroup_epos_lower->addButton(ui->radioButton_epos_lower_cw, RADIOBUTTON_EPOS_LOWER_CW); + radioButtonGroup_epos_lower->addButton(ui->radioButton_epos_lower_ccw, RADIOBUTTON_EPOS_LOWER_CCW); + connect(radioButtonGroup_epos_lower, QOverload::of(&QButtonGroup::buttonClicked), this, &MainWindow::on_radioButton_epos_clicked); + + QButtonGroup *radioButtonGroup_epos_uppser = new QButtonGroup(this); + radioButtonGroup_epos_uppser->addButton(ui->radioButton_epos_upper_off, RADIOBUTTON_EPOS_UPPER_OFF); + radioButtonGroup_epos_uppser->addButton(ui->radioButton_epos_upper_cw, RADIOBUTTON_EPOS_UPPER_CW); + radioButtonGroup_epos_uppser->addButton(ui->radioButton_epos_upper_ccw, RADIOBUTTON_EPOS_UPPER_CCW); + connect(radioButtonGroup_epos_uppser, QOverload::of(&QButtonGroup::buttonClicked), this, &MainWindow::on_radioButton_epos_clicked); + + QValidator *eposVelocity = new QIntValidator(100, 10000, this); + ui->lineEdit_epos_lower_rpm->setValidator(eposVelocity); + ui->lineEdit_epos_upper_rpm->setValidator(eposVelocity); + connect(ui->lineEdit_epos_lower_rpm, &QLineEdit::returnPressed, this, &MainWindow::on_lineEdit_epos_lower_returnPressed); + connect(ui->lineEdit_epos_upper_rpm, &QLineEdit::returnPressed, this, &MainWindow::on_lineEdit_epos_upper_returnPressed); +} + + + +void MainWindow::on_pushButton_dep_run_clicked() +{ + /* + if (QString::compare(ui->pushButton_dep_run->text(), "Run") == 0) + { + ui->pushButton_dep_run->setText("Stop"); + ui->groupBox_dep_motors->setEnabled(false); + ui->groupBox_dep_direction->setEnabled(false); + command_DriverEpos(true); + } + else if (QString::compare(ui->pushButton_dep_run->text(), "Stop") == 0) + { + ui->pushButton_dep_run->setText("Run"); + ui->groupBox_dep_motors->setEnabled(true); + ui->groupBox_dep_direction->setEnabled(true); + command_DriverEpos(false); + } + */ +} + + + + + +void MainWindow::on_pushButton_mtm_cut_clicked() +{ + if (QString::compare(ui->pushButton_mtm_cut->text(), "Cut") == 0) + { + ui->pushButton_mtm_cut->setText("Stop"); + emit uirequest_mtm_setCuttingSpeed(ui->lineEdit_mtm_cuttingSpeed->text().toUInt()); + emit uirequest_mtm_setReturnSpeed(ui->comboBox_mtm_returnSpeed->currentText().toUInt()); + emit uirequest_mtm_setFeed(ui->lineEdit_mtm_feedStep->text().toUInt()); + emit uirequest_mtm_cuttingMotorOn(); + } + else if (QString::compare(ui->pushButton_mtm_cut->text(), "Stop") == 0) + { + ui->pushButton_mtm_cut->setText("Cut"); + emit uirequest_mtm_cuttingMotroOff(); + } +} + + +void MainWindow::command_DriverEpos(bool state) +{ + /* + quint8 motors = 0x00; + if (ui->radioButton_dep_motorsLower->isChecked()) + { + motors = 0x01; + } + else if (ui->radioButton_dep_motorsUpper->isChecked()) + { + motors = 0x10; + } + else if (ui->radioButton_dep_motorsBoth->isChecked()) + { + motors = 0x11; + } + + qint16 velocity = (state) ? ui->lineEdit_dep_velocity->text().toInt() : 0; // zero velocity instructs stop + + bool direction = ui->radioButton_dep_directionPositive->isChecked(); + + bool tension = (state) ? ui->checkBox_dep_motorsTension->isChecked() : false; // false tension instructs stop + + emit uirequest_dep_run(motors, velocity, direction, tension); + */ +} + + + +void MainWindow::on_radioButton_epos_clicked(int id) +{ + if (ui->checkBox_epos_sync->isChecked()) { + switch (id) + { + case RADIOBUTTON_EPOS_LOWER_OFF: + ui->radioButton_epos_upper_off->setChecked(true); + ui->radioButton_epos_tension_off->setChecked(true); + break; + case RADIOBUTTON_EPOS_UPPER_OFF: + ui->radioButton_epos_lower_off->setChecked(true); + ui->radioButton_epos_tension_off->setChecked(true); + break; + case RADIOBUTTON_EPOS_TENSION_OFF : + ui->radioButton_epos_lower_off->setChecked(true); + ui->radioButton_epos_upper_off->setChecked(true); + break; + case RADIOBUTTON_EPOS_LOWER_CW: + ui->radioButton_epos_upper_cw->setChecked(true); + ui->radioButton_epos_tension_on->setChecked(true); + break; + case RADIOBUTTON_EPOS_UPPER_CW: + ui->radioButton_epos_lower_cw->setChecked(true); + ui->radioButton_epos_tension_on->setChecked(true); + break; + case RADIOBUTTON_EPOS_TENSION_ON : + ui->radioButton_epos_lower_cw->setChecked(true); + ui->radioButton_epos_upper_cw->setChecked(true); + break; + } + } +} + +void MainWindow::on_checkBox_epos_sync_clicked(bool checked) +{ + if (checked) { + ui->widget_logger->on_notify("EPOS :: sync mode is on."); + ui->radioButton_epos_lower_ccw->setEnabled(false); + ui->radioButton_epos_upper_ccw->setEnabled(false); + + int velocity_lower = ui->lineEdit_epos_lower_rpm->text().toInt(); + int velocity_upper = ui->lineEdit_epos_upper_rpm->text().toInt(); + if (velocity_lower != velocity_upper) { + int velocity_min = (velocity_lower < velocity_upper) ? velocity_lower : velocity_upper; + ui->lineEdit_epos_lower_rpm->setText(QString::number(velocity_min)); + ui->lineEdit_epos_upper_rpm->setText(QString::number(velocity_min)); + ui->widget_logger->on_notify("EPOS :: motors speed changed to " + QString::number(velocity_min) + " rpm."); + } + } + else { + ui->widget_logger->on_notify("EPOS :: async mode is on."); + ui->radioButton_epos_lower_ccw->setEnabled(true); + ui->radioButton_epos_upper_ccw->setEnabled(true); + } + + ui->radioButton_epos_lower_off->setChecked(true); + ui->radioButton_epos_upper_off->setChecked(true); + ui->radioButton_epos_tension_off->setChecked(true); +} + + +void MainWindow::on_lineEdit_epos_lower_returnPressed() +{ + int velocity_lower = ui->lineEdit_epos_lower_rpm->text().toInt(); + if (ui->checkBox_epos_sync->isChecked()) { + ui->lineEdit_epos_upper_rpm->setText(QString::number(velocity_lower)); + ui->widget_logger->on_notify("EPOS :: motors speed changed to " + QString::number(velocity_lower) + " rpm."); + } + else { + ui->widget_logger->on_notify("EPOS :: lower motor speed changed to " + QString::number(velocity_lower) + " rpm."); + } +} + + +void MainWindow::on_lineEdit_epos_upper_returnPressed() +{ + int velocity_upper = ui->lineEdit_epos_upper_rpm->text().toInt(); + if (ui->checkBox_epos_sync->isChecked()) { + ui->lineEdit_epos_lower_rpm->setText(QString::number(velocity_upper)); + ui->widget_logger->on_notify("EPOS :: motors speed changed to " + QString::number(velocity_upper) + " rpm."); + } + else { + ui->widget_logger->on_notify("EPOS :: upper motor speed changed to " + QString::number(velocity_upper) + " rpm."); + } +} diff --git a/archive/mainwindow.h b/archive/mainwindow.h new file mode 100644 index 0000000..d9d46f6 --- /dev/null +++ b/archive/mainwindow.h @@ -0,0 +1,82 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include +#include +#include + +#include "driverepos.h" +#include "drivermicrotome.h" +#include "driversyringe.h" +//#include "videoproducer.h" +//#include "videoconverter.h" +//#include "videowriter.h" +//#include "videoviewer.h" + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; + + DriverEpos *m_driverEpos; + DriverMicrotome *m_driverMicrotome; + DriverSyringe *m_driverSyringe; + //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; + //sQThread *m_thread_videoWriter; + + quint8 m_epos_motors; + qint16 m_epos_velocity; + + static const int RADIOBUTTON_EPOS_TENSION_OFF = 1; + static const int RADIOBUTTON_EPOS_TENSION_ON = 2; + static const int RADIOBUTTON_EPOS_LOWER_OFF = 3; + static const int RADIOBUTTON_EPOS_LOWER_CCW = 4; + static const int RADIOBUTTON_EPOS_LOWER_CW = 5; + static const int RADIOBUTTON_EPOS_UPPER_OFF = 6; + static const int RADIOBUTTON_EPOS_UPPER_CCW = 7; + static const int RADIOBUTTON_EPOS_UPPER_CW = 8; + + void command_DriverEpos(bool state); + void configure_controlEpos(); + + +private slots: + void on_pushButton_dep_run_clicked(); + void on_pushButton_mtm_cut_clicked(); + + void on_checkBox_epos_sync_clicked(bool checked); + void on_radioButton_epos_clicked(int id); + void on_lineEdit_epos_upper_returnPressed(); + void on_lineEdit_epos_lower_returnPressed(); + +signals: + void uirequest_mtm_setCuttingSpeed(quint32 value); + void uirequest_mtm_setReturnSpeed(quint32 value); + void uirequest_mtm_setFeed(quint16 value); + void uirequest_mtm_cuttingMotorOn(); + void uirequest_mtm_cuttingMotroOff(); + + void uirequest_dep_run(quint8 motor, qint16 velocity, bool direction, bool tension); +}; + +#endif // MAINWINDOW_H diff --git a/archive/mainwindow.ui b/archive/mainwindow.ui new file mode 100644 index 0000000..cf77804 --- /dev/null +++ b/archive/mainwindow.ui @@ -0,0 +1,459 @@ + + + MainWindow + + + + 0 + 0 + 1121 + 635 + + + + + 240 + 210 + + + + MainWindow + + + + + + + + + + 0 + 0 + + + + + 240 + 180 + + + + EPOS + + + + + + Upper + + + + + + CW + + + + + + + CCW + + + + + + + OFF + + + true + + + + + + + 1000 + + + + + + + [rpm] + + + + + + + + + + Lower + + + + + + CW + + + + + + + CCW + + + + + + + OFF + + + true + + + + + + + 1000 + + + + + + + [rpm] + + + + + + + + + + Tension + + + + + + ON + + + + + + + OFF + + + true + + + + + + + + + + SYNC + + + + + + + + + + + 0 + 0 + + + + + 240 + 180 + + + + Microtome + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Cut + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + cutting speed [um/sec] + + + + + + + 100 + + + + + + + return speed [um/sec] + + + + + + + feed step [nm] + + + + + + + 30 + + + + + + + sections + + + + + + + 0 + + + + + + + advance remaining [nm] + + + + + + + 0 + + + + + + + + 10000 + + + + + 30000 + + + + + 50000 + + + + + + + + + + + + + + 0 + 0 + + + + + 276 + 60 + + + + Syringe + + + + + + Pump + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + 0 + 0 + + + + Camera + + + + + + Record + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Snap + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1121 + 21 + + + + + + TopToolBarArea + + + false + + + + + + + + LoggerEvents + QWidget +
loggerevents.h
+ 1 +
+
+ + +
diff --git a/BrainATUMtome/videoconverter.cpp b/archive/videoconverter.cpp similarity index 100% rename from BrainATUMtome/videoconverter.cpp rename to archive/videoconverter.cpp diff --git a/BrainATUMtome/videoconverter.h b/archive/videoconverter.h similarity index 100% rename from BrainATUMtome/videoconverter.h rename to archive/videoconverter.h diff --git a/BrainATUMtome/videoproducer.cpp b/archive/videoproducer.cpp similarity index 100% rename from BrainATUMtome/videoproducer.cpp rename to archive/videoproducer.cpp diff --git a/BrainATUMtome/videoproducer.h b/archive/videoproducer.h similarity index 100% rename from BrainATUMtome/videoproducer.h rename to archive/videoproducer.h diff --git a/BrainATUMtome/videoviewer.cpp b/archive/videoviewer.cpp similarity index 100% rename from BrainATUMtome/videoviewer.cpp rename to archive/videoviewer.cpp diff --git a/BrainATUMtome/videoviewer.h b/archive/videoviewer.h similarity index 100% rename from BrainATUMtome/videoviewer.h rename to archive/videoviewer.h diff --git a/BrainATUMtome/videowriter.cpp b/archive/videowriter.cpp similarity index 100% rename from BrainATUMtome/videowriter.cpp rename to archive/videowriter.cpp diff --git a/BrainATUMtome/videowriter.h b/archive/videowriter.h similarity index 100% rename from BrainATUMtome/videowriter.h rename to archive/videowriter.h