# HG changeset patch # User Chris Cannam # Date 1407944523 -3600 # Node ID ad168a6510f0324e96e703f9fff4bad7b53e569d # Parent 71b21d6e66bedec420c916f049e0e97dd02afed2 Make it possible to set the parent widget diff -r 71b21d6e66be -r ad168a6510f0 framework/TransformUserConfigurator.cpp --- a/framework/TransformUserConfigurator.cpp Wed Aug 13 15:05:19 2014 +0100 +++ b/framework/TransformUserConfigurator.cpp Wed Aug 13 16:42:03 2014 +0100 @@ -30,6 +30,14 @@ #include +static QWidget *parentWidget = 0; + +void +TransformUserConfigurator::setParentWidget(QWidget *w) +{ + parentWidget = w; +} + bool TransformUserConfigurator::getChannelRange(TransformId identifier, Vamp::PluginBase *plugin, @@ -142,7 +150,8 @@ int defaultChannel = -1; //!!! no longer saved! [was context.channel] - PluginParameterDialog *dialog = new PluginParameterDialog(plugin); + PluginParameterDialog *dialog = new PluginParameterDialog + (plugin, parentWidget); dialog->setMoreInfoUrl(TransformFactory::getInstance()-> getTransformInfoUrl(transform.getIdentifier())); diff -r 71b21d6e66be -r ad168a6510f0 framework/TransformUserConfigurator.h --- a/framework/TransformUserConfigurator.h Wed Aug 13 15:05:19 2014 +0100 +++ b/framework/TransformUserConfigurator.h Wed Aug 13 16:42:03 2014 +0100 @@ -33,6 +33,8 @@ QStringList candidateModelNames, QString defaultModelName); + static void setParentWidget(QWidget *); + private: bool getChannelRange(TransformId identifier, Vamp::PluginBase *plugin, int &min, int &max);