• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

libs/libkipi/libkipi

  • KIPI
  • Plugin
Public Member Functions | Protected Member Functions | List of all members
KIPI::Plugin Class Referenceabstract

#include <plugin.h>

Inheritance diagram for KIPI::Plugin:
Inheritance graph
[legend]

Public Member Functions

 Plugin (const KComponentData &instance, QObject *const parent, const char *name)
 
virtual ~Plugin ()
 
QList< KAction * > actions (QWidget *const widget=0) const
 
Category category (KAction *const action) const
 
Interface * interface () const
 
void rebuild ()
 
virtual void setup (QWidget *const widget)=0
 

Protected Member Functions

void addAction (const QString &name, KAction *const action)
 
void addAction (const QString &name, KAction *const action, Category cat)
 
Category defaultCategory () const
 
void setDefaultCategory (Category cat)
 
void setUiBaseName (const char *name)
 
void setupXML ()
 
QString uiBaseName () const
 

Detailed Description

Base class for the KIPI plugins.

TODO complete the documentation

Definition at line 79 of file plugin.h.

Constructor & Destructor Documentation

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

Constructs a plugin.

Parameters
instancethe KComponentData associated with this plugin
parentthe parent of this object
namethe name of the plugin

Definition at line 200 of file plugin.cpp.

KIPI::Plugin::~Plugin ( )
virtual

Standard destructor.

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

Definition at line 207 of file plugin.cpp.

Member Function Documentation

QList< KAction * > KIPI::Plugin::actions ( QWidget *const  widget = 0) const

Returns the plugin actions associated with the widget passed as argument, or with the default widget, if widget is null or not provided.

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

Definition at line 213 of file plugin.cpp.

void KIPI::Plugin::addAction ( const QString &  name,
KAction *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 with the default category, so the default category must be set using setDefaultCategory before you use this method

Definition at line 226 of file plugin.cpp.

void KIPI::Plugin::addAction ( const QString &  name,
KAction *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 247 of file plugin.cpp.

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

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

Definition at line 282 of file plugin.cpp.

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

Returns the default category of the plugin actions.

See also
setDefaultCategory()

Definition at line 486 of file plugin.cpp.

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

Returns the KIPI::Interface.

Definition at line 302 of file plugin.cpp.

void KIPI::Plugin::rebuild ( )

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

Definition at line 470 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 481 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 ${DATA_INSTALL_DIR}/kipi, modifications are stored in the local config dir of the KGlobal::mainComponent

See also
uiBaseName()

Definition at line 307 of file plugin.cpp.

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

Virtual method that must be overrided 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 275 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 465 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 313 of file plugin.cpp.


The documentation for this class was generated from the following files:
  • plugin.h
  • plugin.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libkipi/libkipi

Skip menu "libs/libkipi/libkipi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal