# class Entry

###

Module | knewstuff
Namespace | KNS
Class | Entry
Inherits |

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.

Author Cornelius Schumacher (schumacher@kde.org) Maintainer: Josef Spillner (spillner@kde.org)

### enums

- Source { Cache, Online, Registry }
- Status { Invalid, Downloadable, Installed, Updateable, Deleted }

enum details

### methods

- Entry ( )

  returns ctor

  Constructor.

- Entry (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | KNS.Entry |

- author ( )

  returns KNS.Author

  Retrieve the author of the object.

  Returns object author

- category ( )

  returns QString

  Retrieve the category of the data object.

  Returns object category

- checksum ( )

  returns QString

  Returns the checksum for the entry.

  If an empty string is returned, no checksum was assigned.

  Returns Checksum of this entry

- downloads ( )

  returns int

  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

- idNumber ( )

  returns int

- installedFiles ( )

  returns QStringList

  Retrieve the locally installed files. Returns file names

- license ( )

  returns QString

  Retrieve the license name of the object.

  Returns object license

- name ( )

  returns KNS.KTranslatable

  Retrieve the name of the data object.

  Returns object name (potentially translated)

- payload ( )

  returns KNS.KTranslatable

  Retrieve the file name of the object.

  Returns object filename

- preview ( )

  returns KNS.KTranslatable

  Retrieve the file name of an image containing a preview of the object.

  Returns object preview filename

- rating ( )

  returns int

  Retrieve the rating for the object, which has been determined by its users and thus might change over time.

  Returns object rating

- release ( )

  returns int

  Retrieve the release number of the object

  Returns object release

- releaseDate ( )

  returns QDate

  Retrieve the date of the object's publication.

  Returns object release date

- setAuthor (author)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  author | KNS.Author |

  Sets the author of the object.

- setCategory (category)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  category | QString |

  Sets the data category, e.g. 'kdesktop/wallpaper'.

- setChecksum (checksum)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  checksum | QString |

  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 (downloads)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  downloads | int |

  Sets the number of downloads.

  Internal

- setIdNumber (number)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  number | int |

- setInstalledFiles (files)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  files | QStringList |

  Set the files that have been installed by the install command.

  files - local file names

- setLicense (license)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  license | QString |

  Sets the license (abbreviation) applicable to the object.

- setName (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | KNS.KTranslatable |

  Sets the name for this data object.

- setPayload (url)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  url | KNS.KTranslatable |

  Sets the object's file.

- setPreview (url)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  url | KNS.KTranslatable |

  Sets the object's preview file, if available. This should be a picture file.

- setRating (rating)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  rating | int |

  Sets the rating between 0 (worst) and 100 (best).

  Internal

- setRelease (release)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  release | int |

  Sets the release number, which is increased for feature-equal objects with the same version number, but slightly updated contents.

- setReleaseDate (releasedate)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  releasedate | QDate |

  Sets the release date.

- setSignature (signature)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  signature | QString |

  Sets the signature of the entry. This will be a digital signature in OpenPGP-compliant format.

  signature Signature for the entry

- setSource (source)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  source | 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

- setStatus (status)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  status | KNS::Entry.Status |

  Sets the entry's status. If no status is set, the default will be Invalid.

  status - New status of the entry

- setSummary (summary)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  summary | KNS.KTranslatable |

  Sets a short description on what the object is all about.

- setUnInstalledFiles (files)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  files | QStringList |

  Set the files that have been uninstalled by the uninstall command.

  files - local file names @since 4.1

- setVersion (version)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  version | QString |

  Sets the version number.

- signature ( )

  returns QString

  Returns the signature for the entry.

  If an empty string is returned, no signature was assigned.

  Returns Signature of this entry

- source ( )

  returns KNS::Entry.Source

- status ( )

  returns KNS::Entry.Status

  Retrieves the entry's status.

  Returns Current status of the entry

- summary ( )

  returns KNS.KTranslatable

  Retrieve a short description about the object.

  Returns object description

- uninstalledFiles ( )

  returns QStringList

  Retrieve the locally uninstalled files. Returns file names @since 4.1

- version ( )

  returns QString

  Retrieve the version string of the object.

  Returns object version

### enums - detail

- Source { Cache, Online, Registry }

  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

  | Cache | - | - |
  | Online | - | - |
  | Registry | - | - |

- Status { Invalid, Downloadable, Installed, Updateable, Deleted }

  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.

  | Invalid | - | - |
  | Downloadable | - | - |
  | Installed | - | - |
  | Updateable | - | - |
  | Deleted | - | - |