libKipi
pluginloader.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of kipi-plugins project
4 * http://www.kipi-plugins.org
5 *
6 * Date : 2004-02-01
7 * Description : plugin loader
8 *
9 * Copyright (C) 2004-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * Copyright (C) 2004-2005 by Renchi Raju <renchi.raju at kdemail.net>
11 *
12 * This program is free software; you can redistribute it
13 * and/or modify it under the terms of the GNU General
14 * Public License as published by the Free Software Foundation;
15 * either version 2, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * ============================================================ */
23
24#ifndef KIPI_PLUGINLOADER_H
25#define KIPI_PLUGINLOADER_H
26
27// Qt includes.
28
29#include <qwidget.h>
30#include <qscrollview.h>
31
32// Local includes.
33
34#include "libkipi/interface.h"
36
37namespace KIPI
38{
39 class Plugin;
40 class Interface;
41 class ConfigWidget;
42
43 class LIBKIPI_EXPORT PluginLoader :public QObject
44 {
45 Q_OBJECT
46
47 public:
48
50 {
51
52 public:
53
54 Info( const QString& name, const QString& comment, const QString& library, bool shouldLoad );
55 ~Info();
56
57 QString name() const;
58
59 QString comment() const;
60
61 QString library() const;
62
63 Plugin* plugin() const;
64 void setPlugin(Plugin*);
65
66 bool shouldLoad() const;
67 void setShouldLoad(bool);
68
69 private:
70
71 struct Private;
72 Private* d;
73 };
74
75 PluginLoader( const QStringList& ignores, Interface* interface );
76 virtual ~PluginLoader();
77 void loadPlugins();
78 static PluginLoader* instance();
79 ConfigWidget* configWidget( QWidget* parent );
80
81 typedef QValueList<Info*> PluginList;
82
83 const PluginList& pluginList();
84
85 void loadPlugin( Info* );
86
87 signals:
88
91 void replug();
92
93 private:
94
95 friend class ConfigWidget;
96 friend class PluginCheckBox;
97
98 struct Private;
99 Private* d;
100 };
101
102 class LIBKIPI_EXPORT ConfigWidget :public QScrollView
103 {
104 Q_OBJECT
105
106 public:
107
108 ConfigWidget( QWidget* parent );
110
111 public slots:
112
113 void apply();
114
115 private:
116
117 struct Private;
118 Private* d;
119 };
120}
121
122#endif /* PLUGINLOADER_H */
Definition pluginloader.h:103
Definition interface.h:64
Definition pluginloader.cpp:320
Definition pluginloader.h:50
Definition pluginloader.h:44
QValueList< Info * > PluginList
Definition pluginloader.h:81
void unplug(KIPI::PluginLoader::Info *)
void plug(KIPI::PluginLoader::Info *)
Definition plugin.h:59
#define LIBKIPI_EXPORT
Definition libkipi_export.h:35
Definition batchprogressdialog.cpp:70
Definition pluginloader.cpp:332
Definition pluginloader.cpp:125
Definition pluginloader.cpp:192