kontact
Kontact::Plugin Class Reference
#include <plugin.h>

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.
Definition at line 58 of file plugin.h.
Public Slots | |
void | slotConfigUpdated () |
Public Member Functions | |
Plugin (Core *core, QObject *parent, const char *name) | |
void | setIdentifier (const QString &identifier) |
QString | identifier () const |
void | setTitle (const QString &title) |
QString | title () const |
void | setIcon (const QString &icon) |
QString | icon () const |
void | setExecutableName (const QString &bin) |
QString | executableName () const |
void | setPartLibraryName (const QCString &) |
virtual bool | createDCOPInterface (const QString &) |
virtual bool | isRunningStandalone () |
virtual void | bringToForeground () |
virtual const KAboutData * | aboutData () |
KParts::ReadOnlyPart * | part () |
virtual QString | tipFile () const |
virtual void | select () |
virtual void | configUpdated () |
virtual Summary * | createSummaryWidget (QWidget *) |
virtual bool | showInSideBar () const |
void | setShowInSideBar (bool hasPart) |
virtual bool | queryClose () const |
DCOPClient * | dcopClient () const |
virtual int | weight () const |
void | insertNewAction (KAction *action) |
void | insertSyncAction (KAction *action) |
QPtrList< KAction > * | newActions () const |
QPtrList< KAction > * | syncActions () const |
virtual QStringList | invisibleToolbarActions () const |
virtual bool | canDecodeDrag (QMimeSource *) |
virtual void | processDropEvent (QDropEvent *) |
virtual void | loadProfile (const QString &directoryPath) |
virtual void | saveToProfile (const QString &directoryPath) const |
virtual void | readProperties (KConfig *) |
virtual void | saveProperties (KConfig *) |
Core * | core () const |
bool | disabled () const |
void | setDisabled (bool v) |
Protected Member Functions | |
virtual KParts::ReadOnlyPart * | createPart ()=0 |
KParts::ReadOnlyPart * | loadPart () |
virtual void | virtual_hook (int id, void *data) |
Constructor & Destructor Documentation
Plugin::Plugin | ( | Kontact::Core * | core, | |
QObject * | parent, | |||
const char * | name | |||
) |
Creates a new Plugin, note that name parameter name is required if you want your plugin to do dcop via it's own instance of DCOPClient by calling dcopClient.
- Note:
- name MUST be the name of the application that provides the part! This is the name used for DCOP registration. It's ok to have several plugins using the same application name.
Definition at line 56 of file plugin.cpp.
Member Function Documentation
void Plugin::setIdentifier | ( | const QString & | identifier | ) |
QString Plugin::identifier | ( | ) | const |
Returns the identifier.
It is used as argument for several methods of Kontacts core.
Definition at line 84 of file plugin.cpp.
void Plugin::setTitle | ( | const QString & | title | ) |
QString Plugin::title | ( | ) | const |
void Plugin::setIcon | ( | const QString & | icon | ) |
QString Plugin::icon | ( | ) | const |
void Plugin::setExecutableName | ( | const QString & | bin | ) |
QString Plugin::executableName | ( | ) | const |
void Plugin::setPartLibraryName | ( | const QCString & | libName | ) |
Set name of library which contains the KPart used by this plugin.
Definition at line 119 of file plugin.cpp.
virtual bool Kontact::Plugin::createDCOPInterface | ( | const QString & | ) | [inline, virtual] |
virtual bool Kontact::Plugin::isRunningStandalone | ( | ) | [inline, virtual] |
void Plugin::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 219 of file plugin.cpp.
const KAboutData * Plugin::aboutData | ( | ) | [virtual] |
Reimplement this method if you want to add your credits to the Kontact about dialog.
Definition at line 129 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 145 of file plugin.cpp.
QString Plugin::tipFile | ( | ) | const [virtual] |
Reimplement this method and return the a path relative to "data" to the tips file.
Definition at line 157 of file plugin.cpp.
void Plugin::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 201 of file plugin.cpp.
void Plugin::configUpdated | ( | ) | [virtual] |
This function is called whenever the config dialog has been closed successfully.
Definition at line 205 of file plugin.cpp.
virtual Summary* Kontact::Plugin::createSummaryWidget | ( | QWidget * | ) | [inline, virtual] |
bool Kontact::Plugin::showInSideBar | ( | ) | const [virtual] |
Returns whether the plugin provides a part that should be shown in the sidebar.
Definition at line 225 of file plugin.cpp.
void Kontact::Plugin::setShowInSideBar | ( | bool | hasPart | ) |
Set if the plugin provides a part that should be shown in the sidebar.
Definition at line 230 of file plugin.cpp.
virtual bool Kontact::Plugin::queryClose | ( | ) | const [inline, virtual] |
DCOPClient * Plugin::dcopClient | ( | ) | const |
Retrieve the current DCOP Client for the plugin.
The clients name is taken from the name argument in the constructor.
- Note:
- : The DCOPClient object will only be created when this method is called for the first time. Make sure that the part has been loaded before calling this method, if it's the one that contains the DCOP interface that other parts might use.
Definition at line 163 of file plugin.cpp.
virtual int Kontact::Plugin::weight | ( | ) | const [inline, virtual] |
void Plugin::insertNewAction | ( | KAction * | action | ) |
void Plugin::insertSyncAction | ( | KAction * | action | ) |
QPtrList< KAction > * Plugin::newActions | ( | ) | const |
QPtrList< KAction > * Plugin::syncActions | ( | ) | const |
virtual QStringList Kontact::Plugin::invisibleToolbarActions | ( | ) | const [inline, virtual] |
virtual bool Kontact::Plugin::canDecodeDrag | ( | QMimeSource * | ) | [inline, virtual] |
virtual void Kontact::Plugin::processDropEvent | ( | QDropEvent * | ) | [inline, virtual] |
virtual void Kontact::Plugin::readProperties | ( | KConfig * | ) | [inline, virtual] |
virtual void Kontact::Plugin::saveProperties | ( | KConfig * | ) | [inline, virtual] |
void Plugin::slotConfigUpdated | ( | ) | [slot] |
virtual KParts::ReadOnlyPart* Kontact::Plugin::createPart | ( | ) | [protected, pure virtual] |
Reimplement and return the part here.
Reimplementing createPart() is mandatory!
The documentation for this class was generated from the following files: