-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
searchdialog.cpp
37 lines (28 loc) · 864 Bytes
/
searchdialog.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "searchdialog.h"
#include "ui_searchdialog.h"
SearchDialog::SearchDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SearchDialog)
{
ui->setupUi(this);
QStringList params = QString("Fs,Qts,Vas,Dia,Z,Sd,Re,Xmax,Le,Qms,Qes,Spl,Pe,BL").split(',');
ui->searchComboBox->addItems(params);
connect(this, &SearchDialog::accepted, this, &SearchDialog::onAccepted);
connect(this, &SearchDialog::rejected, this, &SearchDialog::onRejected);
}
SearchDialog::~SearchDialog()
{
delete ui;
}
void SearchDialog::onAccepted()
{
QString param = ui->searchComboBox->currentText();
double min = ui->searchMinDoubleSpinBox->value();
double max = ui->searchMaxdoubleSpinBox->value();
QString p = param.toLower();
emit searchRequested(p, min, max);
}
void SearchDialog::onRejected()
{
emit searchCancelled();
}