forked from psemiletov/eko
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvelope.h
More file actions
46 lines (29 loc) · 793 Bytes
/
envelope.h
File metadata and controls
46 lines (29 loc) · 793 Bytes
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
#ifndef ENVELOPE_H
#define ENVELOPE_H
#include <QObject>
#include <QList>
#define ENVELOPE_SIDE 20
class CEnvelope;
class CEnvelopePoint: public QObject
{
Q_OBJECT
public:
size_t position_frames; //frames
float value;
bool selected;
bool operator <(const CEnvelopePoint &other) const {return position_frames < other.position_frames;}
};
class CEnvelope: public QObject
{
Q_OBJECT
public:
QList <CEnvelopePoint*> points;
void insert_wise (int x, int y, int height, size_t maximum = 0);
void select_point (CEnvelopePoint *e);
void point_move (CEnvelopePoint *p, int x, int y, int height);
void clear();
CEnvelopePoint* get_selected();
CEnvelopePoint* find (int frame, int y, int height, int frames_per_section);
~CEnvelope();
};
#endif // ENVELOPE_H