Attica::Content
#include <Attica/Content>
Public Types | |
typedef QList< Content > | List |
Public Member Functions | |
Content () | |
Content (const Content &other) | |
~Content () | |
void | addAttribute (const QString &key, const QString &value) |
QString | attribute (const QString &key) const |
QMap< QString, QString > | attributes () const |
QString | author () const |
QString | changelog () const |
QDateTime | created () const |
QString | depend () const |
QString | description () const |
QUrl | detailpage () const |
int | downloads () const |
DownloadDescription | downloadUrlDescription (int number) const |
QList< DownloadDescription > | downloadUrlDescriptions () const |
QList< HomePageEntry > | homePageEntries () |
HomePageEntry | homePageEntry (int number) const |
QList< Icon > | icons () |
QList< Icon > | icons () const |
QString | id () const |
bool | isValid () const |
QString | license () const |
QString | licenseName () const |
QString | name () const |
int | numberOfComments () const |
Content & | operator= (const Content &other) |
QString | previewPicture (const QString &number=QStringLiteral("1")) const |
int | rating () const |
void | setCreated (const QDateTime &created) |
void | setDownloads (int downloads) |
void | setIcons (QList< Icon > icons) |
void | setId (const QString &id) |
void | setName (const QString &name) |
void | setNumberOfComments (int numComments) |
void | setRating (int rating) |
void | setTags (const QStringList &tags) |
void | setUpdated (const QDateTime &updated) |
void | setVideos (QList< QUrl > videos) |
QString | smallPreviewPicture (const QString &number=QStringLiteral("1")) const |
QString | summary () const |
QStringList | tags () const |
QDateTime | updated () const |
QString | version () const |
QList< QUrl > | videos () |
Detailed Description
Constructor & Destructor Documentation
◆ Content() [1/2]
Content::Content | ( | ) |
Creates an empty Content.
Definition at line 39 of file content.cpp.
◆ Content() [2/2]
Content::Content | ( | const Content & | other | ) |
Copy constructor.
- Parameters
-
other the Content to copy from
Definition at line 44 of file content.cpp.
◆ ~Content()
Content::~Content | ( | ) |
Destructor.
Definition at line 55 of file content.cpp.
Member Function Documentation
◆ addAttribute()
Add an attribute that is not included in the basis set of attributes exposed by the Content class.
If the attribute already exists it gets overwritten.
- Parameters
-
key the key of the attribute value the value of the attribute
Definition at line 129 of file content.cpp.
◆ attribute()
Get an attribute that is not included in the basis set of attributes exposed by the Content class.
- Parameters
-
key the key of the attribute
- Returns
- the value of the attribute with the specified key, or an empty string, if the key has not been found
Definition at line 134 of file content.cpp.
◆ attributes()
Get all attributes that are not included in the basis set of attributes exposed by the Content class.
- Returns
- the attribute mappings
Definition at line 139 of file content.cpp.
◆ created()
QDateTime Content::created | ( | ) | const |
Gets the date and time the Content has been created.
- Returns
- the date and time of the last update
Definition at line 114 of file content.cpp.
◆ description()
QString Content::description | ( | ) | const |
A description of this content.
Definition at line 154 of file content.cpp.
◆ detailpage()
QUrl Content::detailpage | ( | ) | const |
A webpage with the detailed description of this content.
Definition at line 159 of file content.cpp.
◆ downloads()
int Content::downloads | ( | ) | const |
Gets the number of downloads for the Content (how often this has been downloaded from the server).
- Returns
- the number of downloads
Definition at line 94 of file content.cpp.
◆ downloadUrlDescription()
Attica::DownloadDescription Attica::Content::downloadUrlDescription | ( | int | number | ) | const |
Get the details about a download (a content can have multiple links, eg for different distros).
This is not very helpful if we don't know the allowed numbers.
Definition at line 201 of file content.cpp.
◆ downloadUrlDescriptions()
QList< Attica::DownloadDescription > Attica::Content::downloadUrlDescriptions | ( | ) | const |
Get all possible downloads.
This is slow searching through lots of strings, so beware and don't call it too often.
Definition at line 174 of file content.cpp.
◆ homePageEntries()
QList< HomePageEntry > Attica::Content::homePageEntries | ( | ) |
Get all home pages for this content.
This is slow searching through lots of strings, so beware and don't call it too often.
Definition at line 231 of file content.cpp.
◆ homePageEntry()
Attica::HomePageEntry Attica::Content::homePageEntry | ( | int | number | ) | const |
Get the details about a home page (a content can have multiple home pages, blog, bugs, ...).
This is not very helpful if we don't know the allowed numbers.
Definition at line 258 of file content.cpp.
◆ icons() [1/2]
Get all icons for this content.
Definition at line 301 of file content.cpp.
◆ icons() [2/2]
◆ id()
QString Content::id | ( | ) | const |
Gets the id of the Content.
The id uniquely identifies a Content with the OCS API.
- Returns
- the id
Definition at line 64 of file content.cpp.
◆ isValid()
bool Content::isValid | ( | ) | const |
Checks whether this Content has an id.
- Returns
true
if an id has been set,false
otherwise
Definition at line 144 of file content.cpp.
◆ name()
QString Content::name | ( | ) | const |
◆ numberOfComments()
int Content::numberOfComments | ( | ) | const |
Gets the number of comments for the Content.
- Returns
- the number of comments
Definition at line 104 of file content.cpp.
◆ operator=()
Assignment operator.
- Parameters
-
other the Content to assign from
- Returns
- pointer to this Content
Definition at line 49 of file content.cpp.
◆ rating()
int Content::rating | ( | ) | const |
Gets the rating of the Content.
- Returns
- the rating in the range 0-100
Definition at line 84 of file content.cpp.
◆ setCreated()
void Content::setCreated | ( | const QDateTime & | created | ) |
Sets the date and time the Content has been created.
- Parameters
-
created the new creation date and time
Definition at line 109 of file content.cpp.
◆ setDownloads()
void Content::setDownloads | ( | int | downloads | ) |
Sets the number of downloads for the Content.
- Parameters
-
downloads the new number of downloads
Definition at line 89 of file content.cpp.
◆ setIcons()
Set list of icons.
- Parameters
-
icons list of icons for this content
Definition at line 311 of file content.cpp.
◆ setId()
void Content::setId | ( | const QString & | id | ) |
Sets the id of the Content.
The id uniquely identifies a Content with the OCS API.
- Parameters
-
id the new id
Definition at line 59 of file content.cpp.
◆ setName()
void Content::setName | ( | const QString & | name | ) |
Sets the name of the Content.
- Parameters
-
name the new name
Definition at line 69 of file content.cpp.
◆ setNumberOfComments()
void Content::setNumberOfComments | ( | int | numComments | ) |
Sets the number of comments for the Content.
- Parameters
-
numComments the new number of downloads
Definition at line 99 of file content.cpp.
◆ setRating()
void Content::setRating | ( | int | rating | ) |
Sets the rating of the Content.
- Parameters
-
rating the new rating, has to be in the range 0-100
Definition at line 79 of file content.cpp.
◆ setTags()
void Attica::Content::setTags | ( | const QStringList & | tags | ) |
Set the list of tags.
- Parameters
-
tags list of tags for this content
- Since
- 5.50
Definition at line 331 of file content.cpp.
◆ setUpdated()
void Content::setUpdated | ( | const QDateTime & | updated | ) |
Sets the time the Content has been last updated.
- Parameters
-
updated the new date and time of the last update
Definition at line 119 of file content.cpp.
◆ setVideos()
Set list of videos.
- Parameters
-
videos list of videos for this content
Definition at line 321 of file content.cpp.
◆ summary()
QString Content::summary | ( | ) | const |
A summary description of this content.
Definition at line 149 of file content.cpp.
◆ tags()
QStringList Attica::Content::tags | ( | ) | const |
◆ updated()
QDateTime Content::updated | ( | ) | const |
Gets the date and time the Content has been last updated.
- Returns
- the date and time of the last update
Definition at line 124 of file content.cpp.
◆ videos()
Get all videos for this content.
Definition at line 316 of file content.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 04:07:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.