PackageMetadata Class Reference
from PyKDE4.plasma import *
Namespace: Plasma
Detailed Description
PackageMetadata plasma/packagemetadata.h <Plasma/PackageMetadata>
Provides metadata for a Package.
Methods |
| __init__ (self, QString path=QString()) |
| __init__ (self, Plasma.PackageMetadata other) |
| __init__ (self) |
| __init__ (self, QString path) |
QString | application (self) |
QString | author (self) |
QString | category (self) |
QString | description (self) |
QString | email (self) |
QString | implementationApi (self) |
bool | isValid (self) |
QString | license (self) |
QString | name (self) |
QString | pluginName (self) |
| read (self, QString filename) |
QString | requiredVersion (self) |
QString | serviceType (self) |
| setApplication (self, QString a0) |
| setAuthor (self, QString a0) |
| setCategory (self, QString a0) |
| setDescription (self, QString a0) |
| setEmail (self, QString a0) |
| setImplementationApi (self, QString api) |
| setLicense (self, QString a0) |
| setName (self, QString a0) |
| setPluginName (self, QString name) |
| setRequiredVersion (self, QString a0) |
| setServiceType (self, QString a0) |
| setType (self, QString type) |
| setVersion (self, QString a0) |
| setWebsite (self, QString a0) |
QString | type (self) |
QString | version (self) |
QString | website (self) |
| write (self, QString filename) |
Method Documentation
__init__ |
( |
self, |
|
|
|
QString |
path=QString() |
|
) |
|
|
|
Constructs a metadata object using the values in the file at path
- Parameters:
-
| path | path to a metadata.desktop file
|
Reads in metadata from a file, which should be a .desktop
file. It writes out the information in a format that is compatible
with KPluginInfo
- See also:
- KPluginInfo
@arg filename path to the file to write to
setApplication |
( |
self, |
|
|
|
QString |
a0 |
|
) |
|
|
|
Set the name of the application this package may
belongs to. This is used only for display purposes
so far.
Set the name of the author of the package.
Sets the category this package belongs in
setDescription |
( |
self, |
|
|
|
QString |
a0 |
|
) |
|
|
|
Set the description used to provide some general
information what the package is about.
Set the E-Mail address of the author or of the project
that provided the package.
setImplementationApi |
( |
self, |
|
|
|
QString |
api |
|
) |
|
|
|
Set the implementation API this package uses.
Set the license the package is distributed under.
Set the name of the package used to displayed
a short describing name.
setPluginName |
( |
self, |
|
|
|
QString |
name |
|
) |
|
|
|
Set the plugin name of the package.
The plugin name is used to locate the package;
QString serviceName("plasma-applet-" + data.pluginName());
QString service = KStandardDirs.locateLocal("services", serviceName + ".desktop");
setRequiredVersion |
( |
self, |
|
|
|
QString |
a0 |
|
) |
|
|
|
Set the required version. See also the setVersion()
method.
setServiceType |
( |
self, |
|
|
|
QString |
a0 |
|
) |
|
|
|
Set the service-type which defines the X-KDE-ServiceTypes
type within the desktop file. If not defined this
defaults to "Plasma/Applet,Plasma/Containment" in the
desktop file.
Set the type of the package. If not defined this
defaults to "Service" in the desktop file.
Set the version of the package.
Set the website URL where the package is hosted or
where additional details about the project are available.
Writes out the metadata to filename, which should be a .desktop
file. It writes out the information in a format that is compatible
with KPluginInfo
- See also:
- KPluginInfo
@arg filename path to the file to write to