-
Notifications
You must be signed in to change notification settings - Fork 0
/
HistogramSettings.cpp
78 lines (64 loc) · 1.43 KB
/
HistogramSettings.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @file HistogramSettings.cpp
* @author Dan R. Lipsa
* @date 19 August 2010
*
* Definition of the HistogramSettings class
*/
#include "HistogramSettings.h"
HistogramSettings::HistogramSettings (QWidget* parent) :
QDialog (parent),
m_yAxisLogScale (false),
m_validator (0, numeric_limits<int> ().max (), this),
m_yAxisMaxValue (0),
m_yState (VALUE)
{
setupUi (this);
lineEditValue->setValidator (&m_validator);
setValue (0);
}
void HistogramSettings::ToggledYMaxValue (bool checked)
{
if (checked)
{
m_yState = MAX_VALUE;
setValue (m_yAxisMaxValue);
}
}
void HistogramSettings::ToggledYValue (bool checked)
{
if (checked)
{
m_yState = VALUE;
lineEditValue->setFocus ();
}
}
void HistogramSettings::ToggledYAxisLogScale (bool checked)
{
m_yAxisLogScale = checked;
}
void HistogramSettings::EditingFinishedYValue ()
{
m_yAxisValue = lineEditValue->text ().toInt();
}
void HistogramSettings::FocusInYValue ()
{
radioButtonYValue->setChecked (true);
}
void HistogramSettings::setValue (size_t value)
{
m_yAxisValue = value;
QString s;
s.setNum (value);
lineEditValue->setText (s);
}
void HistogramSettings::SetYValue (size_t value)
{
setValue (value);
radioButtonYValue->setChecked (true);
}
void HistogramSettings::SetYAxisLogScale (bool logScale)
{
m_yAxisLogScale = logScale;
checkBoxYAxisLogScale->setChecked (logScale);
}