Kontact Plugin Interface Library
#include <plugin.h>
Inherits QObject, and KXMLGUIClient.
Public Slots | |
void | slotConfigUpdated () |
Public Member Functions | |
Plugin (Core *core, QObject *parent, const char *appName, const char *pluginName=0) | |
virtual | ~Plugin () |
virtual const KAboutData * | aboutData () const |
void | aboutToSelect () |
virtual void | bringToForeground () |
virtual bool | canDecodeMimeData (const QMimeData *data) const |
virtual void | configUpdated () |
Core * | core () const |
virtual bool | createDBUSInterface (const QString &serviceType) |
virtual Summary * | createSummaryWidget (QWidget *parent) |
bool | disabled () const |
QString | executableName () const |
QString | icon () const |
QString | identifier () const |
void | insertNewAction (KAction *action) |
void | insertSyncAction (KAction *action) |
virtual QStringList | invisibleToolbarActions () const |
virtual bool | isRunningStandalone () const |
QList< KAction * > | newActions () const |
KParts::ReadOnlyPart * | 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 bool | showInSideBar () const |
QList< KAction * > | syncActions () const |
virtual QString | tipFile () const |
QString | title () const |
virtual int | weight () const |
Protected Member Functions | |
virtual KParts::ReadOnlyPart * | createPart ()=0 |
KParts::ReadOnlyPart * | loadPart () |
virtual void | virtual_hook (int id, void *data) |
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 | ( | Core * | core, |
QObject * | parent, | ||
const char * | appName, | ||
const char * | pluginName = 0 |
||
) |
Creates a new plugin.
Private 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 75 of file plugin.cpp.
|
virtual |
Destroys the plugin.
Definition at line 89 of file plugin.cpp.
Member Function Documentation
|
virtual |
Reimplement this method if you want to add your credits to the Kontact about dialog.
Definition at line 156 of file plugin.cpp.
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 273 of file plugin.cpp.
|
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 366 of file plugin.cpp.
|
virtual |
Returns whether the plugin can handle the drag object of the given mime type.
Definition at line 250 of file plugin.cpp.
|
virtual |
This function is called whenever the config dialog has been closed successfully.
Definition at line 286 of file plugin.cpp.
Core * Plugin::core | ( | ) | const |
Returns a pointer to the kontact core object.
Definition at line 268 of file plugin.cpp.
|
virtual |
Create the D-Bus interface for the given serviceType
, if this plugin provides it.
Returns true
on success, false
otherwise.
Definition at line 140 of file plugin.cpp.
|
protectedpure virtual |
Reimplement and return the part here.
Reimplementing createPart() is mandatory!
|
virtual |
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 378 of file plugin.cpp.
bool Plugin::disabled | ( | ) | const |
Returns whether the plugin is disabled.
Definition at line 404 of file plugin.cpp.
QString Plugin::executableName | ( | ) | const |
Returns the name of the executable (if existent).
Definition at line 130 of file plugin.cpp.
QString Plugin::icon | ( | ) | const |
Returns the icon name that is used for the plugin.
Definition at line 120 of file plugin.cpp.
QString Plugin::identifier | ( | ) | const |
Returns the identifier of the plugin.
Definition at line 100 of file plugin.cpp.
void Plugin::insertNewAction | ( | KAction * | action | ) |
Inserts a custom "New" action
.
Definition at line 225 of file plugin.cpp.
void Plugin::insertSyncAction | ( | KAction * | action | ) |
Inserts a custom "Sync" action
.
Definition at line 230 of file plugin.cpp.
|
virtual |
Returns a list of action names that shall be hidden in the main toolbar.
Definition at line 245 of file plugin.cpp.
|
virtual |
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 146 of file plugin.cpp.
|
protected |
Returns the loaded part.
Definition at line 151 of file plugin.cpp.
QList< KAction * > Plugin::newActions | ( | ) | const |
Returns the list of custom "New" actions.
Definition at line 235 of file plugin.cpp.
KParts::ReadOnlyPart * Plugin::part | ( | ) |
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 189 of file plugin.cpp.
|
virtual |
Process drop event.
Definition at line 256 of file plugin.cpp.
|
virtual |
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 394 of file plugin.cpp.
|
virtual |
Session management: read properties.
Definition at line 260 of file plugin.cpp.
QString Plugin::registerClient | ( | ) |
Registers the client at DBus and returns the dbus identifier.
Definition at line 207 of file plugin.cpp.
|
virtual |
Session management: save properties.
Definition at line 264 of file plugin.cpp.
|
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 282 of file plugin.cpp.
void Plugin::setDisabled | ( | bool | value | ) |
Sets whether the plugin shall be disabled.
Definition at line 399 of file plugin.cpp.
void Plugin::setExecutableName | ( | const QString & | name | ) |
Sets the name
of executable (if existent).
Definition at line 125 of file plugin.cpp.
void Plugin::setIcon | ( | const QString & | icon | ) |
Sets the icon
name that is used for the plugin.
Definition at line 115 of file plugin.cpp.
void Plugin::setIdentifier | ( | const QString & | identifier | ) |
Sets the identifier
of the plugin.
Definition at line 95 of file plugin.cpp.
void Plugin::setPartLibraryName | ( | const QByteArray & | name | ) |
Set name
of library which contains the KPart used by this plugin.
Definition at line 135 of file plugin.cpp.
void Plugin::setShowInSideBar | ( | bool | hasPart | ) |
Set if the plugin provides a part that should be shown in the sidebar.
Definition at line 389 of file plugin.cpp.
void Plugin::setTitle | ( | const QString & | title | ) |
Sets the localized title
of the plugin.
Definition at line 105 of file plugin.cpp.
|
virtual |
Returns whether the plugin provides a part that should be shown in the sidebar.
Definition at line 384 of file plugin.cpp.
|
slot |
usage
This slot is called whenever the configuration has been changed.
Definition at line 361 of file plugin.cpp.
QList< KAction * > Plugin::syncActions | ( | ) | const |
Returns the list of custom "Sync" actions.
Definition at line 240 of file plugin.cpp.
|
virtual |
Reimplement this method and return the a path relative to "data" to the tips file.
The tips file contains hints/tips that are displayed at the beginning of the program as "tip of the day". It has nothing to do with tooltips.
Definition at line 202 of file plugin.cpp.
QString Plugin::title | ( | ) | const |
Returns the localized title of the plugin.
Definition at line 110 of file plugin.cpp.
|
protectedvirtual |
Virtual hook for BC extension.
Definition at line 409 of file plugin.cpp.
|
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 220 of file plugin.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:09 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.