Mercurial > hg > svgui
comparison widgets/PluginParameterBox.h @ 60:4df1a479bf10
* Add plugin parameter box widget
author | Chris Cannam |
---|---|
date | Mon, 20 Mar 2006 18:18:30 +0000 |
parents | |
children | 50429a56680f |
comparison
equal
deleted
inserted
replaced
59:705f05ab42e3 | 60:4df1a479bf10 |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Sonic Visualiser | |
5 An audio file viewer and annotation editor. | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 This file copyright 2006 Chris Cannam. | |
8 | |
9 This program is free software; you can redistribute it and/or | |
10 modify it under the terms of the GNU General Public License as | |
11 published by the Free Software Foundation; either version 2 of the | |
12 License, or (at your option) any later version. See the file | |
13 COPYING included with this distribution for more information. | |
14 */ | |
15 | |
16 #ifndef _PLUGIN_PARAMETER_BOX_H_ | |
17 #define _PLUGIN_PARAMETER_BOX_H_ | |
18 | |
19 #include "plugin/PluginInstance.h" | |
20 | |
21 #include <QFrame> | |
22 #include <map> | |
23 | |
24 class AudioDial; | |
25 class QDoubleSpinBox; | |
26 class QGridLayout; | |
27 | |
28 class PluginParameterBox : public QFrame | |
29 { | |
30 Q_OBJECT | |
31 | |
32 public: | |
33 PluginParameterBox(PluginInstance *); | |
34 ~PluginParameterBox(); | |
35 | |
36 PluginInstance *getPlugin() { return m_plugin; } | |
37 | |
38 protected slots: | |
39 void dialChanged(int); | |
40 void spinBoxChanged(double); | |
41 | |
42 protected: | |
43 void populate(); | |
44 | |
45 QGridLayout *m_layout; | |
46 PluginInstance *m_plugin; | |
47 | |
48 struct ParamRec { | |
49 AudioDial *dial; | |
50 QDoubleSpinBox *spin; | |
51 PluginInstance::ParameterDescriptor param; | |
52 }; | |
53 | |
54 std::map<QString, ParamRec> m_params; | |
55 }; | |
56 | |
57 #endif | |
58 |