• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KNewStuff

KNS::Entry

KNS::Entry Class Reference

KNewStuff data entry container. More...

#include <entry.h>

List of all members.

Public Types

typedef QList< Entry * > List
enum  Source { Cache, Online, Registry }
enum  Status {
  Invalid, Downloadable, Installed, Updateable,
  Deleted
}

Public Member Functions

Author author () const
QString category () const
QString checksum () const
int downloads () const
 Entry (const Entry &other)
 Entry ()
int idNumber () const
QStringList installedFiles () const
QString license () const
KTranslatable name () const
Entry & operator= (const Entry &other)
KTranslatable payload () const
KTranslatable preview () const
int rating () const
int release () const
QDate releaseDate () const
void setAuthor (const Author &author)
void setCategory (const QString &category)
void setChecksum (const QString &checksum)
void setDownloads (int downloads)
void setIdNumber (int number)
void setInstalledFiles (const QStringList &files)
void setLicense (const QString &license)
void setName (const KTranslatable &name)
void setPayload (const KTranslatable &url)
void setPreview (const KTranslatable &url)
void setRating (int rating)
void setRelease (int release)
void setReleaseDate (const QDate &releasedate)
void setSignature (const QString &signature)
void setSource (Source source)
void setStatus (Status status)
void setSummary (const KTranslatable &summary)
void setUnInstalledFiles (const QStringList &files)
void setVersion (const QString &version)
QString signature () const
Source source ()
Status status ()
KTranslatable summary () const
QStringList uninstalledFiles () const
QString version () const
 ~Entry ()

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.

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

Definition at line 46 of file entry.h.


Member Typedef Documentation

typedef QList<Entry*> KNS::Entry::List

Definition at line 49 of file 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 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 entry.h.


Constructor & Destructor Documentation

Entry::Entry (  ) 

Constructor.

Definition at line 55 of file entry.cpp.

Entry::Entry ( const Entry &  other  ) 

Definition at line 60 of file entry.cpp.

Entry::~Entry (  ) 

Destructor.

Definition at line 71 of file entry.cpp.


Member Function Documentation

Author Entry::author (  )  const

Retrieve the author of the object.

Returns:
object author

Definition at line 101 of file entry.cpp.

QString Entry::category (  )  const

Retrieve the category of the data object.

Returns:
object category

Definition at line 91 of file 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 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 entry.cpp.

int Entry::idNumber (  )  const

Definition at line 251 of file entry.cpp.

QStringList KNS::Entry::installedFiles (  )  const

Retrieve the locally installed files.

Returns:
file names

Definition at line 241 of file entry.cpp.

QString Entry::license (  )  const

Retrieve the license name of the object.

Returns:
object license

Definition at line 111 of file entry.cpp.

KTranslatable Entry::name (  )  const

Retrieve the name of the data object.

Returns:
object name (potentially translated)

Definition at line 81 of file entry.cpp.

Entry & Entry::operator= ( const Entry &  other  ) 

Definition at line 65 of file entry.cpp.

KTranslatable Entry::payload (  )  const

Retrieve the file name of the object.

Returns:
object filename

Definition at line 161 of file 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 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 entry.cpp.

int Entry::release (  )  const

Retrieve the release number of the object.

Returns:
object release

Definition at line 141 of file entry.cpp.

QDate Entry::releaseDate (  )  const

Retrieve the date of the object's publication.

Returns:
object release date

Definition at line 151 of file entry.cpp.

void Entry::setAuthor ( const Author &  author  ) 

Sets the author of the object.

Definition at line 96 of file entry.cpp.

void Entry::setCategory ( const QString &  category  ) 

Sets the data category, e.g.

'kdesktop/wallpaper'.

Definition at line 86 of file 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 entry.cpp.

void Entry::setDownloads ( int  downloads  ) 

Sets the number of downloads.

For internal use only.

Definition at line 186 of file entry.cpp.

void Entry::setIdNumber ( int  number  ) 

Definition at line 246 of file 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 entry.cpp.

void Entry::setLicense ( const QString &  license  ) 

Sets the license (abbreviation) applicable to the object.

Definition at line 106 of file entry.cpp.

void Entry::setName ( const KTranslatable &  name  ) 

Sets the name for this data object.

Definition at line 76 of file entry.cpp.

void Entry::setPayload ( const KTranslatable &  url  ) 

Sets the object's file.

Definition at line 156 of file 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 entry.cpp.

void Entry::setRating ( int  rating  ) 

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

For internal use only.

Definition at line 176 of file 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 entry.cpp.

void Entry::setReleaseDate ( const QDate &  releasedate  ) 

Sets the release date.

Definition at line 146 of file 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 entry.cpp.

void Entry::setSource ( Source  source  ) 

Definition at line 231 of file 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 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 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 entry.cpp.

void Entry::setVersion ( const QString &  version  ) 

Sets the version number.

Definition at line 126 of file 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 entry.cpp.

Entry::Source Entry::source (  ) 

Definition at line 226 of file entry.cpp.

Entry::Status Entry::status (  ) 

Retrieves the entry's status.

Returns:
Current status of the entry

Definition at line 216 of file entry.cpp.

KTranslatable Entry::summary (  )  const

Retrieve a short description about the object.

Returns:
object description

Definition at line 121 of file entry.cpp.

QStringList KNS::Entry::uninstalledFiles (  )  const

Retrieve the locally uninstalled files.

Returns:
file names
Since:
4.1

Definition at line 261 of file entry.cpp.

QString Entry::version (  )  const

Retrieve the version string of the object.

Returns:
object version

Definition at line 131 of file entry.cpp.


The documentation for this class was generated from the following files:
  • entry.h
  • entry.cpp

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal