Entry Class Reference
from PyKDE4.knewstuff import *
Namespace: KNS
Detailed Description
KNewStuff data entry container.
This class provides accessor methods to the data objects as used by KNewStuff. It should probably not be used directly by the application.
Maintainer: Josef Spillner (spillner@kde.org)
Method Documentation
__init__ | ( | self ) |
Constructor.
__init__ | ( | self, | ||
KNS.Entry | other | |||
) |
KNS.Author author | ( | self ) |
Retrieve the author of the object.
- Returns:
- object author
QString category | ( | self ) |
Retrieve the category of the data object.
- Returns:
- object category
QString checksum | ( | self ) |
Returns the checksum for the entry.
If an empty string is returned, no checksum was assigned.
- Returns:
- Checksum of this entry
int downloads | ( | self ) |
Retrieve the download count for the object, which has been determined by its hosting sites and thus might change over time.
- Returns:
- object download count
int idNumber | ( | self ) |
QStringList installedFiles | ( | self ) |
Retrieve the locally installed files.
- Returns:
- file names
QString license | ( | self ) |
Retrieve the license name of the object.
- Returns:
- object license
KNS.KTranslatable name | ( | self ) |
Retrieve the name of the data object.
- Returns:
- object name (potentially translated)
KNS.KTranslatable payload | ( | self ) |
Retrieve the file name of the object.
- Returns:
- object filename
KNS.KTranslatable preview | ( | self ) |
Retrieve the file name of an image containing a preview of the object.
- Returns:
- object preview filename
int rating | ( | self ) |
Retrieve the rating for the object, which has been determined by its users and thus might change over time.
- Returns:
- object rating
int release | ( | self ) |
Retrieve the release number of the object
- Returns:
- object release
QDate releaseDate | ( | self ) |
Retrieve the date of the object's publication.
- Returns:
- object release date
setAuthor | ( | self, | ||
KNS.Author | author | |||
) |
Sets the author of the object.
setCategory | ( | self, | ||
QString | category | |||
) |
Sets the data category, e.g. 'kdesktop/wallpaper'.
setChecksum | ( | self, | ||
QString | checksum | |||
) |
Sets the checksum of the entry. This will be a string representation of an MD5 sum of the entry's selected payload file.
checksum Checksum for the entry
setDownloads | ( | self, | ||
int | downloads | |||
) |
Sets the number of downloads.
- Internal:
setIdNumber | ( | self, | ||
int | number | |||
) |
setInstalledFiles | ( | self, | ||
QStringList | files | |||
) |
Set the files that have been installed by the install command.
- Parameters:
-
files local file names
setLicense | ( | self, | ||
QString | license | |||
) |
Sets the license (abbreviation) applicable to the object.
setName | ( | self, | ||
KNS.KTranslatable | name | |||
) |
Sets the name for this data object.
setPayload | ( | self, | ||
KNS.KTranslatable | url | |||
) |
Sets the object's file.
setPreview | ( | self, | ||
KNS.KTranslatable | url | |||
) |
Sets the object's preview file, if available. This should be a picture file.
setRating | ( | self, | ||
int | rating | |||
) |
Sets the rating between 0 (worst) and 100 (best).
- Internal:
setRelease | ( | self, | ||
int | release | |||
) |
Sets the release number, which is increased for feature-equal objects with the same version number, but slightly updated contents.
setReleaseDate | ( | self, | ||
QDate | releasedate | |||
) |
Sets the release date.
setSignature | ( | self, | ||
QString | signature | |||
) |
Sets the signature of the entry. This will be a digital signature in OpenPGP-compliant format.
signature Signature for the entry
setSource | ( | self, | ||
KNS.Entry.Source | source | |||
) |
setStatus | ( | self, | ||
KNS.Entry.Status | status | |||
) |
Sets the entry's status. If no status is set, the default will be Invalid.
- Parameters:
-
status New status of the entry
setSummary | ( | self, | ||
KNS.KTranslatable | summary | |||
) |
Sets a short description on what the object is all about.
setUnInstalledFiles | ( | self, | ||
QStringList | files | |||
) |
Set the files that have been uninstalled by the uninstall command.
- Parameters:
-
files local file names
- Since:
- 4.1
setVersion | ( | self, | ||
QString | version | |||
) |
Sets the version number.
QString signature | ( | self ) |
Returns the signature for the entry.
If an empty string is returned, no signature was assigned.
- Returns:
- Signature of this entry
KNS.Entry.Source source | ( | self ) |
KNS.Entry.Status status | ( | self ) |
Retrieves the entry's status.
- Returns:
- Current status of the entry
KNS.KTranslatable summary | ( | self ) |
Retrieve a short description about the object.
- Returns:
- object description
QStringList uninstalledFiles | ( | self ) |
Retrieve the locally uninstalled files.
- Returns:
- file names
- Since:
- 4.1
QString version | ( | self ) |
Retrieve the version string of the object.
- Returns:
- object version
Enumeration Documentation
Source |
Source of the entry, A entry's data is coming from either cache, or an online provider this helps the engine know which data to use when merging cached entries with online entry data
- Enumerator:
-
Cache Online Registry
Status |
Status of the entry. An entry will be downloadable from the provider's site prior to the download. Once downloaded and installed, it will be either installed or updateable, implying an out-of-date installation. Finally, the entry can be deleted and hence show up as downloadable again. Entries not taking part in this cycle, for example those in upload, have an invalid status.
- Enumerator:
-
Invalid Downloadable Installed Updateable Deleted Installing Updating