-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotscaledialog.cpp
executable file
·47 lines (39 loc) · 1.01 KB
/
plotscaledialog.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
37
38
39
40
41
42
43
44
45
46
47
#include "plotscaledialog.h"
#include "ui_plotscaledialog.h"
PlotScaleDialog::PlotScaleDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::PlotScaleDialog)
{
ui->setupUi(this);
xMin = 0 ;
xMax = 0 ;
yMin = 0 ;
yMax = 0 ;
}
PlotScaleDialog::~PlotScaleDialog()
{
delete ui;
}
void PlotScaleDialog::setMinMax (float xmin, float xmax, float ymin, float ymax){
QString str = QString ("%1").arg(xmin) ;
ui->xminLE->setText (str);
str = QString ("%1").arg(xmax) ;
ui->xmaxLE->setText (str);
str = QString ("%1").arg(ymin) ;
ui->yminLE->setText (str);
str = QString ("%1").arg(ymax) ;
ui->ymaxLE->setText (str);
}
void PlotScaleDialog::on_applyButton_clicked()
{
xMin = ui->xminLE->text().toFloat() ;
xMax = ui->xmaxLE->text().toFloat() ;
yMin = ui->yminLE->text().toFloat() ;
yMax = ui->ymaxLE->text().toFloat() ;
emit (haveValues()) ;
}
void PlotScaleDialog::on_closeButton_clicked()
{
//this->destroy(true);
PlotScaleDialog::close() ;
}