|
libfuoten 0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
|
#include <Fuoten/Article>
Properties | |
| QString | author |
| QString | body |
| QUrl | enclosureLink |
| QString | enclosureMime |
| qint64 | feedId |
| QString | feedTitle |
| QString | fingerprint |
| qint64 | folderId |
| QString | folderName |
| QString | guid |
| QString | guidHash |
| QString | humanPubDate |
| QString | humanPubTime |
| QDateTime | lastModified |
| QString | mediaDescription |
| QUrl | mediaThumbnail |
| QDateTime | pubDate |
| bool | rtl |
| bool | starred |
| QString | title |
| bool | unread |
| QUrl | url |
| Properties inherited from BaseItem | |
| Fuoten::Error * | error |
| qint64 | id |
| bool | inOperation |
Public Member Functions | |
| Article (Article *other, QObject *parent=nullptr) | |
| Article (qint64 id, qint64 feedId, const QString &feedTitle, const QString &guid, const QString &guidHash, const QUrl &url, const QString &title, const QString &author, const QDateTime &pubDate, const QString &body, const QString &enclosureMime, const QUrl &enclosureLink, bool unread, bool starred, const QDateTime &lastModified, const QString &fingerprint, qint64 folderId, const QString &folderName, FuotenEnums::QueueActions queue, bool rtl, const QUrl &mediaThumbnail, const QString &mediaDescription, QObject *parent=nullptr) | |
| Article (QObject *parent=nullptr) | |
| ~Article () override | |
| QString | author () const |
| QString | body () const |
| void | copy (BaseItem *other) override |
| QUrl | enclosureLink () const |
| QString | enclosureMime () const |
| qint64 | feedId () const |
| QString | feedTitle () const |
| QString | fingerprint () const |
| qint64 | folderId () const |
| QString | folderName () const |
| QString | guid () const |
| QString | guidHash () const |
| QString | humanPubDate () const |
| QString | humanPubTime () const |
| QDateTime | lastModified () const |
| Q_INVOKABLE void | mark (bool unread, bool enqueue=false) |
| Q_INVOKABLE void | mark (bool unread, Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr, bool enqueue=false) |
| QString | mediaDescription () const |
| QUrl | mediaThumbnail () const |
| QDateTime | pubDate () const |
| bool | rtl () const |
| void | setAuthor (const QString &nAuthor) |
| void | setBody (const QString &nBody) |
| void | setEnclosureLink (const QUrl &nEnclosureLink) |
| void | setEnclosureMime (const QString &nEnclosureMime) |
| void | setFeedId (qint64 nFeedId) |
| void | setFeedTitle (const QString &nFeedTitle) |
| void | setFingerprint (const QString &nFingerprint) |
| void | setFolderId (qint64 nFolderId) |
| void | setFolderName (const QString &nFolderName) |
| void | setGuid (const QString &nGuid) |
| void | setGuidHash (const QString &nGuidHash) |
| void | setLastModified (const QDateTime &nLastModified) |
| void | setMediaDescription (const QString &nMediaDescription) |
| void | setMediaThumbnail (const QUrl &nMediaThumbnail) |
| void | setPubDate (const QDateTime &nPubDate) |
| void | setRtl (bool nRtl) |
| void | setStarred (bool nStarred) |
| void | setTitle (const QString &nTitle) |
| void | setUnread (bool nUnread) |
| void | setUrl (const QUrl &nUrl) |
| Q_INVOKABLE void | star (bool starred, bool enqueue=false) |
| Q_INVOKABLE void | star (bool starred, Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr, bool enqueue=false) |
| bool | starred () const |
| QString | title () const |
| bool | unread () const |
| QUrl | url () const |
| Public Member Functions inherited from BaseItem | |
| BaseItem (QObject *parent=nullptr) | |
| ~BaseItem () override | |
| Q_INVOKABLE void | clearError () |
| Error * | error () const |
| qint64 | id () const |
| bool | inOperation () const |
| void | setId (qint64 nId) |
Additional Inherited Members | |
| Protected Member Functions inherited from BaseItem | |
| Component * | component () const |
| void | setComponent (Component *nComp) |
| void | setError (Error *nError) |
Contains information about a single article/item.
|
readwrite |
The author of the article.
| QString | author() const |
| void | setAuthor(const QString &nAuthor) |
| void | authorChanged(const QString &author) |
|
readwrite |
The text body of the article.
| QString | body() const |
| void | setBody(const QString &nBody) |
| void | bodyChanged(const QString &body) |
|
readwrite |
URL of the enclosure.
| QUrl | enclosureLink() const |
| void | setEnclosureLink(const QUrl &nEnclosureLink) |
| void | enclosureLinkChanged(const QUrl &enclosureLink) |
|
readwrite |
MIME type of an optional enclosure.
| QString | enclosureMime() const |
| void | setEnclosureMime(const QString &nEnclosureMime) |
| void | enclosureMimeChanged(const QString &enclosureMime) |
|
readwrite |
ID of the Feed this Article belongs to.
| qint64 | feedId() const |
| void | setFeedId(qint64 nFeedId) |
| void | feedIdChanged(qint64 feedId) |
|
readwrite |
Title of the feed this article belongs to.
| QString | feedTitle() const |
| void | setFeedTitle(const QString &nFeedTitle) |
| void | feedTitleChanged(const QString &feedTitle) |
|
readwrite |
Hash over title, enclosure, body and url.
| QString | fingerprint() const |
| void | setFingerprint(const QString &nFingerprint) |
| void | fingerprintChanged(const QString &fingerprint) |
|
readwrite |
ID of the folder this article belongs to.
| qint64 | folderId() const |
| void | setFolderId(qint64 nFolderId) |
| void | folderIdChanged(qint64 folderId) |
|
readwrite |
Name of the folder this article belongs to.
| QString | folderName() const |
| void | setFolderName(const QString &nFolderName) |
| void | folderNameChanged(const QString &folderName) |
|
readwrite |
Global unique identifier of the article.
| QString | guid() const |
| void | setGuid(const QString &nGuid) |
| void | guidChanged(const QString &guid) |
|
readwrite |
Hash of the global uniquie identifier of the article.
| QString | guidHash() const |
| void | setGuidHash(const QString &nGuidHash) |
| void | guidHashChanged(const QString &guidHash) |
|
read |
Returns a human readable string of the publication date.
Will be automatically created from pubDate.
| QString | getHumanPubDate() const |
| void | humanPubDateChanged(const QString &humanPubDate) |
|
read |
Return a human readable string of the publication time.
| QString | humanPubTime() const |
| void | humanPubTimeChanged(const QString &humanPubTime) |
|
readwrite |
Date and time this articles has been modified the last time.
| QDateTime | lastModified() const |
| void | setLastModified(const QDateTime &nLastModified) |
| void | lastModifiedChanged(const QDateTime &lastModified) |
|
readwrite |
Holds the description of a optional media object.
| QString | mediaDescription() const |
| void | setMediaDescription(const QString &nMediaDescription) |
| void | mediaDescriptionChanged(const QString &mediaDescription) |
|
readwrite |
Holds the url to a optional media thumbnail.
| QUrl | mediaThumbnail() const |
| void | setMediaThumbnail(const QUrl &nMediaThumbnail) |
| void | mediaThumbnailChanged(const QUrl &mediaThumbnail) |
|
readwrite |
Date and time the article was published.
| QDateTime | pubDate() const |
| void | setPubDate(const QDateTime &nPubDate) |
| void | pubDateChanged(const QDateTime &pubDate) |
|
readwrite |
Returns true if the text is right to left.
| bool | rtl() const |
| void | setRtl(bool nRtl) |
| void | rtlChanged(bool rtl) |
|
readwrite |
True if the user has starred this article.
| bool | starred() const |
| void | setStarred(bool nStarred) |
| void | starredChanged(bool starred) |
|
readwrite |
Title of the article.
| QString | title() const |
| void | setTitle(const QString &nTitle) |
| void | titleChanged(const QString &title) |
|
readwrite |
True if the article has not been read.
| bool | unread() const |
| void | setUnread(bool nUnread) |
| void | unreadChanged(bool unread) |
|
readwrite |
URL of the article.
| QUrl | url() const |
| void | setUrl(const QUrl &nUrl) |
| void | urlChanged(const QUrl &url) |
|
explicit |
Constructs a new Article object with default values and the given parent.
| Article | ( | qint64 | id, |
| qint64 | feedId, | ||
| const QString & | feedTitle, | ||
| const QString & | guid, | ||
| const QString & | guidHash, | ||
| const QUrl & | url, | ||
| const QString & | title, | ||
| const QString & | author, | ||
| const QDateTime & | pubDate, | ||
| const QString & | body, | ||
| const QString & | enclosureMime, | ||
| const QUrl & | enclosureLink, | ||
| bool | unread, | ||
| bool | starred, | ||
| const QDateTime & | lastModified, | ||
| const QString & | fingerprint, | ||
| qint64 | folderId, | ||
| const QString & | folderName, | ||
| FuotenEnums::QueueActions | queue, | ||
| bool | rtl, | ||
| const QUrl & | mediaThumbnail, | ||
| const QString & | mediaDescription, | ||
| QObject * | parent = nullptr ) |
Constructs a new Article object with the given arguments and parent.
|
explicit |
Constructs a new Article object with the given parent by copying the properties of other to the new object.
|
override |
Deconstructs the Article object.
| QString author | ( | ) | const |
Getter function for the author property.
|
signal |
This is emitted if the value of the author property changes.
| QString body | ( | ) | const |
Getter function for the body property.
|
signal |
This is emitted if the value of the body property changes.
|
overridevirtual |
| QUrl enclosureLink | ( | ) | const |
Getter function for the enclosureLink property.
|
signal |
This is emitted if the value of the enclosureLink property changes.
| QString enclosureMime | ( | ) | const |
Getter function for the enclosureMime property.
|
signal |
This is emitted if the value of the enclosureMime property changes.
| qint64 feedId | ( | ) | const |
Getter function for the feedId property.
|
signal |
This is emitted if the value of the feedId property changes.
| QString feedTitle | ( | ) | const |
Getter function for the feedTitle property.
|
signal |
This is emitted if the value of the feedTitle property changes.
| QString fingerprint | ( | ) | const |
Getter function for the fingerprint property.
|
signal |
This is emitted if the value of the fingerprint property changes.
| qint64 folderId | ( | ) | const |
Getter function for the folderId property.
|
signal |
This is emitted if the value of the folderId property changes.
| QString folderName | ( | ) | const |
Getter function for the folderName property.
|
signal |
This is emitted if the value of the folderName property changes.
| QString guid | ( | ) | const |
Getter function for the guid property.
|
signal |
This is emitted if the value of the guid property changes.
| QString guidHash | ( | ) | const |
Getter function for the guidHash property.
|
signal |
This is emitted if the value of the guidHash property changes.
| QString humanPubDate | ( | ) | const |
Getter function for the humanPubDate property.
|
signal |
This is emitted if the value of the humanPubDate property changes.
| QString humanPubTime | ( | ) | const |
Getter function for the humanPubTime property.
|
signal |
This is emitted if the value of the humanPubTime property changes.
| QDateTime lastModified | ( | ) | const |
Getter function for the lastModified property.
|
signal |
This is emitted if the value of the lastModified property changes.
| void mark | ( | bool | unread, |
| bool | enqueue = false ) |
Marks this article as read or unread on the server. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This uses Component::defaultConfiguration() and Component::defaultStorage().
| void mark | ( | bool | unread, |
| Fuoten::AbstractConfiguration * | config, | ||
| Fuoten::AbstractStorage * | storage = nullptr, | ||
| bool | enqueue = false ) |
Marks this article as read or unread on the server.
Will also mark the article as read or unread in the local storage, if a valid AbstractStorage object is available.
| unread | set to true to mark the item as unread, set to false to mark it as read |
| config | pointer to an AbstractConfiguration object that containts the authentication credentials |
| storage | pointer to an AbstractStorage object to update the local storage after successful request |
| enqueue | true to enqueue the marking local up to the next sync, valid storage has to be available |
| QString mediaDescription | ( | ) | const |
Getter function for the mediaDescription property.
|
signal |
This is emitted if the value of the mediaDescription property changes.
| QUrl mediaThumbnail | ( | ) | const |
Getter function for the mediaThumbnail property.
|
signal |
This is emitted if the value of the mediaThumbnail property changes.
| QDateTime pubDate | ( | ) | const |
Getter function for the pubDate property.
|
signal |
This is emitted if the value of the pubDate property changes.
| bool rtl | ( | ) | const |
Getter function for the rtl property.
|
signal |
| void setAuthor | ( | const QString & | nAuthor | ) |
Setter function for the author property. Emits the authorChanged() signal if nAuthor is not equal to the stored value.
| void setBody | ( | const QString & | nBody | ) |
Setter function for the body property. Emits the bodyChanged() signal if nBody is not equal to the stored value.
| void setEnclosureLink | ( | const QUrl & | nEnclosureLink | ) |
Setter function for the enclosureLink property. Emits the enclosureLinkChanged() signal if nEnclosureLink is not equal to the stored value.
| void setEnclosureMime | ( | const QString & | nEnclosureMime | ) |
Setter function for the enclosureMime property. Emits the enclosureMimeChanged() signal if nEnclosureMime is not equal to the stored value.
| void setFeedId | ( | qint64 | nFeedId | ) |
Setter function for the feedId property. Emits the feedIdChanged() signal if nFeedId is not equal to the stored value.
| void setFeedTitle | ( | const QString & | nFeedTitle | ) |
Setter function for the feedTitle property. Emits the feedTitleChanged() signal if nFeedTitle is not equal to the stored value.
| void setFingerprint | ( | const QString & | nFingerprint | ) |
Setter function for the fingerprint property. Emits the fingerprintChanged() signal if nFingerprint is not equal to the stored value.
| void setFolderId | ( | qint64 | nFolderId | ) |
Setter function for the folderId property. Emits the folderIdChanged() signal if nFolderId is not equal to the stored value.
| void setFolderName | ( | const QString & | nFolderName | ) |
Setter function for the folderName property. Emits the folderNameChanged() signal if nFolderName is not equal to the stored value.
| void setGuid | ( | const QString & | nGuid | ) |
Setter function for the guid property. Emits the guidChanged() signal if nGuid is not equal to the stored value.
| void setGuidHash | ( | const QString & | nGuidHash | ) |
Setter function for the guidHash property. Emits the guidHashChanged() signal if nGuidHash is not equal to the stored value.
| void setLastModified | ( | const QDateTime & | nLastModified | ) |
Setter function for the lastModified property. Emits the lastModifiedChanged() signal if nLastModified is not equal to the stored value.
| void setMediaDescription | ( | const QString & | nMediaDescription | ) |
Setter function for the mediaDescription property. Emits the mediaDescriptionChanged() signal if nMediaDescription is not equal to the stored value.
| void setMediaThumbnail | ( | const QUrl & | nMediaThumbnail | ) |
Setter function for the mediaThumbnail property. Emits the mediaThumbnailChanged() signal if nMediaThumbnail is not equal to the stored value.
| void setPubDate | ( | const QDateTime & | nPubDate | ) |
Setter function for the pubDate property. Emits the pubDateChanged() signal if nPubDate is not equal to the stored value.
| void setRtl | ( | bool | nRtl | ) |
Setter function for the rtl property. Emits the rtlChanged() signal if nRtl is not equal to the stored value.
| void setStarred | ( | bool | nStarred | ) |
Setter function for the starred property. Emits the starredChanged() signal if nStarred is not equal to the stored value.
| void setTitle | ( | const QString & | nTitle | ) |
Setter function for the title property. Emits the titleChanged() signal if nTitle is not equal to the stored value.
| void setUnread | ( | bool | nUnread | ) |
Setter function for the unread property. Emits the unreadChanged() signal if nUnread is not equal to the stored value.
| void setUrl | ( | const QUrl & | nUrl | ) |
Setter function for the url property. Emits the urlChanged() signal if nUrl is not equal to the stored value.
| void star | ( | bool | starred, |
| bool | enqueue = false ) |
Marks this article as starred or unstarred on the remote server. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This uses Component::defaultConfiguration() and Component::defaultStorage().
| void star | ( | bool | starred, |
| Fuoten::AbstractConfiguration * | config, | ||
| Fuoten::AbstractStorage * | storage = nullptr, | ||
| bool | enqueue = false ) |
Marks this article as starred or unstarred on the remote server.
Will also mark the article as starred/unstarred in the local storage if a valid AbstractStorage object is available.
| starred | ste to true to mark the item as starred, set to false to mark it as unstarred |
| config | pointer to an AbstractConfiguration object that containts the authentication credentials |
| storage | pointer to an AbstractStorage object to update the local storage after successful request |
| enqueue | true to enqueue the un/starring local up to the next sync, valid storage has to be available |
| bool starred | ( | ) | const |
Getter function for the starred property.
|
signal |
This is emitted if the value of the starred property changes.
| QString title | ( | ) | const |
Getter function for the title property.
|
signal |
This is emitted if the value of the title property changes.
| bool unread | ( | ) | const |
Getter function for the unread property.
|
signal |
This is emitted if the value of the unread property changes.
| QUrl url | ( | ) | const |
Getter function for the url property.
|
signal |
This is emitted if the value of the url property changes.