3
* Copyright (C) 2002 George Staikos <staikos@kde.org>
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Library General Public License for more details.
15
* You should have received a copy of the GNU Library General Public License
16
* along with this library; see the file COPYING.LIB. If not, write to
17
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
22
#include "miscmanager.h"
24
#include "kdetvmiscplugin.h"
25
#include "pluginfactory.h"
29
MiscManager::MiscManager(PluginFactory *pf, QWidget* view)
36
MiscManager::~MiscManager()
38
while (KdetvMiscPlugin *p = _plugs.first()) {
44
void MiscManager::scanPlugins()
47
// kdDebug() << "MiscManager: Info: No screenwidget set. Cannot scan Misc plugins." << endl;
51
QPtrList<PluginDesc>& miscPlugins(_pf->miscPlugins());
53
for (PluginDesc *plug = miscPlugins.first(); plug;
54
plug = miscPlugins.next()) {
56
for (KdetvMiscPlugin *p = _plugs.first(); p; p = _plugs.next()) {
57
if (p->pluginDescription() == plug) {
70
kdDebug() << "MiscManager: Found a plugin: " << plug->name << endl;
72
KdetvMiscPlugin *p = _pf->getMiscPlugin(plug, _view);
76
kdDebug() << "MiscManager: The plugin is disabled" << endl;
80
bool MiscManager::filterNumberKey(int key)
82
for (KdetvMiscPlugin *p = _plugs.first(); p; p = _plugs.next())
83
if (p->filterNumberKey(key))
88
void MiscManager::setScreen(QWidget* screen)
94
#include "miscmanager.moc"