KParts::Plugin
#include <KParts/Plugin>

Public Member Functions | |
Plugin (QObject *parent=nullptr) | |
~Plugin () override | |
QString | localXMLFile () const override |
QString | xmlFile () const override |
![]() | |
QObject (QObject *parent) | |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () |
void | dumpObjectInfo () const const |
void | dumpObjectTree () |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
T | qobject_cast (const QObject *object) |
T | qobject_cast (QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
QThread * | thread () const const |
![]() | |
KXMLGUIClient (KXMLGUIClient *parent) | |
QAction * | action (const char *name) const |
virtual QAction * | action (const QDomElement &element) const |
virtual KActionCollection * | actionCollection () const |
QList< KXMLGUIClient * > | childClients () |
KXMLGUIBuilder * | clientBuilder () const |
virtual QString | componentName () const |
virtual QDomDocument | domDocument () const |
KXMLGUIFactory * | factory () const |
void | insertChildClient (KXMLGUIClient *child) |
KXMLGUIClient * | parentClient () const |
void | plugActionList (const QString &name, const QList< QAction * > &actionList) |
void | reloadXML () |
void | removeChildClient (KXMLGUIClient *child) |
void | replaceXMLFile (const QString &xmlfile, const QString &localxmlfile, bool merge=false) |
void | setClientBuilder (KXMLGUIBuilder *builder) |
void | setFactory (KXMLGUIFactory *factory) |
void | setXMLGUIBuildDocument (const QDomDocument &doc) |
void | unplugActionList (const QString &name) |
QDomDocument | xmlguiBuildDocument () const |
Static Public Member Functions | |
static void | loadPlugins (QObject *parent, const QList< PluginInfo > &pluginInfos) |
static void | loadPlugins (QObject *parent, const QList< PluginInfo > &pluginInfos, const QString &instance) |
static void | loadPlugins (QObject *parent, const QString &instance) |
static void | loadPlugins (QObject *parent, KXMLGUIClient *parentGUIClient, const QString &instance, bool enableNewPluginsByDefault=true, int interfaceVersionRequired=0) |
static QList< Plugin * > | pluginObjects (QObject *parent) |
![]() | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
static QString | findVersionNumber (const QString &xml) |
Protected Member Functions | |
virtual void | setComponentData (const KAboutData &pluginData) |
void | setMetaData (const KPluginMetaData &metaData) |
![]() | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
void | loadStandardsXmlFile () |
virtual void | setComponentName (const QString &componentName, const QString &componentDisplayName) |
virtual void | setDOMDocument (const QDomDocument &document, bool merge=false) |
virtual void | setLocalXMLFile (const QString &file) |
virtual void | setXML (const QString &document, bool merge=false) |
virtual void | setXMLFile (const QString &file, bool merge=false, bool setXMLDoc=true) |
virtual void | stateChanged (const QString &newstate, ReverseStateChange reverse=StateNoReverse) |
Additional Inherited Members | |
![]() | |
objectName | |
![]() | |
typedef | QObjectList |
![]() | |
static QString | standardsXmlFileLocation () |
Detailed Description
A plugin is the way to add actions to an existing KParts application, or to a Part.
The XML of those plugins looks exactly like of the shell or parts, with one small difference: The document tag should have an additional attribute, named "library", and contain the name of the library implementing the plugin.
If you want this plugin to be used by a part, you need to install the rc file under the directory "data" (KDEDIR/share/apps usually)+"/instancename/kpartplugins/" where instancename is the name of the part's instance.
You should also install a "plugin info" .desktop file with the same name.
- See also
- KPluginInfo
- Deprecated:
- Since 5.90, the concept of KPart plugins is deprecated. In the Konqueror KF5Konq lib is a reimplementation of this class, which is not deprecated. Consider porting your usage to this class or import the plugin in Konqueror.
Constructor & Destructor Documentation
◆ Plugin()
|
explicit |
Construct a new KParts plugin.
Definition at line 45 of file plugin.cpp.
◆ ~Plugin()
|
overridedefault |
Destructor.
Member Function Documentation
◆ loadPlugins() [1/4]
Load the plugin libraries specified by the list docs
and make the Plugin objects children of parent
.
It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins.
Definition at line 148 of file plugin.cpp.
◆ loadPlugins() [2/4]
|
static |
Load the plugin libraries specified by the list pluginInfos
, make the Plugin objects children of parent
, and use the given instance
.
It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins.
Definition at line 129 of file plugin.cpp.
◆ loadPlugins() [3/4]
Load the plugin libraries from the directories appropriate to instance
and make the Plugin objects children of parent
.
It is recommended to use the last loadPlugins method instead, to support enabling and disabling of plugins.
Definition at line 124 of file plugin.cpp.
◆ loadPlugins() [4/4]
|
static |
Load the plugin libraries for the given instance
, make the Plugin objects children of parent
, and insert the plugin as a child GUI client of parentGUIClient
.
This method uses the KConfig object of the given instance, to find out which plugins are enabled and which are disabled. What happens by default (i.e. for new plugins that are not in that config file) is controlled by enableNewPluginsByDefault
. It can be overridden by the plugin if it sets the X-KDE-PluginInfo-EnabledByDefault key in the .desktop file (with the same name as the .rc file)
If a disabled plugin is already loaded it will be removed from the GUI factory and deleted.
If you change the binary interface offered by your part, you can avoid crashes from old plugins lying around by setting X-KDE-InterfaceVersion=2 in the .desktop files of the plugins, and passing 2 to interfaceVersionRequired
, so that the old plugins are not loaded. Increase both numbers every time a binary incompatible change in the application's plugin interface is made.
This method is automatically called by KParts::Part and by KParts::MainWindow.
If you call this method in an already constructed GUI (like when the user has changed which plugins are enabled) you need to add the new plugins to the KXMLGUIFactory:
Definition at line 223 of file plugin.cpp.
◆ localXMLFile()
|
override |
Reimplemented for internal reasons.
Definition at line 67 of file plugin.cpp.
◆ pluginObjects()
|
static |
Returns a list of plugin objects loaded for parent
.
This functions basically iterates over the children of the given object and returns those that inherit from KParts::Plugin.
Definition at line 171 of file plugin.cpp.
◆ setComponentData()
|
protectedvirtual |
- Deprecated:
- Since 5.77, use setMetaData(const KPluginMetaData&) instead.
Definition at line 194 of file plugin.cpp.
◆ setMetaData()
|
protected |
- Since
- 5.77
Definition at line 209 of file plugin.cpp.
◆ xmlFile()
|
overridevirtual |
Reimplemented for internal reasons.
Reimplemented from KXMLGUIClient.
Definition at line 54 of file plugin.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Dec 1 2023 03:50:31 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.