KIPI::Plugin

Search for usage in LXR

#include <KIPI/Plugin>

Inheritance diagram for KIPI::Plugin:

Public Member Functions

 Plugin (QObject *const parent, const char *name)
 
 ~Plugin () override
 
QList< QAction * > actions (QWidget *const widget=nullptr) const
 
Category category (QAction *const action) const
 
Interfaceinterface () const
 
void rebuild ()
 
virtual void setup (QWidget *const widget)=0
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () 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< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, 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 QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () 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
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const 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)
 
QThreadthread () const const
 
- Public Member Functions inherited from KXMLGUIClient
 KXMLGUIClient (KXMLGUIClient *parent)
 
QActionaction (const char *name) const
 
virtual QActionaction (const QDomElement &element) const
 
virtual KActionCollectionactionCollection () const
 
QList< KXMLGUIClient * > childClients ()
 
KXMLGUIBuilderclientBuilder () const
 
virtual QString componentName () const
 
virtual QDomDocument domDocument () const
 
KXMLGUIFactoryfactory () const
 
void insertChildClient (KXMLGUIClient *child)
 
KXMLGUIClientparentClient () 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)
 
virtual QString xmlFile () const
 
QDomDocument xmlguiBuildDocument () const
 

Protected Member Functions

void addAction (const QString &name, QAction *const action)
 
void addAction (const QString &name, QAction *const action, Category cat)
 
Category defaultCategory () const
 
void setDefaultCategory (Category cat)
 
void setUiBaseName (const char *name)
 
void setupXML ()
 
QString uiBaseName () const
 
- Protected Member Functions inherited from QObject
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
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Member Functions inherited from KXMLGUIClient
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

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
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 *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
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, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Public Member Functions inherited from KXMLGUIClient
static QString findVersionNumber (const QString &xml)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Static Protected Member Functions inherited from KXMLGUIClient
static QString standardsXmlFileLocation ()
 

Detailed Description

Base class for the KIPI plugins.

Definition at line 62 of file plugin.h.

Constructor & Destructor Documentation

KIPI::Plugin::Plugin ( QObject *const  parent,
const char *  name 
)

Constructs a plugin.

Parameters
parentthe parent of this object
namethe name of the plugin

Definition at line 177 of file plugin.cpp.

KIPI::Plugin::~Plugin ( )
override

Standard destructor.

All the actions in the actionCollection are deleted before the plugin is deleted.

Definition at line 183 of file plugin.cpp.

Member Function Documentation

QList< QAction * > KIPI::Plugin::actions ( QWidget *const  widget = nullptr) const

Returns the plugin actions associated with passed widget, or with the default widget, if widget is a nullptr.

The actions are in the same order as added to the plugin.

Definition at line 188 of file plugin.cpp.

void KIPI::Plugin::addAction ( const QString name,
QAction *const  action 
)
protected

Register an action to the plugin instance and add it to the action collection.

The action is added only if the action name is not in the disabled actions list of the PluginLoader singleton class.

Parameters
namethe name by which the action will be added to the action collection
actionthe action to add
Note
It just calls addAction(const QString&, QAction* const, Category) with the default category, so the default category must be set using setDefaultCategory() before you use this method

Definition at line 201 of file plugin.cpp.

void KIPI::Plugin::addAction ( const QString name,
QAction *const  action,
Category  cat 
)
protected

Register action to the plugin instance and add it to the action collection.

The action is added only if the action name is not in the disabled actions list of the PluginLoader singleton class.

Parameters
namethe name by which the action will be added to the action collection
actionthe action to add
catthe category of the action

Definition at line 222 of file plugin.cpp.

Category KIPI::Plugin::category ( QAction *const  action) const

Returns the category of the specified plugin action, or InvalidCategory if the action is not recognised.

Definition at line 257 of file plugin.cpp.

Category KIPI::Plugin::defaultCategory ( ) const
protected

Returns the default category of the plugin actions.

See also
setDefaultCategory()

Definition at line 469 of file plugin.cpp.

Interface * KIPI::Plugin::interface ( ) const

Returns the KIPI::Interface.

Definition at line 277 of file plugin.cpp.

void KIPI::Plugin::rebuild ( )

Force the plugin to reread and to reload its XML file.

Definition at line 453 of file plugin.cpp.

void KIPI::Plugin::setDefaultCategory ( Category  cat)
protected

Sets the default category of the plugin actions.

See also
defaultCategory()

Definition at line 464 of file plugin.cpp.

void KIPI::Plugin::setUiBaseName ( const char *  name)
protected

Sets the name of the XML file associated with this KXMLGUIClient.

You must provide only the filename without slashes.

The default XML file must be installed in the dir ${KDE_INSTALL_KXMLGUI5DIR}/kipi, modifications will be stored in the local config dir.

See also
uiBaseName()

Definition at line 282 of file plugin.cpp.

void KIPI::Plugin::setup ( QWidget *const  widget)
pure virtual

Virtual method that must be overridden by the non abstract descendants and must be called before any actions are added.

Parameters
widgetThe widget which holds the plugin. It will be set as the default widget.

Definition at line 250 of file plugin.cpp.

void KIPI::Plugin::setupXML ( )
protected

Adapt the XML file of the plugin with the one of the KXmlGuiWindow main window.

It's recommended to call it on every creation of the plugin.

Note
the XML file of the plugin must be set using setUiBaseName()

Definition at line 448 of file plugin.cpp.

QString KIPI::Plugin::uiBaseName ( ) const
protected

Return the base name of the XML file associated with this KXMLGUIClient.

See also
setUiBaseName()

Definition at line 288 of file plugin.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jan 22 2022 22:32:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.