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

KNewStuff

KNS::Entry

KNS::Entry Class Reference

#include <entry.h>

List of all members.


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 48 of file entry.h.


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

Member Typedef Documentation

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

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


Constructor & Destructor Documentation

Entry::Entry (  ) 

Constructor.

Definition at line 57 of file entry.cpp.

Entry::Entry ( const Entry &  other  ) 

Definition at line 62 of file entry.cpp.

Entry::~Entry (  ) 

Destructor.

Definition at line 73 of file entry.cpp.


Member Function Documentation

Author Entry::author (  )  const

Retrieve the author of the object.

Returns:
object author

Definition at line 103 of file entry.cpp.

QString Entry::category (  )  const

Retrieve the category of the data object.

Returns:
object category

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

int Entry::idNumber (  )  const

Definition at line 253 of file entry.cpp.

QStringList KNS::Entry::installedFiles (  )  const

Retrieve the locally installed files.

Returns:
file names

Definition at line 243 of file entry.cpp.

QString Entry::license (  )  const

Retrieve the license name of the object.

Returns:
object license

Definition at line 113 of file entry.cpp.

KTranslatable Entry::name (  )  const

Retrieve the name of the data object.

Returns:
object name (potentially translated)

Definition at line 83 of file entry.cpp.

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

Definition at line 67 of file entry.cpp.

KTranslatable Entry::payload (  )  const

Retrieve the file name of the object.

Returns:
object filename

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

int Entry::release (  )  const

Retrieve the release number of the object.

Returns:
object release

Definition at line 143 of file entry.cpp.

QDate Entry::releaseDate (  )  const

Retrieve the date of the object's publication.

Returns:
object release date

Definition at line 153 of file entry.cpp.

void Entry::setAuthor ( const Author &  author  ) 

Sets the author of the object.

Definition at line 98 of file entry.cpp.

void Entry::setCategory ( const QString &  category  ) 

Sets the data category, e.g.

'kdesktop/wallpaper'.

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

void Entry::setDownloads ( int  downloads  ) 

Sets the number of downloads.

Definition at line 188 of file entry.cpp.

void Entry::setIdNumber ( int  number  ) 

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

void Entry::setLicense ( const QString &  license  ) 

Sets the license (abbreviation) applicable to the object.

Definition at line 108 of file entry.cpp.

void Entry::setName ( const KTranslatable &  name  ) 

Sets the name for this data object.

Definition at line 78 of file entry.cpp.

void Entry::setPayload ( const KTranslatable &  url  ) 

Sets the object's file.

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

void Entry::setRating ( int  rating  ) 

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

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

void Entry::setReleaseDate ( const QDate &  releasedate  ) 

Sets the release date.

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

void Entry::setSource ( Source  source  ) 

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

void Entry::setSummary ( const KTranslatable &  summary  ) 

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

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

void Entry::setVersion ( const QString &  version  ) 

Sets the version number.

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

Entry::Source Entry::source (  ) 

Definition at line 228 of file entry.cpp.

Entry::Status Entry::status (  ) 

Retrieves the entry's status.

Returns:
Current status of the entry

Definition at line 218 of file entry.cpp.

KTranslatable Entry::summary (  )  const

Retrieve a short description about the object.

Returns:
object description

Definition at line 123 of file entry.cpp.

QStringList KNS::Entry::uninstalledFiles (  )  const

Retrieve the locally uninstalled files.

Returns:
file names
Since:
4.1

Definition at line 263 of file entry.cpp.

QString Entry::version (  )  const

Retrieve the version string of the object.

Returns:
object version

Definition at line 133 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
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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