/[qspeakers]/searchdialog.cpp
ViewVC logotype

Contents of /searchdialog.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 28 - (show annotations)
Fri Oct 10 15:36:55 2014 UTC (2 years, 8 months ago) by ben
File size: 837 byte(s)
implement searchdialog
1 #include "searchdialog.h"
2 #include "ui_searchdialog.h"
3
4 #include "speakerdb.h"
5
6 SearchDialog::SearchDialog(QWidget *parent) :
7 QDialog(parent),
8 ui(new Ui::SearchDialog)
9 {
10 ui->setupUi(this);
11
12 QStringList params = QString("Fs,Qts,Vas,Sd,Re,Xmax").split(',');
13
14 ui->searchComboBox->addItems(params);
15
16 connect(this, SIGNAL(accepted()), this, SLOT(onAccepted()));
17 connect(this, SIGNAL(rejected()), this, SLOT(onRejected()));
18 }
19
20 SearchDialog::~SearchDialog()
21 {
22 delete ui;
23 }
24
25 void SearchDialog::onAccepted()
26 {
27 QString param = ui->searchComboBox->currentText();
28 double min = ui->searchMinDoubleSpinBox->value();
29 double max = ui->searchMaxdoubleSpinBox->value();
30 QString p = param.toLower();
31
32 emit searchRequested(p, min, max);
33 }
34
35 void SearchDialog::onRejected()
36 {
37 emit searchCancelled();
38 }
39

  ViewVC Help
Powered by ViewVC 1.1.26