plugin.h
/* This file is part of the KDE project
Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
(C) 1999 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef PLUGIN_H
#define PLUGIN_H
#include <qobject.h>
#include <kaction.h>
#include <kxmlguiclient.h>
class KInstance;
namespace KParts
{
class KPARTS_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
{
Q_OBJECT
public:
struct PluginInfo
{
QString m_relXMLFileName;
QString m_absXMLFileName;
QDomDocument m_document;
};
Plugin( QObject* parent = 0, const char* name = 0 );
virtual ~Plugin();
virtual QString xmlFile() const;
virtual QString localXMLFile() const;
static void loadPlugins( QObject *parent, const KInstance * instance );
static void loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos );
static void loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos, const KInstance * instance );
static void loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault = true );
static QPtrList<Plugin> pluginObjects( QObject *parent );
protected:
static QValueList<Plugin::PluginInfo> pluginInfos( const KInstance * instance );
static Plugin* loadPlugin( QObject * parent, const char* libname );
virtual void setInstance( KInstance *instance );
private:
static bool hasPlugin( QObject* parent, const QString& library );
class PluginPrivate;
PluginPrivate *d;
};
}
#endif
KXMLGUIClient
KParts::Plugin::PluginInfo::m_relXMLFileName
QString m_relXMLFileName
relative filename, i.e. kpartplugins/name
Definition: plugin.h:58
KInstance
KParts::Plugin::PluginInfo
Struct holding information about a plugin.
Definition: plugin.h:56
KParts::Plugin::PluginInfo::m_absXMLFileName
QString m_absXMLFileName
full path of most recent filename matching the relative filename
Definition: plugin.h:59
KParts::Plugin
A plugin is the way to add actions to an existing KParts application, or to a Part.
Definition: plugin.h:49

KDE Home | KDE Accessibility Home | Description of Access Keys