KNewStuff
#include <entry.h>
Public Types | |
typedef QList< Entry * > | List |
enum | Source { Cache, Online, Registry } |
enum | Status { Invalid, Downloadable, Installed, Updateable, Deleted } |
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 (spill) ner@ kde.o rg
Definition at line 46 of file knewstuff2/core/entry.h.
Member Typedef Documentation
Definition at line 49 of file knewstuff2/core/entry.h.
Member Enumeration Documentation
enum KNS::Entry::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 |
Definition at line 319 of file knewstuff2/core/entry.h.
enum KNS::Entry::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 |
Definition at line 290 of file knewstuff2/core/entry.h.
Constructor & Destructor Documentation
Entry::Entry | ( | ) |
Constructor.
Definition at line 55 of file knewstuff2/core/entry.cpp.
Entry::Entry | ( | const Entry & | other | ) |
Definition at line 60 of file knewstuff2/core/entry.cpp.
Entry::~Entry | ( | ) |
Destructor.
Definition at line 71 of file knewstuff2/core/entry.cpp.
Member Function Documentation
Author Entry::author | ( | ) | const |
Retrieve the author of the object.
- Returns
- object author
Definition at line 101 of file knewstuff2/core/entry.cpp.
QString Entry::category | ( | ) | const |
Retrieve the category of the data object.
- Returns
- object category
Definition at line 91 of file knewstuff2/core/entry.cpp.
QString Entry::checksum | ( | ) | const |
Returns the checksum for the entry.
If an empty string is returned, no checksum was assigned.
- Returns
- Checksum of this entry
Definition at line 201 of file knewstuff2/core/entry.cpp.
int Entry::downloads | ( | ) | const |
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
Definition at line 191 of file knewstuff2/core/entry.cpp.
int Entry::idNumber | ( | ) | const |
Definition at line 251 of file knewstuff2/core/entry.cpp.
QStringList KNS::Entry::installedFiles | ( | ) | const |
Retrieve the locally installed files.
- Returns
- file names
Definition at line 241 of file knewstuff2/core/entry.cpp.
QString Entry::license | ( | ) | const |
Retrieve the license name of the object.
- Returns
- object license
Definition at line 111 of file knewstuff2/core/entry.cpp.
KTranslatable Entry::name | ( | ) | const |
Retrieve the name of the data object.
- Returns
- object name (potentially translated)
Definition at line 81 of file knewstuff2/core/entry.cpp.
Definition at line 65 of file knewstuff2/core/entry.cpp.
KTranslatable Entry::payload | ( | ) | const |
Retrieve the file name of the object.
- Returns
- object filename
Definition at line 161 of file knewstuff2/core/entry.cpp.
KTranslatable Entry::preview | ( | ) | const |
Retrieve the file name of an image containing a preview of the object.
- Returns
- object preview filename
Definition at line 171 of file knewstuff2/core/entry.cpp.
int Entry::rating | ( | ) | const |
Retrieve the rating for the object, which has been determined by its users and thus might change over time.
- Returns
- object rating
Definition at line 181 of file knewstuff2/core/entry.cpp.
int Entry::release | ( | ) | const |
Retrieve the release number of the object.
- Returns
- object release
Definition at line 141 of file knewstuff2/core/entry.cpp.
QDate Entry::releaseDate | ( | ) | const |
Retrieve the date of the object's publication.
- Returns
- object release date
Definition at line 151 of file knewstuff2/core/entry.cpp.
void Entry::setAuthor | ( | const Author & | author | ) |
Sets the author of the object.
Definition at line 96 of file knewstuff2/core/entry.cpp.
void Entry::setCategory | ( | const QString & | category | ) |
Sets the data category, e.g.
'kdesktop/wallpaper'.
Definition at line 86 of file knewstuff2/core/entry.cpp.
void Entry::setChecksum | ( | const 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
Definition at line 196 of file knewstuff2/core/entry.cpp.
void Entry::setDownloads | ( | int | downloads | ) |
Sets the number of downloads.
Definition at line 186 of file knewstuff2/core/entry.cpp.
void Entry::setIdNumber | ( | int | number | ) |
Definition at line 246 of file knewstuff2/core/entry.cpp.
void KNS::Entry::setInstalledFiles | ( | const QStringList & | files | ) |
Set the files that have been installed by the install command.
- Parameters
-
files local file names
Definition at line 236 of file knewstuff2/core/entry.cpp.
void Entry::setLicense | ( | const QString & | license | ) |
Sets the license (abbreviation) applicable to the object.
Definition at line 106 of file knewstuff2/core/entry.cpp.
void Entry::setName | ( | const KTranslatable & | name | ) |
Sets the name for this data object.
Definition at line 76 of file knewstuff2/core/entry.cpp.
void Entry::setPayload | ( | const KTranslatable & | url | ) |
Sets the object's file.
Definition at line 156 of file knewstuff2/core/entry.cpp.
void Entry::setPreview | ( | const KTranslatable & | url | ) |
Sets the object's preview file, if available.
This should be a picture file.
Definition at line 166 of file knewstuff2/core/entry.cpp.
void Entry::setRating | ( | int | rating | ) |
Sets the rating between 0 (worst) and 100 (best).
Definition at line 176 of file knewstuff2/core/entry.cpp.
void Entry::setRelease | ( | int | release | ) |
Sets the release number, which is increased for feature-equal objects with the same version number, but slightly updated contents.
Definition at line 136 of file knewstuff2/core/entry.cpp.
void Entry::setReleaseDate | ( | const QDate & | releasedate | ) |
Sets the release date.
Definition at line 146 of file knewstuff2/core/entry.cpp.
void Entry::setSignature | ( | const QString & | signature | ) |
Sets the signature of the entry.
This will be a digital signature in OpenPGP-compliant format.
signature Signature for the entry
Definition at line 206 of file knewstuff2/core/entry.cpp.
void Entry::setSource | ( | Source | source | ) |
Definition at line 231 of file knewstuff2/core/entry.cpp.
void Entry::setStatus | ( | Status | status | ) |
Sets the entry's status.
If no status is set, the default will be Invalid.
- Parameters
-
status New status of the entry
Definition at line 221 of file knewstuff2/core/entry.cpp.
void Entry::setSummary | ( | const KTranslatable & | summary | ) |
Sets a short description on what the object is all about.
Definition at line 116 of file knewstuff2/core/entry.cpp.
void KNS::Entry::setUnInstalledFiles | ( | const QStringList & | files | ) |
Set the files that have been uninstalled by the uninstall command.
- Parameters
-
files local file names
- Since
- 4.1
Definition at line 256 of file knewstuff2/core/entry.cpp.
void Entry::setVersion | ( | const QString & | version | ) |
Sets the version number.
Definition at line 126 of file knewstuff2/core/entry.cpp.
QString Entry::signature | ( | ) | const |
Returns the signature for the entry.
If an empty string is returned, no signature was assigned.
- Returns
- Signature of this entry
Definition at line 211 of file knewstuff2/core/entry.cpp.
Entry::Source Entry::source | ( | ) |
Definition at line 226 of file knewstuff2/core/entry.cpp.
Entry::Status Entry::status | ( | ) |
Retrieves the entry's status.
- Returns
- Current status of the entry
Definition at line 216 of file knewstuff2/core/entry.cpp.
KTranslatable Entry::summary | ( | ) | const |
Retrieve a short description about the object.
- Returns
- object description
Definition at line 121 of file knewstuff2/core/entry.cpp.
QStringList KNS::Entry::uninstalledFiles | ( | ) | const |
Retrieve the locally uninstalled files.
- Returns
- file names
- Since
- 4.1
Definition at line 261 of file knewstuff2/core/entry.cpp.
QString Entry::version | ( | ) | const |
Retrieve the version string of the object.
- Returns
- object version
Definition at line 131 of file knewstuff2/core/entry.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.