Mercurial > hg > svgui
annotate widgets/PluginParameterBox.h @ 70:bf306158803d
* Add stub for item-edit dialog (for editing properties of an item on double-
  click) -- doesn't actually do anything yet
* Add code to invoke said non-working item-edit dialog on double-click in
  time-value, time-instants and note layers
* Add overlay mode (no text, basic text, all text)
| author | Chris Cannam | 
|---|---|
| date | Thu, 30 Mar 2006 15:00:22 +0000 | 
| parents | 10bcd53ddc71 | 
| children | 72fa239a4880 | 
| 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@60 | 7 This file copyright 2006 Chris Cannam. | 
| 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@60 | 19 #include "plugin/PluginInstance.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@60 | 28 | 
| Chris@60 | 29 class PluginParameterBox : public QFrame | 
| Chris@60 | 30 { | 
| Chris@60 | 31 Q_OBJECT | 
| Chris@60 | 32 | 
| Chris@60 | 33 public: | 
| Chris@62 | 34 PluginParameterBox(PluginInstance *, QWidget *parent = 0); | 
| Chris@60 | 35 ~PluginParameterBox(); | 
| Chris@60 | 36 | 
| Chris@60 | 37 PluginInstance *getPlugin() { return m_plugin; } | 
| Chris@60 | 38 | 
| Chris@64 | 39 signals: | 
| Chris@64 | 40 void pluginConfigurationChanged(QString); | 
| Chris@64 | 41 | 
| Chris@60 | 42 protected slots: | 
| Chris@60 | 43 void dialChanged(int); | 
| Chris@60 | 44 void spinBoxChanged(double); | 
| Chris@63 | 45 void checkBoxChanged(int); | 
| Chris@63 | 46 void programComboChanged(const QString &); | 
| Chris@60 | 47 | 
| Chris@60 | 48 protected: | 
| Chris@60 | 49 void populate(); | 
| Chris@60 | 50 | 
| Chris@60 | 51 QGridLayout *m_layout; | 
| Chris@60 | 52 PluginInstance *m_plugin; | 
| Chris@60 | 53 | 
| Chris@60 | 54 struct ParamRec { | 
| Chris@60 | 55 AudioDial *dial; | 
| Chris@60 | 56 QDoubleSpinBox *spin; | 
| Chris@63 | 57 QCheckBox *check; | 
| Chris@60 | 58 PluginInstance::ParameterDescriptor param; | 
| Chris@60 | 59 }; | 
| Chris@60 | 60 | 
| Chris@60 | 61 std::map<QString, ParamRec> m_params; | 
| Chris@60 | 62 }; | 
| Chris@60 | 63 | 
| Chris@60 | 64 #endif | 
| Chris@60 | 65 | 
