• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KParts

  • kparts
plugin.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
3 (C) 1999 David Faure <faure@kde.org>
4
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.
9
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.
14
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 Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20#ifndef PLUGIN_H
21#define PLUGIN_H
22
23#include <QtXml/QDomElement>
24#include <QtCore/QObject>
25#include <kaction.h>
26#include <kxmlguiclient.h>
27
28#include <kparts/kparts_export.h>
29
30class KComponentData;
31
32namespace KParts
33{
34
54class KPARTS_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
55{
56 Q_OBJECT
57public:
58 struct PluginInfo
59 {
60 QString m_relXMLFileName; // relative filename, i.e. kpartplugins/name
61 QString m_absXMLFileName; // full path of most recent filename matching the relative
62 // filename
63 QDomDocument m_document;
64 };
65
69 Plugin( QObject* parent = 0 );
73 virtual ~Plugin();
74
78 virtual QString xmlFile() const;
79
83 virtual QString localXMLFile() const;
84
92 static void loadPlugins( QObject *parent, const KComponentData &instance );
93
101 static void loadPlugins( QObject *parent, const QList<PluginInfo> &pluginInfos );
102
110 static void loadPlugins( QObject *parent, const QList<PluginInfo> &pluginInfos, const KComponentData &instance );
111
149 static void loadPlugins(QObject *parent, KXMLGUIClient* parentGUIClient,
150 const KComponentData &instance, bool enableNewPluginsByDefault = true,
151 int interfaceVersionRequired = 0);
152
158 static QList<Plugin *> pluginObjects( QObject *parent );
159
160protected:
166 static QList<Plugin::PluginInfo> pluginInfos(const KComponentData &instance);
167
172#ifndef KDE_NO_DEPRECATED
173 KDE_DEPRECATED static Plugin* loadPlugin( QObject * parent, const char* libname );
174#endif
175
180#ifndef KDE_NO_DEPRECATED
181 KDE_DEPRECATED static Plugin* loadPlugin( QObject * parent, const QByteArray &libname );
182#endif
183
188 static Plugin* loadPlugin( QObject * parent, const QString &libname );
189
190 static Plugin* loadPlugin( QObject * parent, const QString &libname, const QString &keyword );
191
192 virtual void setComponentData(const KComponentData &instance);
193
194private:
195 static bool hasPlugin( QObject* parent, const QString& library );
196 class PluginPrivate;
197 PluginPrivate* const d;
198};
199
200}
201
202#endif
KComponentData
KParts::Plugin
A plugin is the way to add actions to an existing KParts application, or to a Part.
Definition: plugin.h:55
KXMLGUIClient
QList
QObject
kaction.h
kparts_export.h
kxmlguiclient.h
KParts
KParts::Plugin::PluginInfo
Definition: plugin.h:59
KParts::Plugin::PluginInfo::m_relXMLFileName
QString m_relXMLFileName
Definition: plugin.h:60
KParts::Plugin::PluginInfo::m_absXMLFileName
QString m_absXMLFileName
Definition: plugin.h:61
KParts::Plugin::PluginInfo::m_document
QDomDocument m_document
Definition: plugin.h:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KParts

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal