From c8818a65d542b2f8b90a4a4bb222faca2212d8f2 Mon Sep 17 00:00:00 2001 From: MPIBR-tushevg Date: Fri, 7 Dec 2018 17:08:10 +0100 Subject: [PATCH] fix ui --- BrainATUMtome/mainwindow.cpp | 31 +- BrainATUMtome/mainwindow.h | 12 +- BrainATUMtome/mainwindow.ui | 899 +++++++++++++++++++---------------- 3 files changed, 512 insertions(+), 430 deletions(-) diff --git a/BrainATUMtome/mainwindow.cpp b/BrainATUMtome/mainwindow.cpp index ac8c4c1..b535d35 100644 --- a/BrainATUMtome/mainwindow.cpp +++ b/BrainATUMtome/mainwindow.cpp @@ -207,7 +207,16 @@ MainWindow::~MainWindow() void MainWindow::configure_controlEpos() { - //connect(ui->pushButton_epos_lower_cw, &Q) + connect(ui->pushButton_epos_lower_cw, &QPushButton::clicked, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->pushButton_epos_upper_cw->setChecked(true);}); + connect(ui->pushButton_epos_lower_ccw, &QPushButton::clicked, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->pushButton_epos_upper_ccw->setChecked(true);}); + connect(ui->pushButton_epos_lower_off, &QPushButton::clicked, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->pushButton_epos_upper_off->setChecked(true);}); + connect(ui->lineEdit_epos_lower_rpm, &QLineEdit::returnPressed, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->lineEdit_epos_upper_rpm->setText(ui->lineEdit_epos_lower_rpm->text());}); + + connect(ui->pushButton_epos_upper_cw, &QPushButton::clicked, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->pushButton_epos_lower_cw->setChecked(true);}); + connect(ui->pushButton_epos_upper_ccw, &QPushButton::clicked, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->pushButton_epos_lower_ccw->setChecked(true);}); + connect(ui->pushButton_epos_upper_off, &QPushButton::clicked, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->pushButton_epos_lower_off->setChecked(true);}); + connect(ui->lineEdit_epos_upper_rpm, &QLineEdit::returnPressed, [this](){if (ui->pushButton_epos_sync_on->isChecked()) ui->lineEdit_epos_lower_rpm->setText(ui->lineEdit_epos_upper_rpm->text());}); + } @@ -236,20 +245,20 @@ void MainWindow::on_pushButton_dep_run_clicked() -void MainWindow::on_pushButton_dmt_cut_clicked() +void MainWindow::on_pushButton_mtm_cut_clicked() { - if (QString::compare(ui->pushButton_dmt_cut->text(), "Cut") == 0) + if (QString::compare(ui->pushButton_mtm_cut->text(), "Cut") == 0) { - ui->pushButton_dmt_cut->setText("Stop"); - emit uirequest_dmt_setCuttingSpeed(ui->lineEdit_dmt_cuttingSpeed->text().toUInt()); - emit uirequest_dmt_setReturnSpeed(ui->comboBox_dmt_returnSpeed->currentText().toUInt()); - emit uirequest_dmt_setFeed(ui->lineEdit_dmt_feedStep->text().toUInt()); - emit uirequest_dmt_cuttingMotorOn(); + 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_dmt_cut->text(), "Stop") == 0) + else if (QString::compare(ui->pushButton_mtm_cut->text(), "Stop") == 0) { - ui->pushButton_dmt_cut->setText("Cut"); - emit uirequest_dmt_cuttingMotroOff(); + ui->pushButton_mtm_cut->setText("Cut"); + emit uirequest_mtm_cuttingMotroOff(); } } diff --git a/BrainATUMtome/mainwindow.h b/BrainATUMtome/mainwindow.h index a379590..4162327 100644 --- a/BrainATUMtome/mainwindow.h +++ b/BrainATUMtome/mainwindow.h @@ -51,15 +51,15 @@ class MainWindow : public QMainWindow private slots: void on_error_throw(const QString &errorSource, const QString &errorMessage); void on_pushButton_dep_run_clicked(); - void on_pushButton_dmt_cut_clicked(); + void on_pushButton_mtm_cut_clicked(); void on_lineEdit_dep_velocity_returnPressed(); signals: - void uirequest_dmt_setCuttingSpeed(quint32 value); - void uirequest_dmt_setReturnSpeed(quint32 value); - void uirequest_dmt_setFeed(quint16 value); - void uirequest_dmt_cuttingMotorOn(); - void uirequest_dmt_cuttingMotroOff(); + 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); }; diff --git a/BrainATUMtome/mainwindow.ui b/BrainATUMtome/mainwindow.ui index db3be07..1206cc7 100644 --- a/BrainATUMtome/mainwindow.ui +++ b/BrainATUMtome/mainwindow.ui @@ -20,277 +20,440 @@ MainWindow - - - - - EPOS - - - - - - Upper - - - - - - CW - - - true - - - true - - - true - - - - - - - CCW - - - true - - - true - - - true - - - - - - - OFF - - - true - - - true - - - true - - - true - - - - - - - 1000 - - - - - - - [rpm] - - - - - - - - - - Lower - - - - - - CW - - - true - - - true - - - true - - - - - - - CCW - - - true - - - true - - - true - - - - - - - OFF - - - true - - - true - - - true - - - true - - - - - - - 1000 - - - - - - - [rpm] - - - - - - - - - - Tension - - - - - - ON - - - true - - - true - - - true - - - - - - - OFF - - - true - - - true - - - true - - - true - - - - - - - - - - Sync - - - - - - ON - - - true - - - true - - - true - - - - - - - OFF - - - true - - - true - - - true - - - true - - - - - - - - - - - - - - - - - 0 - 0 - - - - - 240 - 180 - - - - Microtome - - - - - - + + + + + + + + 0 + 0 + + + + + 240 + 180 + + + + EPOS + + + + + + Lower + + + + + + CW + + + true + + + true + + + true + + + + + + + CCW + + + true + + + true + + + true + + + + + + + OFF + + + true + + + true + + + true + + + true + + + + + + + 1000 + + + + + + + [rpm] + + + + + + + + + + Upper + + + + + + CW + + + true + + + true + + + true + + + + + + + CCW + + + true + + + true + + + true + + + + + + + OFF + + + true + + + true + + + true + + + true + + + + + + + 1000 + + + + + + + [rpm] + + + + + + + + + + Tension + + + + + + ON + + + true + + + true + + + true + + + + + + + OFF + + + true + + + true + + + true + + + true + + + + + + + + + + Sync + + + + + + false + + + ON + + + true + + + true + + + true + + + + + + + OFF + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + 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 @@ -302,15 +465,8 @@ - - - - Cut - - - - - + + Qt::Horizontal @@ -323,152 +479,61 @@ - - - - - - - cutting speed [um/sec] - - - - - - - 100 - - - - - - - return speed [um/sec] - - - - - - - feed step [nm] - - - - - - - 30 - - - - - + + + + + + + 0 + 0 + + + + Camera + + + + - sections + Record - - - - 0 + + + + Qt::Horizontal - - - - - - advance remaining [nm] + + + 40 + 20 + - + - - + + - 0 + Snap - - - - - 10000 - - - - - 30000 - - - - - 50000 - - - - - - - - - - + + + - - - - - 0 - 0 - - - - - 276 - 60 - - - - Syringe - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Pump - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + + + + + + + + + @@ -493,6 +558,14 @@ + + + LoggerEvents + QWidget +
loggerevents.h
+ 1 +
+