Mercurial > hg > svapp
changeset 395:ad168a6510f0
Make it possible to set the parent widget
author | Chris Cannam |
---|---|
date | Wed, 13 Aug 2014 16:42:03 +0100 |
parents | 71b21d6e66be |
children | 2f54917f1599 |
files | framework/TransformUserConfigurator.cpp framework/TransformUserConfigurator.h |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <typeinfo> +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()));
--- 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);