• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KNewStuff

  • knewstuff
  • knewstuff2
  • core
knewstuff2/core/entry.h
Go to the documentation of this file.
1/*
2 This file is part of KNewStuff2.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 Copyright (c) 2003 - 2007 Josef Spillner <spillner@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef KNEWSTUFF2_ENTRY_H
20#define KNEWSTUFF2_ENTRY_H
21
22#include <knewstuff2/core/author.h>
23#include <knewstuff2/core/ktranslatable.h>
24
25#include <kurl.h>
26
27#include <QtCore/QDate>
28#include <QtCore/QString>
29
30namespace KNS
31{
32
33struct EntryPrivate;
34
46class KNEWSTUFF_EXPORT Entry
47{
48public:
49 typedef QList<Entry*> List;
50
54 Entry();
55
56 Entry(const Entry& other);
57 Entry& operator=(const Entry& other);
58
62 ~Entry();
63
67 void setName(const KTranslatable& name);
68
74 KTranslatable name() const;
75
79 void setCategory(const QString& category);
80
86 QString category() const;
87
91 void setAuthor(const Author& author);
92
98 Author author() const;
99
103 void setLicense(const QString& license);
104
110 QString license() const;
111
115 void setSummary(const KTranslatable& summary);
116
122 KTranslatable summary() const;
123
127 void setVersion(const QString& version);
128
134 QString version() const;
135
140 void setRelease(int release);
141
147 int release() const;
148
152 void setReleaseDate(const QDate& releasedate);
153
159 QDate releaseDate() const;
160
164 void setPayload(const KTranslatable& url);
165
171 KTranslatable payload() const;
172
177 void setPreview(const KTranslatable& url);
178
184 KTranslatable preview() const;
185
190 void setInstalledFiles(const QStringList& files);
191
197 void setUnInstalledFiles(const QStringList& files);
198
199
204 QStringList installedFiles() const;
205
211 QStringList uninstalledFiles() const;
212
213
214
220 void setRating(int rating);
221
228 int rating() const;
229
235 void setDownloads(int downloads);
236
243 int downloads() const;
244
245 // FIXME: below here, everything under consideration
246
253 void setChecksum(const QString& checksum);
254
261 void setSignature(const QString& signature);
262
270 QString checksum() const;
271
279 QString signature() const;
280
290 enum Status {
291 Invalid,
292 Downloadable,
293 Installed,
294 Updateable,
295 Deleted
296 };
297
304 void setStatus(Status status);
305
311 // FIXME KDE5 make it const
312 Status status();
313
319 enum Source {
320 Cache,
321 Online,
322 Registry
323 };
324
325 void setSource(Source source);
326 // FIXME KDE5 make it const
327 Source source();
328
329 void setIdNumber(int number);
330 int idNumber() const;
331
332private:
333 EntryPrivate * const d;
334};
335
336}
337
338#endif
KNS::Author
KNewStuff author information.
Definition knewstuff2/core/author.h:41
KNS::Entry::setRating
void setRating(int rating)
Sets the rating between 0 (worst) and 100 (best).
Definition knewstuff2/core/entry.cpp:176
KNS::Entry::setLicense
void setLicense(const QString &license)
Sets the license (abbreviation) applicable to the object.
Definition knewstuff2/core/entry.cpp:106
KNS::Entry::setInstalledFiles
void setInstalledFiles(const QStringList &files)
Set the files that have been installed by the install command.
Definition knewstuff2/core/entry.cpp:236
KNS::Entry::preview
KTranslatable preview() const
Retrieve the file name of an image containing a preview of the object.
Definition knewstuff2/core/entry.cpp:171
KNS::Entry::releaseDate
QDate releaseDate() const
Retrieve the date of the object's publication.
Definition knewstuff2/core/entry.cpp:151
KNS::Entry::uninstalledFiles
QStringList uninstalledFiles() const
Retrieve the locally uninstalled files.
Definition knewstuff2/core/entry.cpp:261
KNS::Entry::List
QList< Entry * > List
Definition knewstuff2/core/entry.h:49
KNS::Entry::setUnInstalledFiles
void setUnInstalledFiles(const QStringList &files)
Set the files that have been uninstalled by the uninstall command.
Definition knewstuff2/core/entry.cpp:256
KNS::Entry::signature
QString signature() const
Returns the signature for the entry.
Definition knewstuff2/core/entry.cpp:211
KNS::Entry::name
KTranslatable name() const
Retrieve the name of the data object.
Definition knewstuff2/core/entry.cpp:81
KNS::Entry::setVersion
void setVersion(const QString &version)
Sets the version number.
Definition knewstuff2/core/entry.cpp:126
KNS::Entry::setDownloads
void setDownloads(int downloads)
Sets the number of downloads.
Definition knewstuff2/core/entry.cpp:186
KNS::Entry::downloads
int downloads() const
Retrieve the download count for the object, which has been determined by its hosting sites and thus m...
Definition knewstuff2/core/entry.cpp:191
KNS::Entry::payload
KTranslatable payload() const
Retrieve the file name of the object.
Definition knewstuff2/core/entry.cpp:161
KNS::Entry::setSignature
void setSignature(const QString &signature)
Sets the signature of the entry.
Definition knewstuff2/core/entry.cpp:206
KNS::Entry::category
QString category() const
Retrieve the category of the data object.
Definition knewstuff2/core/entry.cpp:91
KNS::Entry::Source
Source
Source of the entry, A entry's data is coming from either cache, or an online provider this helps the...
Definition knewstuff2/core/entry.h:319
KNS::Entry::Cache
@ Cache
Definition knewstuff2/core/entry.h:320
KNS::Entry::Online
@ Online
Definition knewstuff2/core/entry.h:321
KNS::Entry::Registry
@ Registry
Definition knewstuff2/core/entry.h:322
KNS::Entry::checksum
QString checksum() const
Returns the checksum for the entry.
Definition knewstuff2/core/entry.cpp:201
KNS::Entry::setPayload
void setPayload(const KTranslatable &url)
Sets the object's file.
Definition knewstuff2/core/entry.cpp:156
KNS::Entry::Entry
Entry()
Constructor.
Definition knewstuff2/core/entry.cpp:55
KNS::Entry::setReleaseDate
void setReleaseDate(const QDate &releasedate)
Sets the release date.
Definition knewstuff2/core/entry.cpp:146
KNS::Entry::setCategory
void setCategory(const QString &category)
Sets the data category, e.g.
Definition knewstuff2/core/entry.cpp:86
KNS::Entry::setAuthor
void setAuthor(const Author &author)
Sets the author of the object.
Definition knewstuff2/core/entry.cpp:96
KNS::Entry::release
int release() const
Retrieve the release number of the object.
Definition knewstuff2/core/entry.cpp:141
KNS::Entry::version
QString version() const
Retrieve the version string of the object.
Definition knewstuff2/core/entry.cpp:131
KNS::Entry::setPreview
void setPreview(const KTranslatable &url)
Sets the object's preview file, if available.
Definition knewstuff2/core/entry.cpp:166
KNS::Entry::setRelease
void setRelease(int release)
Sets the release number, which is increased for feature-equal objects with the same version number,...
Definition knewstuff2/core/entry.cpp:136
KNS::Entry::Status
Status
Status of the entry.
Definition knewstuff2/core/entry.h:290
KNS::Entry::Invalid
@ Invalid
Definition knewstuff2/core/entry.h:291
KNS::Entry::Installed
@ Installed
Definition knewstuff2/core/entry.h:293
KNS::Entry::Deleted
@ Deleted
Definition knewstuff2/core/entry.h:295
KNS::Entry::Updateable
@ Updateable
Definition knewstuff2/core/entry.h:294
KNS::Entry::Downloadable
@ Downloadable
Definition knewstuff2/core/entry.h:292
KNS::Entry::setChecksum
void setChecksum(const QString &checksum)
Sets the checksum of the entry.
Definition knewstuff2/core/entry.cpp:196
KNS::Entry::operator=
Entry & operator=(const Entry &other)
Definition knewstuff2/core/entry.cpp:65
KNS::Entry::summary
KTranslatable summary() const
Retrieve a short description about the object.
Definition knewstuff2/core/entry.cpp:121
KNS::Entry::setSummary
void setSummary(const KTranslatable &summary)
Sets a short description on what the object is all about.
Definition knewstuff2/core/entry.cpp:116
KNS::Entry::setName
void setName(const KTranslatable &name)
Sets the name for this data object.
Definition knewstuff2/core/entry.cpp:76
KNS::Entry::rating
int rating() const
Retrieve the rating for the object, which has been determined by its users and thus might change over...
Definition knewstuff2/core/entry.cpp:181
KNS::Entry::author
Author author() const
Retrieve the author of the object.
Definition knewstuff2/core/entry.cpp:101
KNS::Entry::installedFiles
QStringList installedFiles() const
Retrieve the locally installed files.
Definition knewstuff2/core/entry.cpp:241
KNS::Entry::license
QString license() const
Retrieve the license name of the object.
Definition knewstuff2/core/entry.cpp:111
KNS::KTranslatable
String class with multiple localized representations.
Definition ktranslatable.h:42
QList
Status
Status
author.h
ktranslatable.h
kurl.h
KNS
Definition knewstuff2/core/author.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal