-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparamsdialog.cpp
55 lines (43 loc) · 880 Bytes
/
paramsdialog.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
48
49
50
51
52
53
54
#include "paramsdialog.h"
#include "ui_paramsdialog.h"
CParamsDialog::CParamsDialog(QWidget *parent) :
QDialog(parent),
changed(false),
ui(new Ui::CParamsDialog),
creating(true),
sensivity(1.0),
window_length(1.0),
seconds_count(1)
{
ui->setupUi(this);
ui->edtSensivity->setValue(sensivity);
ui->edtWindowLen->setValue(window_length);
ui->edtSecondsCount->setValue(seconds_count);
creating = false;
}
CParamsDialog::~CParamsDialog()
{
delete ui;
}
double CParamsDialog::Sensivity() const
{
return sensivity;
}
double CParamsDialog::WindowLength() const
{
return window_length;
}
int CParamsDialog::SecondsCount() const
{
return seconds_count;
}
void CParamsDialog::Changed()
{
if(!creating)
{
changed = true;
sensivity = ui->edtSensivity->value();
window_length = ui->edtWindowLen->value();
seconds_count = ui->edtSecondsCount->value();
}
}