KDE 4.4 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KPluginInfo Class Reference

from PyKDE4.kdecore import *

Detailed Description

Information about a plugin.

This holds all the information about a plugin there is. It's used for the user to decide whether he wants to use this plugin or not.

Author:
Matthias Kretz <kretz@kde.org>


Methods

 __init__ (self, QString filename, QString resource=0)
 __init__ (self, KService.Ptr service)
 __init__ (self)
 __init__ (self, KPluginInfo copy)
QString author (self)
QString category (self)
QString comment (self)
KConfigGroup config (self)
 defaults (self)
QStringList dependencies (self)
QString email (self)
QString entryPath (self)
KPluginInfo.List fromFiles (self, QStringList files, KConfigGroup config=KConfigGroup())
KPluginInfo.List fromKPartsInstanceName (self, QString componentName, KConfigGroup config=KConfigGroup())
KPluginInfo.List fromServices (self, KService.List services, KConfigGroup config=KConfigGroup())
KAboutLicense fullLicense (self)
QString icon (self)
bool isHidden (self)
bool isPluginEnabled (self)
bool isPluginEnabledByDefault (self)
bool isValid (self)
[KService.Ptr] kcmServices (self)
QString license (self)
 load (self, KConfigGroup config=KConfigGroup())
QString name (self)
bool operator != (self, KPluginInfo rhs)
bool operator < (self, KPluginInfo rhs)
bool operator == (self, KPluginInfo rhs)
bool operator > (self, KPluginInfo rhs)
QString pluginName (self)
QVariant property (self, QString key)
 save (self, KConfigGroup config=KConfigGroup())
KService.Ptr service (self)
 setConfig (self, KConfigGroup config)
 setPluginEnabled (self, bool enabled)
QString version (self)
QString website (self)

Method Documentation

__init__ (  self,
QString  filename,
QString  resource=0
)
__init__ (  self,
KService.Ptr  service
)
__init__ (   self )
__init__ (  self,
KPluginInfo  copy
)
QString author (   self )

Returns:
The author of this plugin.

QString category (   self )

Returns:
The category of this plugin (e.g. playlist/skin).

QString comment (   self )

Returns:
A comment describing the plugin.

KConfigGroup config (   self )

Returns:
If the KPluginInfo object has a KConfig object set return it, else returns an invalid KConfigGroup.

defaults (   self )

Restore defaults (enabled or not).

QStringList dependencies (   self )

Returns:
A list of plugins required for this plugin to be enabled. Use the pluginName in this list.

QString email (   self )

Returns:
The email address of the author.

QString entryPath (   self )

Returns:
The file containing the information about the plugin.

KPluginInfo.List fromFiles (  self,
QStringList  files,
KConfigGroup  config=KConfigGroup()
)

Returns:
A list of KPluginInfo objects constructed from a list of filenames. If you make a lookup using, for example, KStandardDirs.findAllResources() you pass the list of files to this function.

Parameters:
files  The list of files to construct the list of KPluginInfo objects from
config  The config group where to save/load whether the plugin is enabled/disabled

KPluginInfo.List fromKPartsInstanceName (  self,
QString  componentName,
KConfigGroup  config=KConfigGroup()
)

Returns:
A list of KPluginInfo objects for the KParts plugins of a component. You only need the name of the component not a pointer to the KComponentData object.

Parameters:
componentName  Use the component name to look up all KParts plugins for it.
config  The config group where to save/load whether the plugin is enabled/disabled

KPluginInfo.List fromServices (  self,
KService.List  services,
KConfigGroup  config=KConfigGroup()
)

Returns:
A list of KPluginInfo objects constructed from a list of KService objects. If you get a trader offer of the plugins you want to use you can just pass them to this function.

Parameters:
services  The list of services to construct the list of KPluginInfo objects from
config  The config group where to save/load whether the plugin is enabled/disabled

KAboutLicense fullLicense (   self )

Returns:
The full license object, according to the license keyword. It can be used to present friendlier and more detailed license info to the user, when the license is one of the widespread within KDE. For other licenses, the license object will state not very useful, "custom license" info (this can be identified by KAboutLicense.key() returning KAboutData.License_Custom).

See also:
KAboutLicense.byKeyword()
Since:
4.1

QString icon (   self )

Returns:
The iconname for this plugin

bool isHidden (   self )

Returns:
Whether the plugin should be hidden.

bool isPluginEnabled (   self )

Returns:
Whether the plugin is currently loaded.

See also:
setPluginEnabled()
See also:
load()

bool isPluginEnabledByDefault (   self )

Returns:
The default value whether the plugin is enabled or not. Defaults to the value set in the desktop file, or if that isn't set to false.

bool isValid (   self )

Returns whether the object is valid. Treat invalid KPluginInfo objects like you would treat a null pointer.

[KService.Ptr] kcmServices (   self )

Returns:
A list of Service pointers if the plugin installs one or more KCModule

QString license (   self )

Returns:
The license keyword of this plugin.

load (  self,
KConfigGroup  config=KConfigGroup()
)

Load the state of the plugin - enabled or not.

Parameters:
config  The KConfigGroup holding the information whether plugin is enabled.

QString name (   self )

Returns:
The user visible name of the plugin.

bool operator != (  self,
KPluginInfo  rhs
)

Compares two objects whether they don't share the same data.

bool operator < (  self,
KPluginInfo  rhs
)

Less than relation comparing the categories and if they are the same using the names.

bool operator == (  self,
KPluginInfo  rhs
)

Compares two objects whether they share the same data.

bool operator > (  self,
KPluginInfo  rhs
)

Greater than relation comparing the categories and if they are the same using the names.

QString pluginName (   self )

Returns:
The internal name of the plugin (for KParts Plugins this is the same name as set in the .rc file).

QVariant property (  self,
QString  key
)

Returns:
The value associated to the key. You can use it if you want to read custom values. To do this you need to define your own servicetype and add it to the ServiceTypes keys.

save (  self,
KConfigGroup  config=KConfigGroup()
)

Save state of the plugin - enabled or not.

Parameters:
config  The KConfigGroup holding the information whether plugin is enabled.

KService.Ptr service (   self )

Returns:
The KService object for this plugin. You might need it if you want to read custom values. To do this you need to define your own servicetype and add it to the ServiceTypes keys. Then you can use the KService.property() method to read your keys.

See also:
property()

setConfig (  self,
KConfigGroup  config
)

Set the KConfigGroup to use for load()ing and save()ing the configuration. This will be overridden by the KConfigGroup passed to save() or load() (if one is passed).

setPluginEnabled (  self,
bool  enabled
)

Set whether the plugin is currently loaded.

See also:
isPluginEnabled()
See also:
save()

QString version (   self )

Returns:
The version of the plugin.

QString website (   self )

Returns:
The website of the plugin/author.

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal