2 #include "ui_thresholddialog.h" 9 dataset_ = ws->GetDataset(dataset_key);
18 void ThresholdDialog::on_buttonBox_accepted()
20 QString method = ui->methodComboBox->currentText();
21 QString behavior = ui->behaviorComboBox->currentText();
22 double threshold = ui->thresholdDoubleSpinBox->value();
24 if (method ==
"Reject Maximum Above Threshold"){
25 if (behavior ==
"Delete")
26 dataset_->RemoveClippedSpectra(threshold);
27 if (behavior ==
"Zero")
28 dataset_->ZeroClippedSpectra(threshold);
30 if (method ==
"Reject Minimum Below Threshold"){
31 if (behavior ==
"Delete")
32 dataset_->RemoveFlatSpectra(threshold);
33 if (behavior ==
"Zero")
34 dataset_->ZeroFlatSpectra(threshold);
38 workspace_->main_window()->DisplayExceptionWarning(e);
42 void ThresholdDialog::on_comboBox_currentTextChanged(
const QString &arg1)
44 if (arg1 ==
"Reject Maximum Above Threshold"){
45 ui->thresholdDoubleSpinBox->setValue(100);
48 ui->thresholdDoubleSpinBox->setValue(64000);
ThresholdDialog(QWidget *parent, QSharedPointer< VespucciWorkspace > ws, const QString &dataset_key)