KNewStuff
entry.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KNEWSTUFF2_ENTRY_H
00022 #define KNEWSTUFF2_ENTRY_H
00023
00024 #include <knewstuff2/core/author.h>
00025 #include <knewstuff2/core/ktranslatable.h>
00026
00027 #include <kurl.h>
00028
00029 #include <QtCore/QDate>
00030 #include <QtCore/QString>
00031
00032 namespace KNS
00033 {
00034
00035 struct EntryPrivate;
00036
00048 class KNEWSTUFF_EXPORT Entry
00049 {
00050 public:
00051 typedef QList<Entry*> List;
00052
00056 Entry();
00057
00058 Entry(const Entry& other);
00059 Entry& operator=(const Entry& other);
00060
00064 ~Entry();
00065
00069 void setName(const KTranslatable& name);
00070
00076 KTranslatable name() const;
00077
00081 void setCategory(const QString& category);
00082
00088 QString category() const;
00089
00093 void setAuthor(const Author& author);
00094
00100 Author author() const;
00101
00105 void setLicense(const QString& license);
00106
00112 QString license() const;
00113
00117 void setSummary(const KTranslatable& summary);
00118
00124 KTranslatable summary() const;
00125
00129 void setVersion(const QString& version);
00130
00136 QString version() const;
00137
00142 void setRelease(int release);
00143
00149 int release() const;
00150
00154 void setReleaseDate(const QDate& releasedate);
00155
00161 QDate releaseDate() const;
00162
00166 void setPayload(const KTranslatable& url);
00167
00173 KTranslatable payload() const;
00174
00179 void setPreview(const KTranslatable& url);
00180
00186 KTranslatable preview() const;
00187
00192 void setInstalledFiles(const QStringList& files);
00193
00198 QStringList installedFiles() const;
00199
00205 void setRating(int rating);
00206
00213 int rating() const;
00214
00220 void setDownloads(int downloads);
00221
00228 int downloads() const;
00229
00230
00231
00238 void setChecksum(const QString& checksum);
00239
00246 void setSignature(const QString& signature);
00247
00255 QString checksum() const;
00256
00264 QString signature() const;
00265
00275 enum Status {
00276 Invalid,
00277 Downloadable,
00278 Installed,
00279 Updateable,
00280 Deleted
00281 };
00282
00289 void setStatus(Status status);
00290
00296 Status status();
00297
00298 private:
00299 EntryPrivate * const d;
00300 };
00301
00302 }
00303
00304 #endif