1
/***************************************************************************
4
begin : Sun Jun 13 2004
5
copyright : (C) 2004 by Dirk Ziegelmeier
7
***************************************************************************/
10
* This library is free software; you can redistribute it and/or
11
* modify it under the terms of the GNU Library General Public
12
* License as published by the Free Software Foundation; either
13
* version 2 of the License, or (at your option) any later version.
15
* This library is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
* Library General Public License for more details.
20
* You should have received a copy of the GNU Library General Public License
21
* along with this library; see the file COPYING.LIB. If not, write to
22
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
23
* Boston, MA 02110-1301, USA.
28
#include "filtermanager.h"
29
#include "kdetvfilterplugin.h"
30
#include "pluginfactory.h"
31
#include "kdetvvideo/kdetvimagefilter.h"
33
FilterManager::FilterManager(PluginFactory* pf)
37
_chain = new KdetvImageFilterChain();
38
_plugs.setAutoDelete(false);
42
FilterManager::~FilterManager()
48
void FilterManager::clear()
52
while (KdetvFilterPlugin *p = _plugs.first()) {
58
void FilterManager::scanPlugins()
62
QPtrList<PluginDesc>& filterPlugins(_pf->filterPlugins());
63
for (PluginDesc* plug = filterPlugins.first();
65
plug = filterPlugins.next()) {
67
KdetvFilterPlugin* p = _pf->getFilterPlugin(plug);
69
_chain->append(p->getFilter());
70
break; // There must be only one enabled filter plugin
74
QPtrList<PluginDesc>& postProcessPlugins(_pf->postProcessPlugins());
75
for (PluginDesc* plug = postProcessPlugins.first();
77
plug = postProcessPlugins.next()) {
79
KdetvFilterPlugin* p = _pf->getPostProcessPlugin(plug);
81
_chain->append(p->getFilter());
86
#include "filtermanager.moc"
88
// vim: sw=4 ts=4 noet