svgui
1.9
|
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 00002 00003 /* 00004 Sonic Visualiser 00005 An audio file viewer and annotation editor. 00006 Centre for Digital Music, Queen Mary, University of London. 00007 This file copyright 2006 Chris Cannam and QMUL. 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License as 00011 published by the Free Software Foundation; either version 2 of the 00012 License, or (at your option) any later version. See the file 00013 COPYING included with this distribution for more information. 00014 */ 00015 00016 #ifndef _PLUGIN_PARAMETER_BOX_H_ 00017 #define _PLUGIN_PARAMETER_BOX_H_ 00018 00019 #include <vamp-hostsdk/PluginBase.h> 00020 00021 #include <QFrame> 00022 #include <map> 00023 00024 class AudioDial; 00025 class QDoubleSpinBox; 00026 class QCheckBox; 00027 class QGridLayout; 00028 class QComboBox; 00029 00030 class PluginParameterBox : public QFrame 00031 { 00032 Q_OBJECT 00033 00034 public: 00035 PluginParameterBox(Vamp::PluginBase *, QWidget *parent = 0); 00036 ~PluginParameterBox(); 00037 00038 Vamp::PluginBase *getPlugin() { return m_plugin; } 00039 00040 signals: 00041 void pluginConfigurationChanged(QString); 00042 00043 protected slots: 00044 void dialChanged(int); 00045 void spinBoxChanged(double); 00046 void checkBoxChanged(int); 00047 void programComboChanged(const QString &); 00048 00049 protected: 00050 void populate(); 00051 void updateProgramCombo(); 00052 00053 QGridLayout *m_layout; 00054 Vamp::PluginBase *m_plugin; 00055 00056 struct ParamRec { 00057 AudioDial *dial; 00058 QDoubleSpinBox *spin; 00059 QCheckBox *check; 00060 QComboBox *combo; 00061 Vamp::PluginBase::ParameterDescriptor param; 00062 }; 00063 00064 QComboBox *m_programCombo; 00065 00066 std::map<QString, ParamRec> m_params; 00067 std::map<QString, QString> m_nameMap; 00068 Vamp::PluginBase::ProgramList m_programs; 00069 }; 00070 00071 #endif 00072