• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KParts

plugin.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
00003              (C) 1999 David Faure <faure@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 #ifndef PLUGIN_H
00021 #define PLUGIN_H
00022 
00023 #include <QtXml/QDomElement>
00024 #include <QtCore/QObject>
00025 #include <kaction.h>
00026 #include <kxmlguiclient.h>
00027 
00028 #include <kparts/kparts_export.h>
00029 
00030 class KComponentData;
00031 
00032 namespace KParts
00033 {
00034 
00054 class KPARTS_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
00055 {
00056     Q_OBJECT
00057 public:
00058     struct PluginInfo
00059     {
00060         QString m_relXMLFileName; // relative filename, i.e. kpartplugins/name
00061         QString m_absXMLFileName; // full path of most recent filename matching the relative
00062                                   // filename
00063         QDomDocument m_document;
00064     };
00065 
00069     Plugin( QObject* parent = 0 );
00073     virtual ~Plugin();
00074 
00078     virtual QString xmlFile() const;
00079 
00083     virtual QString localXMLFile() const;
00084 
00092     static void loadPlugins( QObject *parent, const KComponentData &instance );
00093 
00101     static void loadPlugins( QObject *parent, const QList<PluginInfo> &pluginInfos );
00102 
00110     static void loadPlugins( QObject *parent, const QList<PluginInfo> &pluginInfos, const KComponentData &instance );
00111 
00149     static void loadPlugins(QObject *parent, KXMLGUIClient* parentGUIClient,
00150             const KComponentData &instance, bool enableNewPluginsByDefault = true,
00151             int interfaceVersionRequired = 0);
00152 
00159     static QList<Plugin *> pluginObjects( QObject *parent );
00160 
00161 protected:
00167     static QList<Plugin::PluginInfo> pluginInfos(const KComponentData &instance);
00168 
00173     static Plugin* loadPlugin( QObject * parent, const char* libname );
00174 
00175     virtual void setComponentData(const KComponentData &instance);
00176 
00177 private:
00178     static bool hasPlugin( QObject* parent, const QString& library );
00179     class PluginPrivate;
00180     PluginPrivate* const d;
00181 };
00182 
00183 }
00184 
00185 #endif

KParts

Skip menu "KParts"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal