-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcinnastate.h
65 lines (48 loc) · 1.06 KB
/
cinnastate.h
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
#ifndef CINNASTATE_H
#define CINNASTATE_H
#include <QWidget>
#include <QString>
#define TIME_PER_DIV_MAX MS20_PER_DIV
#define TIME_PER_DIV_MIN MS100_PER_DIV
#define V_PER_DIV_MAX V5_PER_DIV
#define V_PER_DIV_MIN MV1_PER_DIV
typedef enum {
MS100_PER_DIV,
MS50_PER_DIV,
MS20_PER_DIV
} time_per_div_e;
typedef enum {
V5_PER_DIV,
V2_PER_DIV,
V1_PER_DIV,
MV500_PER_DIV,
MV200_PER_DIV,
MV100_PER_DIV,
MV50_PER_DIV,
MV20_PER_DIV,
MV10_PER_DIV,
MV5_PER_DIV,
MV2_PER_DIV,
MV1_PER_DIV
} v_per_div_e;
class CinnaState
{
public:
CinnaState();
time_per_div_e& getTimePerDiv();
v_per_div_e& getVPerDiv();
void incrementTimePerDiv();
void decrementTimePerDiv();
void incrementVPerDiv();
void decrementVPerDiv();
QString getTimePerDivString();
double getTimePerDivInterval();
QString getVPerDivString();
double getVPerDivNum();
protected:
double scrolledTo( const QPoint &pos ) const;
private:
time_per_div_e TimePerDiv;
v_per_div_e VPerDiv;
};
#endif // CINNASTATE_H