Attica

content.h
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2008 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8 
9 #ifndef ATTICA_CONTENT_H
10 #define ATTICA_CONTENT_H
11 
12 #include <QList>
13 #include <QString>
14 #include <QMap>
15 #include <QSharedDataPointer>
16 #include <QUrl>
17 
18 #include "attica_export.h"
19 #include "downloaddescription.h"
20 #include "homepageentry.h"
21 #include "icon.h"
22 
23 class QDateTime;
24 
25 namespace Attica
26 {
27 
31 class ATTICA_EXPORT Content
32 {
33 public:
34  typedef QList<Content> List;
35  class Parser;
36 
40  Content();
41 
46  Content(const Content &other);
47 
53  Content &operator=(const Content &other);
54 
58  ~Content();
59 
65  void setId(const QString &id);
66 
72  QString id() const;
73 
78  void setName(const QString &name);
79 
84  QString name() const;
85 
90  void setRating(int rating);
91 
96  int rating() const;
97 
102  void setDownloads(int downloads);
103 
108  int downloads() const;
109 
114  void setNumberOfComments(int numComments);
115 
120  int numberOfComments() const;
121 
126  void setCreated(const QDateTime &created);
127 
132  QDateTime created() const;
133 
138  void setUpdated(const QDateTime &updated);
139 
144  QDateTime updated() const;
145 
149  QString summary() const;
150 
154  QString description() const;
155 
159  QUrl detailpage() const;
160 
161  QString changelog() const;
162  QString version() const;
163  QString depend() const;
164 
169  DownloadDescription downloadUrlDescription(int number) const;
170 
175  QList<DownloadDescription> downloadUrlDescriptions() const;
176 
181  HomePageEntry homePageEntry(int number) const;
182 
187  QList<HomePageEntry> homePageEntries();
188 
189  QString previewPicture(const QString &number = QStringLiteral("1")) const;
190  QString smallPreviewPicture(const QString &number = QStringLiteral("1")) const;
191  QString license() const;
192  QString licenseName() const;
193  QString author() const;
194 
198  QList<Icon> icons();
199 
203  QList<Icon> icons() const;
204 
209  void setIcons(QList<Icon> icons);
210 
214  QList<QUrl> videos();
219  void setVideos(QList<QUrl> videos);
220 
225  QStringList tags() const;
231  void setTags(const QStringList &tags);
232 
239  void addAttribute(const QString &key, const QString &value);
240 
246  QString attribute(const QString &key) const;
247 
252  QMap<QString, QString> attributes() const;
253 
258  bool isValid() const;
259 
260 private:
261  class Private;
263 };
264 
265 }
266 
267 #endif
Represents a single content.
Definition: content.h:31
The HomePageEntry class contains information about one home page entry.
Definition: homepageentry.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.