modify default values.
This commit is contained in:
parent
0c217eea58
commit
385d30613c
108
acceleration.cpp
108
acceleration.cpp
@ -28,12 +28,120 @@ Acceleration::Acceleration(int slot_no_, int channel_, bool active, QWidget *par
|
||||
Init();
|
||||
connect(ui->checkBox_1x_ampl, &QCheckBox::toggled, this, &Acceleration::on_1x_ampl_toggled);
|
||||
connect(ui->checkBox_2x_ampl, &QCheckBox::toggled, this, &Acceleration::on_2x_ampl_toggled);
|
||||
connect(ui->checkBox_rms, &QCheckBox::toggled, this, &Acceleration::on_rms_toggled);
|
||||
connect(ui->checkBox_integrate, &QCheckBox::toggled, this, &Acceleration::on_integrate_toggled);
|
||||
}
|
||||
|
||||
Acceleration::~Acceleration() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Acceleration::on_rms_toggled(bool checked) {
|
||||
// TODO: 自定义的回调
|
||||
if (checked) {
|
||||
if (ui->checkBox_integrate->isChecked()) {
|
||||
QStringList items = {"0-25 mm/s rms", "0-50 mm/s rms", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
} else {
|
||||
QStringList items = {"0-20 m/s^2 rms", "0-50 m/s^2 rms", "0-100 m/s^2 rms", "0-200 m/s^2 rms", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (ui->checkBox_integrate->isChecked()) {
|
||||
QStringList items = {"0-25 mm/s pk", "0-50 mm/s pk", "0-100 mm/s pk", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
} else {
|
||||
QStringList items = {"0-20 m/s^2 pk", "0-50 m/s^2 pk", "0-100 m/s^2 pk", "0-200 m/s^2 pk", "0-250 m/s^2 pk", "0-400 m/s^2 pk", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
void Acceleration::on_integrate_toggled(bool checked) {
|
||||
// TODO: 自定义的回调
|
||||
if (checked) {
|
||||
if (ui->checkBox_rms->isChecked()) {
|
||||
QStringList items = {"0-25 mm/s rms", "0-50 mm/s rms", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
} else {
|
||||
QStringList items = {"0-25 mm/s pk", "0-50 mm/s pk", "0-100 mm/s pk", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (ui->checkBox_rms->isChecked()) {
|
||||
QStringList items = {"0-20 m/s^2 rms", "0-50 m/s^2 rms", "0-100 m/s^2 rms", "0-200 m/s^2 rms", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
} else {
|
||||
QStringList items = {"0-20 m/s^2 pk", "0-50 m/s^2 pk", "0-100 m/s^2 pk", "0-200 m/s^2 pk", "0-250 m/s^2 pk", "0-400 m/s^2 pk", "自定义"};
|
||||
ui->comboBox_direct_value_range->clear();
|
||||
ui->comboBox_direct_value_range->addItems(items);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_1x_value_range->clear();
|
||||
ui->comboBox_1x_value_range->addItems(items);
|
||||
ui->comboBox_1x_value_range->setCurrentIndex(0);
|
||||
ui->comboBox_2x_value_range->clear();
|
||||
ui->comboBox_2x_value_range->addItems(items);
|
||||
ui->comboBox_2x_value_range->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
void Acceleration::on_1x_ampl_toggled(bool checked) {
|
||||
if (checked) {
|
||||
ui->comboBox_1x_value_range->setEnabled(true);
|
||||
|
@ -25,6 +25,8 @@ class Acceleration : public QWidget {
|
||||
void on_pushButton_cancel_clicked();
|
||||
void on_1x_ampl_toggled(bool checked);
|
||||
void on_2x_ampl_toggled(bool checked);
|
||||
void on_rms_toggled(bool checked);
|
||||
void on_integrate_toggled(bool checked);
|
||||
|
||||
private:
|
||||
Ui::Acceleration *ui;
|
||||
|
107
acceleration.ui
107
acceleration.ui
@ -107,7 +107,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -485,6 +485,41 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-20 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-50 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-100 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-250 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_direct_clamp">
|
||||
<property name="geometry">
|
||||
@ -540,6 +575,41 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-20 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-50 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-100 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-250 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_1x_ampl_clamp">
|
||||
<property name="enabled">
|
||||
@ -640,6 +710,41 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-20 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-50 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-100 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-250 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 m/s^2 pk</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_rms">
|
||||
<property name="geometry">
|
||||
|
@ -376,9 +376,37 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 500 um</string>
|
||||
<string>0-100 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-150 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-500 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -391,6 +419,12 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_gap_clamp">
|
||||
<property name="geometry">
|
||||
@ -401,6 +435,9 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_1x_value_range">
|
||||
<property name="enabled">
|
||||
@ -414,9 +451,37 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 500 um</string>
|
||||
<string>0-100 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-150 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-500 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -432,6 +497,12 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_76">
|
||||
<property name="geometry">
|
||||
@ -475,7 +546,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>100.000000000000000</double>
|
||||
<double>360.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_2x_ampl_clamp">
|
||||
@ -490,6 +561,9 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_2x_phase_lag_clamp">
|
||||
<property name="enabled">
|
||||
@ -507,7 +581,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>100.000000000000000</double>
|
||||
<double>360.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_2x_value_range">
|
||||
@ -522,9 +596,37 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 500 um</string>
|
||||
<string>0-100 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-150 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-500 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -537,9 +639,42 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 500 um</string>
|
||||
<string>-24 Vdc</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-100 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-150 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-500 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -568,9 +703,37 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 500 um</string>
|
||||
<string>0-100 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-150 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-500 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -586,6 +749,12 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_smax_range">
|
||||
<property name="enabled">
|
||||
@ -599,9 +768,37 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 - 500 um</string>
|
||||
<string>0-100 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-150 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-500 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -630,6 +827,12 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_12">
|
||||
<property name="geometry">
|
||||
|
Loading…
x
Reference in New Issue
Block a user