Mercurial > hg > svgui
annotate widgets/PluginParameterBox.h @ 405:7920688d8e70
* Fix two problems reported by Matthias in the data editor window:
- highlighted row was incorrect (it was highlighting the row for the
next item after the current position, not the one before it as it
should be)
- making a row current moved the centre frame of the view, but did
not change the playback position as it should do
author | Chris Cannam |
---|---|
date | Thu, 26 Jun 2008 12:41:23 +0000 |
parents | 15b8a4bfe855 |
children | c803eb18ebba |
rev | line source |
---|---|
Chris@60 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@60 | 2 |
Chris@60 | 3 /* |
Chris@60 | 4 Sonic Visualiser |
Chris@60 | 5 An audio file viewer and annotation editor. |
Chris@60 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@182 | 7 This file copyright 2006 Chris Cannam and QMUL. |
Chris@60 | 8 |
Chris@60 | 9 This program is free software; you can redistribute it and/or |
Chris@60 | 10 modify it under the terms of the GNU General Public License as |
Chris@60 | 11 published by the Free Software Foundation; either version 2 of the |
Chris@60 | 12 License, or (at your option) any later version. See the file |
Chris@60 | 13 COPYING included with this distribution for more information. |
Chris@60 | 14 */ |
Chris@60 | 15 |
Chris@60 | 16 #ifndef _PLUGIN_PARAMETER_BOX_H_ |
Chris@60 | 17 #define _PLUGIN_PARAMETER_BOX_H_ |
Chris@60 | 18 |
Chris@71 | 19 #include "vamp-sdk/PluginBase.h" |
Chris@60 | 20 |
Chris@60 | 21 #include <QFrame> |
Chris@60 | 22 #include <map> |
Chris@60 | 23 |
Chris@60 | 24 class AudioDial; |
Chris@60 | 25 class QDoubleSpinBox; |
Chris@63 | 26 class QCheckBox; |
Chris@60 | 27 class QGridLayout; |
Chris@74 | 28 class QComboBox; |
Chris@60 | 29 |
Chris@60 | 30 class PluginParameterBox : public QFrame |
Chris@60 | 31 { |
Chris@60 | 32 Q_OBJECT |
Chris@60 | 33 |
Chris@60 | 34 public: |
Chris@71 | 35 PluginParameterBox(Vamp::PluginBase *, QWidget *parent = 0); |
Chris@60 | 36 ~PluginParameterBox(); |
Chris@60 | 37 |
Chris@71 | 38 Vamp::PluginBase *getPlugin() { return m_plugin; } |
Chris@60 | 39 |
Chris@64 | 40 signals: |
Chris@64 | 41 void pluginConfigurationChanged(QString); |
Chris@64 | 42 |
Chris@60 | 43 protected slots: |
Chris@60 | 44 void dialChanged(int); |
Chris@60 | 45 void spinBoxChanged(double); |
Chris@63 | 46 void checkBoxChanged(int); |
Chris@63 | 47 void programComboChanged(const QString &); |
Chris@60 | 48 |
Chris@60 | 49 protected: |
Chris@60 | 50 void populate(); |
Chris@293 | 51 void updateProgramCombo(); |
Chris@60 | 52 |
Chris@60 | 53 QGridLayout *m_layout; |
Chris@71 | 54 Vamp::PluginBase *m_plugin; |
Chris@60 | 55 |
Chris@60 | 56 struct ParamRec { |
Chris@60 | 57 AudioDial *dial; |
Chris@60 | 58 QDoubleSpinBox *spin; |
Chris@63 | 59 QCheckBox *check; |
Chris@74 | 60 QComboBox *combo; |
Chris@71 | 61 Vamp::PluginBase::ParameterDescriptor param; |
Chris@60 | 62 }; |
Chris@60 | 63 |
Chris@293 | 64 QComboBox *m_programCombo; |
Chris@293 | 65 |
Chris@60 | 66 std::map<QString, ParamRec> m_params; |
Chris@207 | 67 std::map<QString, QString> m_nameMap; |
Chris@293 | 68 Vamp::PluginBase::ProgramList m_programs; |
Chris@60 | 69 }; |
Chris@60 | 70 |
Chris@60 | 71 #endif |
Chris@60 | 72 |