diff options
| -rw-r--r-- | src/qmmp/effect.cpp | 13 | ||||
| -rw-r--r-- | src/qmmp/effect.h | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/qmmp/effect.cpp b/src/qmmp/effect.cpp index 97b7104d3..008c5efac 100644 --- a/src/qmmp/effect.cpp +++ b/src/qmmp/effect.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2014 by Ilya Kotov * + * Copyright (C) 2007-2017 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -179,3 +179,14 @@ bool Effect::isEnabled(EffectFactory* factory) loadPlugins(); return m_enabledNames.contains(factory->properties().shortName); } + +EffectFactory *Effect::findFactory(const QString &shortName) +{ + loadPlugins(); + foreach (EffectFactory *f, factories()) + { + if(shortName == f->properties().shortName) + return f; + } + return 0; +} diff --git a/src/qmmp/effect.h b/src/qmmp/effect.h index 731f8b539..36f5e532c 100644 --- a/src/qmmp/effect.h +++ b/src/qmmp/effect.h @@ -105,6 +105,8 @@ public: */ static bool isEnabled(EffectFactory* factory); + static EffectFactory *findFactory(const QString &shortName); + private: EffectFactory *m_factory; quint32 m_freq; |
