KontactInterface::Plugin
#include <plugin.h>
Public Slots | |
void | slotConfigUpdated () |
Public Member Functions | |
Plugin (Core *core, QObject *parent, const KPluginMetaData &data, const char *appName, const char *pluginName=nullptr) | |
~Plugin () override | |
virtual const KAboutData | aboutData () |
void | aboutToSelect () |
virtual void | bringToForeground () |
virtual bool | canDecodeMimeData (const QMimeData *data) const |
virtual void | configUpdated () |
Core * | core () const |
virtual Summary * | createSummaryWidget (QWidget *parent) |
bool | disabled () const |
QString | executableName () const |
QString | icon () const |
QString | identifier () const |
void | insertNewAction (QAction *action) |
void | insertSyncAction (QAction *action) |
virtual QStringList | invisibleToolbarActions () const |
virtual bool | isRunningStandalone () const |
QList< QAction * > | newActions () const |
KParts::Part * | part () |
virtual void | processDropEvent (QDropEvent *) |
virtual bool | queryClose () const |
virtual void | readProperties (const KConfigGroup &) |
QString | registerClient () |
virtual void | saveProperties (KConfigGroup &) |
virtual void | select () |
void | setDisabled (bool value) |
void | setExecutableName (const QString &name) |
void | setIcon (const QString &icon) |
void | setIdentifier (const QString &identifier) |
void | setPartLibraryName (const QByteArray &name) |
void | setShowInSideBar (bool hasPart) |
void | setTitle (const QString &title) |
virtual void | shortcutChanged () |
virtual bool | showInSideBar () const |
QList< QAction * > | syncActions () const |
QString | title () const |
virtual int | weight () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QBindable< QString > | bindableObjectName () |
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 () const const |
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 QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isQuickItemType () const const |
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_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_GADGET_EXPORT (EXPORT_MACRO) | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_MOC_INCLUDE Q_MOC_INCLUDE | |
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 | 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 | setObjectName (QAnyStringView name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | setProperty (const char *name, QVariant &&value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
QThread * | thread () const const |
Public Member Functions inherited from KXMLGUIClient | |
KXMLGUIClient (KXMLGUIClient *parent) | |
virtual QAction * | action (const QDomElement &element) const |
QAction * | action (const QString &name) 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) |
virtual QString | xmlFile () const |
QDomDocument | xmlguiBuildDocument () const |
Protected Member Functions | |
virtual KParts::Part * | createPart ()=0 |
KParts::Part * | loadPart () |
void | virtual_hook (int id, void *data) override |
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 |
QObject * | sender () 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 | |
Public Types inherited from QObject | |
typedef | QObjectList |
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 *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) |
Static Public Member Functions inherited from KXMLGUIClient | |
static QString | findVersionNumber (const QString &xml) |
Static Protected Member Functions inherited from KXMLGUIClient | |
static QString | standardsXmlFileLocation () |
Detailed Description
Base class for all Plugins in Kontact.
Inherit from it to get a plugin. It can insert an icon into the sidepane, add widgets to the widgetstack and add menu items via XMLGUI.
Constructor & Destructor Documentation
◆ Plugin()
Plugin::Plugin | ( | Core * | core, |
QObject * | parent, | ||
const KPluginMetaData & | data, | ||
const char * | appName, | ||
const char * | pluginName = nullptr ) |
Creates a new plugin.
PluginPrivate class that helps to provide binary compatibility between releases.
- Parameters
-
core The core object that manages the plugin. parent The parent object. appName The name of the application that provides the part. This is the name used for DBus registration. It's ok to have several plugins using the same application name. pluginName The unique name of the plugin. Defaults to appName if not set.
Definition at line 58 of file plugin.cpp.
◆ ~Plugin()
|
override |
Destroys the plugin.
Definition at line 70 of file plugin.cpp.
Member Function Documentation
◆ aboutData()
|
nodiscardvirtual |
Reimplement this method if you want to add your credits to the Kontact about dialog.
Definition at line 130 of file plugin.cpp.
◆ aboutToSelect()
void Plugin::aboutToSelect | ( | ) |
Called by kontact when the plugin is selected by the user.
Calls the virtual method select(), but also handles some standard behavior like "invisible toolbar actions".
Definition at line 216 of file plugin.cpp.
◆ bringToForeground()
|
virtual |
Reimplement this method if your application needs a different approach to be brought in the foreground.
The default behaviour is calling the binary. This is only required if your part is also available as standalone application.
Definition at line 316 of file plugin.cpp.
◆ canDecodeMimeData()
|
nodiscardvirtual |
Returns whether the plugin can handle the drag object of the given mime type.
Definition at line 193 of file plugin.cpp.
◆ configUpdated()
|
virtual |
This function is called whenever the config dialog has been closed successfully.
Definition at line 229 of file plugin.cpp.
◆ core()
|
nodiscard |
Returns a pointer to the kontact core object.
Definition at line 211 of file plugin.cpp.
◆ createPart()
|
protectedpure virtual |
Reimplement and return the part here.
Reimplementing createPart() is mandatory!
◆ createSummaryWidget()
Reimplement this method if you want to add a widget for your application to Kontact's summary page.
- Parameters
-
parent The parent widget of the summary widget.
Definition at line 329 of file plugin.cpp.
◆ disabled()
|
nodiscard |
Returns whether the plugin is disabled.
Definition at line 355 of file plugin.cpp.
◆ executableName()
|
nodiscard |
Returns the name of the executable (if existent).
Definition at line 110 of file plugin.cpp.
◆ icon()
|
nodiscard |
Returns the icon name that is used for the plugin.
Definition at line 100 of file plugin.cpp.
◆ identifier()
|
nodiscard |
Returns the identifier of the plugin.
Definition at line 80 of file plugin.cpp.
◆ insertNewAction()
void Plugin::insertNewAction | ( | QAction * | action | ) |
Inserts a custom "New" action
.
- Parameters
-
action the new action to insert
Definition at line 168 of file plugin.cpp.
◆ insertSyncAction()
void Plugin::insertSyncAction | ( | QAction * | action | ) |
Inserts a custom "Sync" action
.
- Parameters
-
action the custom Sync action to insert
Definition at line 173 of file plugin.cpp.
◆ invisibleToolbarActions()
|
nodiscardvirtual |
Returns a list of action names that shall be hidden in the main toolbar.
Definition at line 188 of file plugin.cpp.
◆ isRunningStandalone()
|
nodiscardvirtual |
Reimplement this method and return whether a standalone application is still running.
This is only required if your part is also available as standalone application.
Definition at line 120 of file plugin.cpp.
◆ loadPart()
|
protected |
Returns the loaded part.
Definition at line 125 of file plugin.cpp.
◆ newActions()
Returns the list of custom "New" actions.
Definition at line 178 of file plugin.cpp.
◆ part()
|
nodiscard |
You can use this method if you need to access the current part.
You can be sure that you always get the same pointer as long as the part has not been deleted.
Definition at line 135 of file plugin.cpp.
◆ processDropEvent()
|
virtual |
Process drop event.
Definition at line 199 of file plugin.cpp.
◆ queryClose()
|
nodiscardvirtual |
Reimplement this method if you want to add checks before closing the main kontact window.
Return true if it's OK to close the window. If any loaded plugin returns false from this method, then the main kontact window will not close.
Definition at line 345 of file plugin.cpp.
◆ readProperties()
|
virtual |
Session management: read properties.
Definition at line 203 of file plugin.cpp.
◆ registerClient()
QString Plugin::registerClient | ( | ) |
Registers the client at DBus and returns the dbus identifier.
Definition at line 150 of file plugin.cpp.
◆ saveProperties()
|
virtual |
Session management: save properties.
Definition at line 207 of file plugin.cpp.
◆ select()
|
virtual |
This function is called when the plugin is selected by the user before the widget of the KPart belonging to the plugin is raised.
Definition at line 225 of file plugin.cpp.
◆ setDisabled()
void Plugin::setDisabled | ( | bool | value | ) |
Sets whether the plugin shall be disabled.
Definition at line 350 of file plugin.cpp.
◆ setExecutableName()
void Plugin::setExecutableName | ( | const QString & | name | ) |
Sets the name
of executable (if existent).
Definition at line 105 of file plugin.cpp.
◆ setIcon()
void Plugin::setIcon | ( | const QString & | icon | ) |
Sets the icon
name that is used for the plugin.
Definition at line 95 of file plugin.cpp.
◆ setIdentifier()
void Plugin::setIdentifier | ( | const QString & | identifier | ) |
Sets the identifier
of the plugin.
Definition at line 75 of file plugin.cpp.
◆ setPartLibraryName()
void Plugin::setPartLibraryName | ( | const QByteArray & | name | ) |
Set name
of library which contains the KPart used by this plugin.
Definition at line 115 of file plugin.cpp.
◆ setShowInSideBar()
void Plugin::setShowInSideBar | ( | bool | hasPart | ) |
Set if the plugin provides a part that should be shown in the sidebar.
- Parameters
-
hasPart shows part in sidebar if set as true
Definition at line 340 of file plugin.cpp.
◆ setTitle()
void Plugin::setTitle | ( | const QString & | title | ) |
Sets the localized title
of the plugin.
Definition at line 85 of file plugin.cpp.
◆ shortcutChanged()
|
virtual |
- Since
- 4.13
Definition at line 360 of file plugin.cpp.
◆ showInSideBar()
|
nodiscardvirtual |
Returns whether the plugin provides a part that should be shown in the sidebar.
Definition at line 335 of file plugin.cpp.
◆ slotConfigUpdated
|
slot |
usage
This slot is called whenever the configuration has been changed.
Definition at line 311 of file plugin.cpp.
◆ syncActions()
Returns the list of custom "Sync" actions.
Definition at line 183 of file plugin.cpp.
◆ title()
|
nodiscard |
Returns the localized title of the plugin.
Definition at line 90 of file plugin.cpp.
◆ virtual_hook()
|
overrideprotected |
Virtual hook for BC extension.
Definition at line 364 of file plugin.cpp.
◆ weight()
|
virtual |
Return the weight of the plugin.
The higher the weight the lower it will be displayed in the sidebar. The default implementation returns 0.
Definition at line 163 of file plugin.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.