Attica 5.109.0
|
Represents a single content. More...
#include <Attica/Content>
Public Types | |
typedef QList< Content > | List |
Public Member Functions | |
Content () | |
Creates an empty Content. | |
Content (const Content &other) | |
Copy constructor. | |
~Content () | |
Destructor. | |
void | addAttribute (const QString &key, const QString &value) |
Add an attribute that is not included in the basis set of attributes exposed by the Content class. | |
QString | attribute (const QString &key) const |
Get an attribute that is not included in the basis set of attributes exposed by the Content class. | |
QMap< QString, QString > | attributes () const |
Get all attributes that are not included in the basis set of attributes exposed by the Content class. | |
QString | author () const |
QString | changelog () const |
QDateTime | created () const |
Gets the date and time the Content has been created. | |
QString | depend () const |
QString | description () const |
A description of this content. | |
QUrl | detailpage () const |
A webpage with the detailed description of this content. | |
int | downloads () const |
Gets the number of downloads for the Content (how often this has been downloaded from the server). | |
DownloadDescription | downloadUrlDescription (int number) const |
Get the details about a download (a content can have multiple links, eg for different distros). | |
QList< DownloadDescription > | downloadUrlDescriptions () const |
Get all possible downloads. | |
QList< HomePageEntry > | homePageEntries () |
Get all home pages for this content. | |
HomePageEntry | homePageEntry (int number) const |
Get the details about a home page (a content can have multiple home pages, blog, bugs, ...). | |
QList< Icon > | icons () |
Get all icons for this content. | |
QList< Icon > | icons () const |
Get all icons for this content. | |
QString | id () const |
Gets the id of the Content. | |
bool | isValid () const |
Checks whether this Content has an id. | |
QString | license () const |
QString | licenseName () const |
QString | name () const |
Gets the name of the Content. | |
int | numberOfComments () const |
Gets the number of comments for the Content. | |
Content & | operator= (const Content &other) |
Assignment operator. | |
QString | previewPicture (const QString &number=QStringLiteral("1")) const |
int | rating () const |
Gets the rating of the Content. | |
void | setCreated (const QDateTime &created) |
Sets the date and time the Content has been created. | |
void | setDownloads (int downloads) |
Sets the number of downloads for the Content. | |
void | setIcons (QList< Icon > icons) |
Set list of icons. | |
void | setId (const QString &id) |
Sets the id of the Content. | |
void | setName (const QString &name) |
Sets the name of the Content. | |
void | setNumberOfComments (int numComments) |
Sets the number of comments for the Content. | |
void | setRating (int rating) |
Sets the rating of the Content. | |
void | setTags (const QStringList &tags) |
Set the list of tags. | |
void | setUpdated (const QDateTime &updated) |
Sets the time the Content has been last updated. | |
void | setVideos (QList< QUrl > videos) |
Set list of videos. | |
QString | smallPreviewPicture (const QString &number=QStringLiteral("1")) const |
QString | summary () const |
A summary description of this content. | |
QStringList | tags () const |
Get all the tags for this content. | |
QDateTime | updated () const |
Gets the date and time the Content has been last updated. | |
QString | version () const |
QList< QUrl > | videos () |
Get all videos for this content. | |
Represents a single content.
Attica::Content::Content | ( | ) |
Creates an empty Content.
Attica::Content::Content | ( | const Content & | other | ) |
Copy constructor.
other | the Content to copy from |
Attica::Content::~Content | ( | ) |
Destructor.
void Attica::Content::addAttribute | ( | const QString & | key, |
const QString & | value | ||
) |
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.
key | the key of the attribute |
value | the value of the attribute |
QString Attica::Content::attribute | ( | const QString & | key | ) | const |
Get an attribute that is not included in the basis set of attributes exposed by the Content class.
key | the key of the attribute |
QMap< QString, QString > Attica::Content::attributes | ( | ) | const |
Get all attributes that are not included in the basis set of attributes exposed by the Content class.
QDateTime Attica::Content::created | ( | ) | const |
Gets the date and time the Content has been created.
QString Attica::Content::description | ( | ) | const |
A description of this content.
QUrl Attica::Content::detailpage | ( | ) | const |
A webpage with the detailed description of this content.
int Attica::Content::downloads | ( | ) | const |
Gets the number of downloads for the Content (how often this has been downloaded from the server).
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.
QList< 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.
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.
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.
QList< Icon > Attica::Content::icons | ( | ) |
Get all icons for this content.
QList< Icon > Attica::Content::icons | ( | ) | const |
Get all icons for this content.
QString Attica::Content::id | ( | ) | const |
bool Attica::Content::isValid | ( | ) | const |
Checks whether this Content has an id.
true
if an id has been set, false
otherwise QString Attica::Content::name | ( | ) | const |
Gets the name of the Content.
int Attica::Content::numberOfComments | ( | ) | const |
Gets the number of comments for the Content.
int Attica::Content::rating | ( | ) | const |
Gets the rating of the Content.
void Attica::Content::setCreated | ( | const QDateTime & | created | ) |
Sets the date and time the Content has been created.
created | the new creation date and time |
void Attica::Content::setDownloads | ( | int | downloads | ) |
Sets the number of downloads for the Content.
downloads | the new number of downloads |
void Attica::Content::setIcons | ( | QList< Icon > | icons | ) |
Set list of icons.
icons | list of icons for this content |
void Attica::Content::setId | ( | const QString & | id | ) |
void Attica::Content::setName | ( | const QString & | name | ) |
Sets the name of the Content.
name | the new name |
void Attica::Content::setNumberOfComments | ( | int | numComments | ) |
Sets the number of comments for the Content.
numComments | the new number of downloads |
void Attica::Content::setRating | ( | int | rating | ) |
Sets the rating of the Content.
rating | the new rating, has to be in the range 0-100 |
void Attica::Content::setTags | ( | const QStringList & | tags | ) |
Set the list of tags.
tags | list of tags for this content |
void Attica::Content::setUpdated | ( | const QDateTime & | updated | ) |
Sets the time the Content has been last updated.
updated | the new date and time of the last update |
void Attica::Content::setVideos | ( | QList< QUrl > | videos | ) |
Set list of videos.
videos | list of videos for this content |
QString Attica::Content::summary | ( | ) | const |
A summary description of this content.
QStringList Attica::Content::tags | ( | ) | const |
Get all the tags for this content.
QDateTime Attica::Content::updated | ( | ) | const |
Gets the date and time the Content has been last updated.
QList< QUrl > Attica::Content::videos | ( | ) |
Get all videos for this content.