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
00199 void setUnInstalledFiles(const QStringList& files);
00200
00201
00206 QStringList installedFiles() const;
00207
00213 QStringList uninstalledFiles() const;
00214
00215
00216
00222 void setRating(int rating);
00223
00230 int rating() const;
00231
00237 void setDownloads(int downloads);
00238
00245 int downloads() const;
00246
00247
00248
00255 void setChecksum(const QString& checksum);
00256
00263 void setSignature(const QString& signature);
00264
00272 QString checksum() const;
00273
00281 QString signature() const;
00282
00292 enum Status {
00293 Invalid,
00294 Downloadable,
00295 Installed,
00296 Updateable,
00297 Deleted
00298 };
00299
00306 void setStatus(Status status);
00307
00313
00314 Status status();
00315
00321 enum Source {
00322 Cache,
00323 Online,
00324 Registry
00325 };
00326
00327 void setSource(Source source);
00328
00329 Source source();
00330
00331 void setIdNumber(int number);
00332 int idNumber() const;
00333
00334 private:
00335 EntryPrivate * const d;
00336 };
00337
00338 }
00339
00340 #endif