comparison framework/TransformUserConfigurator.cpp @ 395:ad168a6510f0

Make it possible to set the parent widget
author Chris Cannam
date Wed, 13 Aug 2014 16:42:03 +0100
parents 0876ea394902
children 72c662fe7ea3
comparison
equal deleted inserted replaced
394:71b21d6e66be 395:ad168a6510f0
27 #include <vamp-hostsdk/Plugin.h> 27 #include <vamp-hostsdk/Plugin.h>
28 28
29 #include <QStringList> 29 #include <QStringList>
30 30
31 #include <typeinfo> 31 #include <typeinfo>
32
33 static QWidget *parentWidget = 0;
34
35 void
36 TransformUserConfigurator::setParentWidget(QWidget *w)
37 {
38 parentWidget = w;
39 }
32 40
33 bool 41 bool
34 TransformUserConfigurator::getChannelRange(TransformId identifier, 42 TransformUserConfigurator::getChannelRange(TransformId identifier,
35 Vamp::PluginBase *plugin, 43 Vamp::PluginBase *plugin,
36 int &minChannels, int &maxChannels) 44 int &minChannels, int &maxChannels)
140 if (sourceChannels > maxChannels) targetChannels = maxChannels; 148 if (sourceChannels > maxChannels) targetChannels = maxChannels;
141 } 149 }
142 150
143 int defaultChannel = -1; //!!! no longer saved! [was context.channel] 151 int defaultChannel = -1; //!!! no longer saved! [was context.channel]
144 152
145 PluginParameterDialog *dialog = new PluginParameterDialog(plugin); 153 PluginParameterDialog *dialog = new PluginParameterDialog
154 (plugin, parentWidget);
146 155
147 dialog->setMoreInfoUrl(TransformFactory::getInstance()-> 156 dialog->setMoreInfoUrl(TransformFactory::getInstance()->
148 getTransformInfoUrl(transform.getIdentifier())); 157 getTransformInfoUrl(transform.getIdentifier()));
149 158
150 if (candidateModelNames.size() > 1 && !generator) { 159 if (candidateModelNames.size() > 1 && !generator) {