comparison widgets/PluginParameterBox.h @ 0:fc9323a41f5a

start base : Sonic Visualiser sv1-1.0rc1
author lbajardsilogic
date Fri, 11 May 2007 09:08:14 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:fc9323a41f5a
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 and QMUL.
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 "vamp-sdk/PluginBase.h"
20
21 #include <QFrame>
22 #include <map>
23
24 #include "system/System.h"
25
26 class AudioDial;
27 class QDoubleSpinBox;
28 class QCheckBox;
29 class QGridLayout;
30 class QComboBox;
31
32 class PluginParameterBox : public QFrame
33 {
34 Q_OBJECT
35
36 public:
37 PluginParameterBox(Vamp::PluginBase *, QWidget *parent = 0);
38 ~PluginParameterBox();
39
40 Vamp::PluginBase *getPlugin() { return m_plugin; }
41
42 signals:
43 void pluginConfigurationChanged(QString);
44
45 protected slots:
46 void dialChanged(int);
47 void spinBoxChanged(double);
48 void checkBoxChanged(int);
49 void programComboChanged(const QString &);
50
51 protected:
52 void populate();
53
54 QGridLayout *m_layout;
55 Vamp::PluginBase *m_plugin;
56
57 struct ParamRec {
58 AudioDial *dial;
59 QDoubleSpinBox *spin;
60 QCheckBox *check;
61 QComboBox *combo;
62 Vamp::PluginBase::ParameterDescriptor param;
63 };
64
65 std::map<QString, ParamRec> m_params;
66 std::map<QString, QString> m_nameMap;
67 };
68
69 #endif
70