Mercurial > hg > svgui
comparison widgets/PluginParameterDialog.h @ 1581:11660e0c896f audio-source-refactor
Use shared_ptr for plugin instances throughout; also descriptors are copyable
author | Chris Cannam |
---|---|
date | Fri, 20 Mar 2020 16:31:23 +0000 |
parents | 05d614f6e46d |
children | 7eb595837eaa |
comparison
equal
deleted
inserted
replaced
1580:a2ff9c01889e | 1581:11660e0c896f |
---|---|
41 class PluginParameterDialog : public QDialog | 41 class PluginParameterDialog : public QDialog |
42 { | 42 { |
43 Q_OBJECT | 43 Q_OBJECT |
44 | 44 |
45 public: | 45 public: |
46 PluginParameterDialog(Vamp::PluginBase *, QWidget *parent = 0); | 46 PluginParameterDialog(std::shared_ptr<Vamp::PluginBase> plugin, |
47 QWidget *parent = 0); | |
47 ~PluginParameterDialog(); | 48 ~PluginParameterDialog(); |
48 | 49 |
49 void setChannelArrangement(int sourceChannels, | 50 void setChannelArrangement(int sourceChannels, |
50 int targetChannels, | 51 int targetChannels, |
51 int defaultChannel); | 52 int defaultChannel); |
59 | 60 |
60 void setCandidateInputModels(const QStringList &names, | 61 void setCandidateInputModels(const QStringList &names, |
61 QString defaultName); | 62 QString defaultName); |
62 void setShowSelectionOnlyOption(bool show); | 63 void setShowSelectionOnlyOption(bool show); |
63 | 64 |
64 Vamp::PluginBase *getPlugin() { return m_plugin; } | 65 std::shared_ptr<Vamp::PluginBase> getPlugin() { return m_plugin; } |
65 | 66 |
66 int getChannel() const { return m_channel; } | 67 int getChannel() const { return m_channel; } |
67 | 68 |
68 QString getInputModel() const; | 69 QString getInputModel() const; |
69 bool getSelectionOnly() const; | 70 bool getSelectionOnly() const; |
91 void inputModelComboChanged(int); | 92 void inputModelComboChanged(int); |
92 void selectionOnlyChanged(int); | 93 void selectionOnlyChanged(int); |
93 void dialogAccepted(); | 94 void dialogAccepted(); |
94 | 95 |
95 protected: | 96 protected: |
96 Vamp::PluginBase *m_plugin; | 97 std::shared_ptr<Vamp::PluginBase> m_plugin; |
97 | 98 |
98 int m_channel; | 99 int m_channel; |
99 int m_stepSize; | 100 int m_stepSize; |
100 int m_blockSize; | 101 int m_blockSize; |
101 | 102 |