Mercurial > hg > svgui
comparison widgets/PluginParameterDialog.h @ 163:dd6dd983e8ef
* Tidy up plugin parameter dialog by switching it to a simple constructor
with separate methods for passing in the additional options if necessary
* Fix sizing problem on advanced pane toggle in plugin parameter dialog
* Make a start on passing in list of candidate input models for transform
author | Chris Cannam |
---|---|
date | Wed, 11 Oct 2006 16:18:51 +0000 |
parents | 8c730f49b9b3 |
children | 11949d0b2739 |
comparison
equal
deleted
inserted
replaced
162:f32212631b9c | 163:dd6dd983e8ef |
---|---|
22 | 22 |
23 namespace Vamp { class PluginBase; } | 23 namespace Vamp { class PluginBase; } |
24 class PluginParameterBox; | 24 class PluginParameterBox; |
25 class QWidget; | 25 class QWidget; |
26 class QPushButton; | 26 class QPushButton; |
27 class QLabel; | |
28 class QGroupBox; | |
27 | 29 |
28 /** | 30 /** |
29 * A dialog for editing the parameters of a given plugin, using a | 31 * A dialog for editing the parameters of a given plugin, using a |
30 * PluginParameterBox. This dialog does not contain any mechanism for | 32 * PluginParameterBox. This dialog does not contain any mechanism for |
31 * selecting the plugin in the first place. Note that the dialog | 33 * selecting the plugin in the first place. Note that the dialog |
36 class PluginParameterDialog : public QDialog | 38 class PluginParameterDialog : public QDialog |
37 { | 39 { |
38 Q_OBJECT | 40 Q_OBJECT |
39 | 41 |
40 public: | 42 public: |
41 PluginParameterDialog(Vamp::PluginBase *, | 43 PluginParameterDialog(Vamp::PluginBase *, QWidget *parent = 0); |
42 int sourceChannels, | |
43 int targetChannels, | |
44 int defaultChannel, | |
45 QString output = "", | |
46 bool showWindowSize = false, | |
47 bool showFrequencyDomainOptions = false, | |
48 QWidget *parent = 0); | |
49 ~PluginParameterDialog(); | 44 ~PluginParameterDialog(); |
45 | |
46 void setChannelArrangement(int sourceChannels, | |
47 int targetChannels, | |
48 int defaultChannel); | |
49 | |
50 void setOutputLabel(QString output); | |
51 | |
52 void setShowProcessingOptions(bool showWindowSize, | |
53 bool showFrequencyDomainOptions); | |
50 | 54 |
51 Vamp::PluginBase *getPlugin() { return m_plugin; } | 55 Vamp::PluginBase *getPlugin() { return m_plugin; } |
52 | 56 |
53 int getChannel() const { return m_channel; } | 57 int getChannel() const { return m_channel; } |
54 | 58 |
65 void channelComboChanged(int); | 69 void channelComboChanged(int); |
66 void blockSizeComboChanged(const QString &); | 70 void blockSizeComboChanged(const QString &); |
67 void incrementComboChanged(const QString &); | 71 void incrementComboChanged(const QString &); |
68 void windowTypeChanged(WindowType type); | 72 void windowTypeChanged(WindowType type); |
69 void advancedToggled(); | 73 void advancedToggled(); |
74 void setAdvancedVisible(bool); | |
70 | 75 |
71 protected: | 76 protected: |
72 Vamp::PluginBase *m_plugin; | 77 Vamp::PluginBase *m_plugin; |
78 | |
73 int m_channel; | 79 int m_channel; |
74 size_t m_stepSize; | 80 size_t m_stepSize; |
75 size_t m_blockSize; | 81 size_t m_blockSize; |
82 | |
76 WindowType m_windowType; | 83 WindowType m_windowType; |
77 PluginParameterBox *m_parameterBox; | 84 PluginParameterBox *m_parameterBox; |
85 | |
86 QLabel *m_outputLabel; | |
87 QLabel *m_outputValue; | |
88 QGroupBox *m_channelBox; | |
89 bool m_haveChannelBoxData; | |
90 QGroupBox *m_windowBox; | |
91 bool m_haveWindowBoxData; | |
92 | |
78 QPushButton *m_advancedButton; | 93 QPushButton *m_advancedButton; |
79 QWidget *m_advanced; | 94 QWidget *m_advanced; |
95 bool m_advancedVisible; | |
80 }; | 96 }; |
81 | 97 |
82 #endif | 98 #endif |
83 | 99 |