Vespucci  1.0.0
rangedialog.cpp
Go to the documentation of this file.
2 #include "ui_rangedialog.h"
3 
10 RangeDialog::RangeDialog(QWidget *parent, double min, double max) :
11  QDialog(parent),
12  ui(new Ui::RangeDialog)
13 {
14  ui->setupUi(this);
15  min_ = min;
16  max_ = max;
17  QString range_label_text = QString::number(min) + " - " + QString::number(max);
18  ui->rangeLabel->setText(range_label_text);
19  ui->minBox->setRange(min, max);
20  ui->maxBox->setRange(min, max);
21  is_accepted_ = false;
22 
23 }
24 
26 {
27  delete ui;
28 }
29 
30 void RangeDialog::on_buttonBox_accepted()
31 {
32  min_ = ui->minBox->value();
33  max_ = ui->maxBox->value();
34  is_accepted_ = true;
35  emit DialogAccepted(min_, max_);
36 }
37 
38 void RangeDialog::GetRange(double &min, double &max){
39  min = min_;
40  max = max_;
41 }
42 
44 {
45  return is_accepted_;
46 }
47 
48 
void GetRange(double &min, double &max)
Definition: rangedialog.cpp:38
Definition: ahcadialog.h:26
The RangeDialog class.
Definition: rangedialog.h:32
VESPUCCI_EXPORT arma::uword max(arma::uword a, arma::uword b)
Vespucci::Math::max.
Definition: accessory.cpp:237
bool is_accepted()
Definition: rangedialog.cpp:43
void DialogAccepted(double min, double max)
VESPUCCI_EXPORT arma::uword min(arma::uword a, arma::uword b)
Vespucci::Math::min.
Definition: accessory.cpp:249
RangeDialog(QWidget *parent, double min, double max)
RangeDialog::RangeDialog.
Definition: rangedialog.cpp:10