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) | 
| QString | application (self) | 
| QString | author (self) | 
| QString | category (self) | 
| QString | description (self) | 
| QString | email (self) | 
| QString | icon (self) | 
| QString | implementationApi (self) | 
| bool | isValid (self) | 
| QStringList | keywords (self) | 
| QString | license (self) | 
| QString | name (self) | 
| QString | pluginName (self) | 
|  | read (self, QString filename) | 
| KUrl | remoteLocation (self) | 
| 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) | 
|  | setIcon (self, QString icon) | 
|  | setImplementationApi (self, QString api) | 
|  | setKeywords (self, QStringList keywords) | 
|  | setLicense (self, QString a0) | 
|  | setName (self, QString a0) | 
|  | setPluginName (self, QString name) | 
|  | setRemoteLocation (self, KUrl a0) | 
|  | 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 |  
 
 
| QString application | ( |  | self ) |  | 
 
 
| QString category | ( |  | self ) |  | 
 
 
| QString description | ( |  | self ) |  | 
 
 
Returns the icon name associated with this package, or QString() if none
- Since:
-  4.5
 
| QString implementationApi | ( |  | self ) |  | 
 
 
| QStringList keywords | ( |  | self ) |  | 
 
 
| QString pluginName | ( |  | self ) |  | 
 
 
| read | ( | self, |  | 
|  |  | QString | filename | 
|  | ) |  |  |  | 
 
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
- Parameters:
- 
|  | filename | path to the file to write to |  
 
 
| KUrl remoteLocation | ( |  | self ) |  | 
 
 
| QString requiredVersion | ( |  | self ) |  | 
 
 
| QString serviceType | ( |  | self ) |  | 
 
 
| setApplication | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
Set the name of the application this package may
belongs to. This is used only for display purposes
so far.
 
| setAuthor | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
Set the name of the author of the package.
 
| setCategory | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
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.
 
| setEmail | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
Set the E-Mail address of the author or of the project
that provided the package.
 
| setIcon | ( | self, |  | 
|  |  | QString | icon | 
|  | ) |  |  |  | 
 
Set the icon name to be used with this package
- Since:
-  4.5
 
| setImplementationApi | ( | self, |  | 
|  |  | QString | api | 
|  | ) |  |  |  | 
 
Set the implementation API this package uses.
 
| setKeywords | ( | self, |  | 
|  |  | QStringList | keywords | 
|  | ) |  |  |  | 
 
Set the keywords used to provide search and categorizations
- Parameters:
- 
|  | keywords | the keywords to associate with this package |  
 
 
| setLicense | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
Set the license the package is distributed under.
 
| setName | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
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");
 
| setRemoteLocation | ( | self, |  | 
|  |  | KUrl | a0 | 
|  | ) |  |  |  | 
 
Set the url where this package is hosted.
 
| 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.
 
| setType | ( | self, |  | 
|  |  | QString | type | 
|  | ) |  |  |  | 
 
Set the type of the package. If not defined this
defaults to "Service" in the desktop file.
 
| setVersion | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
Set the version of the package.
 
| setWebsite | ( | self, |  | 
|  |  | QString | a0 | 
|  | ) |  |  |  | 
 
Set the website URL where the package is hosted or
where additional details about the project are available.
 
| write | ( | self, |  | 
|  |  | QString | filename | 
|  | ) |  |  |  | 
 
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
- Parameters:
- 
|  | filename | path to the file to write to |