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
- Returns:
- The author of this plugin.
- Returns:
- The category of this plugin (e.g. playlist/skin).
- Returns:
- A comment describing the plugin.
- Returns:
- If the KPluginInfo object has a KConfig object set return
it, else returns an invalid KConfigGroup.
Restore defaults (enabled or not).
- Returns:
- A list of plugins required for this plugin to be enabled. Use
the pluginName in this list.
- Returns:
- The email address of the author.
- Returns:
- The file containing the information about the plugin.
- 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
|
- 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
|
- 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
|
- 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
- Returns:
- The iconname for this plugin
- 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.
Returns whether the object is valid. Treat invalid KPluginInfo objects like you would
treat a null pointer.
- Returns:
- A list of Service pointers if the plugin installs one or more
KCModule
- Returns:
- The license keyword of this plugin.
Load the state of the plugin - enabled or not.
- Parameters:
-
| config | The KConfigGroup holding the information whether
plugin is enabled.
|
- Returns:
- The user visible name of the plugin.
Compares two objects whether they don't share the same data.
Less than relation comparing the categories and if they are the same using the names.
Compares two objects whether they share the same data.
Greater than relation comparing the categories and if they are the same using the names.
- Returns:
- The internal name of the plugin (for KParts Plugins this is
the same name as set in the .rc file).
- 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 state of the plugin - enabled or not.
- Parameters:
-
| config | The KConfigGroup holding the information whether
plugin is enabled.
|
- 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()
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()
- Returns:
- The version of the plugin.
- Returns:
- The website of the plugin/author.