Package Class Reference
from PyKDE4.plasma import *
Namespace: Plasma
Detailed Description
Methods | |
| __init__ (self, QString packageRoot, QString package, Plasma.PackageStructure.Ptr structure) | |
| __init__ (self, QString packagePath, Plasma.PackageStructure.Ptr structure) | |
| __init__ (self, Plasma.Package a0) | |
| QStringList | entryList (self, QString fileType) |
| QString | filePath (self, QString fileType, QString filename) |
| QString | filePath (self, QString fileType) |
| bool | isValid (self) |
| Plasma.PackageMetadata | metadata (self) |
| QString | path (self) |
| Plasma.PackageStructure.Ptr | structure (self) |
Static Methods | |
| bool | createPackage (Plasma.PackageMetadata metadata, QString source, QString destination, QString icon=QString()) |
| bool | installPackage (QString package, QString packageRoot, QString servicePrefix) |
| QStringList | listInstalled (QString packageRoot) |
| bool | registerPackage (Plasma.PackageMetadata data, QString iconPath) |
| bool | uninstallPackage (QString package, QString packageRoot, QString servicePrefix) |
Method Documentation
Default constructor
@arg packageRoot path to the package installation root @arg package the name of the package @arg structure the package structure describing this package
| __init__ | ( | self, | ||
| QString | packagePath, | |||
| Plasma.PackageStructure.Ptr | structure | |||
| ) |
Construct a Package object.
@arg packagePath full path to the package directory @arg structure the package structure describing this package
| __init__ | ( | self, | ||
| Plasma.Package | a0 | |||
| ) |
| bool createPackage | ( | Plasma.PackageMetadata | metadata, | |
| QString | source, | |||
| QString | destination, | |||
| QString | icon=QString() | |||
| ) |
Creates a package based on the metadata from the files contained in the source directory
@arg metadata description of the package to create @arg source path to local directory containing the individual files to be added to the package @arg destination path to the package that should be created @arg icon path to the package icon
| QStringList entryList | ( | self, | ||
| QString | fileType | |||
| ) |
Get the list of files of a given type.
@arg fileType the type of file to look for, as defined in the package structure.
- Returns:
- list of files by name, suitable for passing to filePath
Get the path to a given file.
@arg fileType the type of file to look for, as defined in the package structure @arg filename the name of the file
- Returns:
- path to the file on disk. QString() if not found.
Get the path to a given file.
@arg fileType the type of file to look for, as defined in the package structure. The type must refer to a file in the package structure and not a directory.
- Returns:
- path to the file on disk. QString() if not found
Installs a package.
- Parameters:
-
package path to the Plasmagik package packageRoot path to the directory where the package should be installed to
- Returns:
- true on successful installation, false otherwise
| bool isValid | ( | self ) |
- Returns:
- true if all the required components as defined in the PackageStructure exist
| QStringList listInstalled | ( | QString | packageRoot | |
| ) |
Returns a list of all installed packages
- Parameters:
-
packageRoot path to the directory where Plasmagik packages have been installed to
- Returns:
- a list of installed Plasmagik packages
| Plasma.PackageMetadata metadata | ( | self ) |
- Returns:
- the package metadata object.
| QString path | ( | self ) |
- Returns:
- the path to the root of this particular package
| bool registerPackage | ( | Plasma.PackageMetadata | data, | |
| QString | iconPath | |||
| ) |
Registers a package described by the given desktop file
@arg the full path to the desktop file (must be KPluginInfo compatible)
- Returns:
- true on success, false on failure
| Plasma.PackageStructure.Ptr structure | ( | self ) |
- Returns:
- the PackageStructure use in this Package
KDE 4.2 PyKDE API Reference