forked from grame-cncm/faust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlv2qtgui.h
62 lines (49 loc) · 1.21 KB
/
lv2qtgui.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
#ifndef LV2QTGUI_H
#define LV2QTGUI_H
#include <QObject>
#include <faust/gui/QTUI.h>
class LV2PluginUI;
#ifdef OSCCTRL
class OSCUI;
#endif
#ifdef HTTPCTRL
class httpdUI;
#endif
struct ERect {
short top, left, bottom, right;
};
class LV2QtGUI : public QObject {
Q_OBJECT
QScrollArea* widget;
void *uidsp;
QTGUI* qtinterface;
#ifdef OSCCTRL
OSCUI* oscinterface;
#endif
#ifdef HTTPCTRL
httpdUI *httpdinterface;
#endif
public:
LV2QtGUI(LV2PluginUI* plugui);
~LV2QtGUI();
LV2PluginUI* plugui;
// vector of all GUI controls, indexed by parameter indices
QVector< QList<QObject*> > controls;
// vector of all passive controls needing continuous update (this isn't used
// right now, as all live updates are done through the controls vector, but
// we keep it around for debugging purposes)
QVector<QObject*> passive_controls;
virtual QWidget* open();
virtual void close();
void updateQTGUI(QObject* object, float value);
void updatePassiveControl(QObject* object, float value);
protected:
ERect rectangle;
float voices_zone, tuning_zone;
public slots:
void updateUI_buttonPressed();
void updateUI_buttonReleased();
void updateUI_checkBox();
void updateUI();
};
#endif // LV2QTGUI_H