diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-08-28 17:12:18 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-08-28 17:12:18 +0000 |
| commit | b3463bee9baed4d4f9e226763281be2d6b84f9af (patch) | |
| tree | 49aec324ef383621ae32e82695a2262d3a27910d /src | |
| parent | c95476a61feb818de25b26d0f7ad1dc274af2fd2 (diff) | |
| download | qmmp-b3463bee9baed4d4f9e226763281be2d6b84f9af.tar.gz qmmp-b3463bee9baed4d4f9e226763281be2d6b84f9af.tar.bz2 qmmp-b3463bee9baed4d4f9e226763281be2d6b84f9af.zip | |
added Effect::findFactory function
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7404 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -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; |
