Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
value changed added
Browse files Browse the repository at this point in the history
  • Loading branch information
MPIBR-tushevg committed Dec 31, 2018
1 parent 19837b3 commit 027ac63
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
30 changes: 16 additions & 14 deletions BrainATUMtome/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ void MainWindow::configure_epos()
connect(ui->radioButton_epos_tension_off, &QRadioButton::toggled, this, &MainWindow::on_radioButtonsEposTensionToggled);
connect(ui->radioButton_epos_tension_on, &QRadioButton::toggled, this, &MainWindow::on_radioButtonsEposTensionToggled);


ui->spinBox_epos_sync_velocity->setKeyboardTracking(false);
ui->spinBox_epos_lower_velocity->setKeyboardTracking(false);
ui->spinBox_epos_upper_velocity->setKeyboardTracking(false);
}


Expand All @@ -59,6 +61,8 @@ void MainWindow::configure_microtome()
connect(this, &MainWindow::uirequest_microtome_cuttingSpeed, m_driverMicrotome, &Microtome::on_uirequest_cuttingSpeed);
connect(this, &MainWindow::uirequest_microtome_returnSpeed, m_driverMicrotome, &Microtome::on_uirequest_returnSpeed);
connect(this, &MainWindow::uirequest_microtome_feedStep, m_driverMicrotome, &Microtome::on_uirequest_feedStep);
ui->spinBox_microtome_cuttingSpeed->setKeyboardTracking(false);
ui->spinBox_microtome_feedStep->setKeyboardTracking(false);
}


Expand Down Expand Up @@ -159,29 +163,28 @@ void MainWindow::on_radioButtonsEposTensionToggled(bool checked)
}


void MainWindow::on_spinBox_epos_sync_velocity_editingFinished()
void MainWindow::on_spinBox_epos_sync_velocity_valueChanged(int value)
{
int velocity_value = ui->spinBox_epos_sync_velocity->value();
ui->spinBox_epos_lower_velocity->setValue(velocity_value);
ui->spinBox_epos_upper_velocity->setValue(velocity_value);
ui->spinBox_epos_lower_velocity->setValue(value);
ui->spinBox_epos_upper_velocity->setValue(value);
}


void MainWindow::on_spinBox_epos_lower_velocity_editingFinished()
void MainWindow::on_spinBox_epos_lower_velocity_valueChanged(int value)
{
if (ui->radioButton_epos_lower_off->isChecked())
return;

drive_epos_motor(EPOS_LOWER_MOTTOR, ui->spinBox_epos_lower_velocity->value());
drive_epos_motor(EPOS_LOWER_MOTTOR, value);
}


void MainWindow::on_spinBox_epos_upper_velocity_editingFinished()
void MainWindow::on_spinBox_epos_upper_velocity_valueChanged(int value)
{
if (ui->radioButton_epos_upper_off->isChecked())
return;

drive_epos_motor(EPOS_UPPER_MOTTOR, ui->spinBox_epos_upper_velocity->value());
drive_epos_motor(EPOS_UPPER_MOTTOR, value);
}


Expand All @@ -192,9 +195,9 @@ void MainWindow::drive_epos_motor(int motorid, int velocity)
}


void MainWindow::on_spinBox_microtome_cuttingSpeed_editingFinished()
void MainWindow::on_spinBox_microtome_cuttingSpeed_valueChanged(int value)
{
emit uirequest_microtome_cuttingSpeed(ui->spinBox_microtome_cuttingSpeed->value());
emit uirequest_microtome_cuttingSpeed(value);
}


Expand All @@ -205,9 +208,9 @@ void MainWindow::on_comboBox_microtome_returnSpeed_activated(int index)
}


void MainWindow::on_spinBox_microtome_feedStep_editingFinished()
void MainWindow::on_spinBox_microtome_feedStep_valueChanged(int value)
{
emit uirequest_microtome_feedStep(ui->spinBox_microtome_feedStep->value());
emit uirequest_microtome_feedStep(value);
}


Expand Down Expand Up @@ -244,4 +247,3 @@ void MainWindow::on_checkBox_syringe_auto_toggled(bool checked)
{
emit uirequest_syringe_auto(checked);
}

11 changes: 5 additions & 6 deletions BrainATUMtome/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,19 @@ private slots:
void on_radioButtonsEposLowerToggled(bool checked);
void on_radioButtonsEposUpperToggled(bool checked);
void on_radioButtonsEposTensionToggled(bool checked);
void on_spinBox_epos_sync_velocity_editingFinished();
void on_spinBox_epos_lower_velocity_editingFinished();
void on_spinBox_epos_upper_velocity_editingFinished();
void on_spinBox_epos_sync_velocity_valueChanged(int value);
void on_spinBox_epos_lower_velocity_valueChanged(int value);
void on_spinBox_epos_upper_velocity_valueChanged(int value);

void on_spinBox_microtome_cuttingSpeed_editingFinished();
void on_spinBox_microtome_cuttingSpeed_valueChanged(int value);
void on_comboBox_microtome_returnSpeed_activated(int index);
void on_spinBox_microtome_feedStep_editingFinished();
void on_spinBox_microtome_feedStep_valueChanged(int value);
void on_pushButton_microtome_cut_clicked();
void on_pushButton_microtome_stop_clicked();

void on_pushButton_syringe_pump_clicked();
void on_checkBox_syringe_auto_toggled(bool checked);


signals:
void uirequest_epos_velocity(int motorid, int velocity);
void uirequest_epos_tension(bool state);
Expand Down

0 comments on commit 027ac63

Please sign in to comment.