|
libfuoten 0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
|
#include <Fuoten/Feed>
Public Types | |
| enum | FeedOrdering : quint8 { NoSpecial = 0 , OldestFirst = 1 , NewestFirst = 2 } |
Properties | |
| QDateTime | added |
| QUrl | faviconLink |
| qint64 | folderId |
| QString | folderName |
| QString | lastUpdateError |
| QUrl | link |
| Fuoten::Feed::FeedOrdering | ordering |
| bool | pinned |
| QString | title |
| uint | unreadCount |
| uint | updateErrorCount |
| QUrl | url |
| Properties inherited from BaseItem | |
| Fuoten::Error * | error |
| qint64 | id |
| bool | inOperation |
Public Member Functions | |
| Feed (qint64 id, qint64 folderId, const QString &title, const QUrl &url, const QUrl &link, const QDateTime &added, uint unreadCount, Feed::FeedOrdering ordering, bool pinned, uint updateErrorCount, const QString &lastUpdateError, const QUrl &faviconLink, const QString &folderName, QObject *parent=nullptr) | |
| Feed (QObject *parent=nullptr) | |
| ~Feed () override | |
| QDateTime | added () const |
| void | copy (BaseItem *other) override |
| QUrl | faviconLink () const |
| qint64 | folderId () const |
| QString | folderName () const |
| QString | lastUpdateError () const |
| QUrl | link () const |
| Q_INVOKABLE void | markAsRead (bool enqueue=false) |
| Q_INVOKABLE void | markAsRead (Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage, bool enqueue=false) |
| Q_INVOKABLE void | move (qint64 targetFolderId) |
| Q_INVOKABLE void | move (qint64 targetFolderId, Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr) |
| FeedOrdering | ordering () const |
| bool | pinned () const |
| Q_INVOKABLE void | remove () |
| Q_INVOKABLE void | remove (Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr) |
| Q_INVOKABLE void | rename (const QString &newName) |
| Q_INVOKABLE void | rename (const QString &newName, Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr) |
| void | setAdded (const QDateTime &nAdded) |
| void | setFaviconLink (const QUrl &nFaviconLink) |
| void | setFolderId (qint64 nFolderId) |
| void | setFolderName (const QString &nFolderName) |
| void | setLastUpdateError (const QString &nLastUpdateError) |
| void | setLink (const QUrl &nLink) |
| void | setOrdering (Fuoten::Feed::FeedOrdering nOrdering) |
| void | setPinned (bool nPinned) |
| void | setTitle (const QString &nTitle) |
| void | setUnreadCount (uint nUnreadCount) |
| void | setUpdateErrorCount (uint nUpdateErrorCount) |
| void | setUrl (const QUrl &nUrl) |
| QString | title () const |
| uint | unreadCount () const |
| uint | updateErrorCount () 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) |
Signals | |
| void | addedChanged (const QDateTime &added) |
| void | faviconLinkChanged (const QUrl &faviconLink) |
| void | folderIdChanged (qint64 folderId) |
| void | folderNameChanged (const QString &folderName) |
| void | lastUpdateErrorChanged (const QString &lastUpdateError) |
| void | linkChanged (const QUrl &link) |
| void | orderingChanged (Fuoten::Feed::FeedOrdering ordering) |
| void | pinnedChanged (bool pinned) |
| void | titleChanged (const QString &title) |
| void | unreadCountChanged (uint unreadCount) |
| void | updateErrorCountChanged (uint updateErrorCount) |
| void | urlChanged (const QUrl &url) |
| Signals inherited from BaseItem | |
| void | errorChanged (Fuoten::Error *error) |
| void | idChanged (qint64 id) |
| void | inOperationChanged (bool inOperation) |
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 feed.
| enum FeedOrdering : quint8 |
|
readwrite |
Date and time the feed has been added.
| QDateTime | added() const |
| void | setAdded(const QDateTime &nAdded) |
| void | addedChanged(const QDateTime &added) |
|
readwrite |
The URL to the feed's favicon.
| QUrl | faviconLink() const |
| void | setFaviconLink(const QUrl &nFaviconLink) |
| void | faviconLinkChanged(const QUrl &faviconLink) |
|
readwrite |
The ID of the folder, the feed belongs to.
| qint64 | folderId() const |
| void | setFolderId(qint64 nFolderId) |
| void | folderIdChanged(qint64 folderId) |
|
readwrite |
The name of the folder the feed belongs to.
| QString | folderName() const |
| void | setFolderName(const QString &nFolderName) |
| void | folderNameChanged(const QString &folderName) |
|
readwrite |
Contains the last update error message, if any.
| QString | lastUpdateError() const |
| void | setLastUpdateError(const QString &nLastUpdateError) |
| void | lastUpdateErrorChanged(const QString &lastUpdateError) |
|
readwrite |
Link to the homepage of the feed.
| QUrl | link() const |
| void | setLink(const QUrl &nLink) |
| void | linkChanged(const QUrl &link) |
|
readwrite |
The ordering of the articles in this feed on the server.
| FeedOrdering | ordering() const |
| void | setOrdering(FeedOrdering nOrdering) |
| void | orderingChanged(FeedOrdering ordering) |
|
readwrite |
True if the feed is pinned.
| bool | pinned() const |
| void | setPinned(bool nPinned) |
| void | pinnedChanged(bool pinned) |
|
readwrite |
The title of the feed.
| QString | title() const |
| void | setTitle(const QString &nTitle) |
| void | titleChanged(const QString &title) |
|
readwrite |
The number of unread items in this feed.
| uint | unreadCount() const |
| void | setUnreadCount(uint nUnreadCount) |
| void | unreadCountChanged(uint unreadCount) |
|
readwrite |
Indicating that the feed has faild to update that many times.
| uint | updateErrorCount() const |
| void | setUpdateErrorCount(uint nUpdateErrorCount) |
| void | updateErrorCountChanged(uint updateErrorCount) |
|
readwrite |
The URL of the feed.
| QUrl | url() const |
| void | setUrl(const QUrl &nUrl) |
| void | urlChanged(const QUrl &url) |
|
explicit |
Constructs a new empty Feed object with the given parent.
| Feed | ( | qint64 | id, |
| qint64 | folderId, | ||
| const QString & | title, | ||
| const QUrl & | url, | ||
| const QUrl & | link, | ||
| const QDateTime & | added, | ||
| uint | unreadCount, | ||
| Feed::FeedOrdering | ordering, | ||
| bool | pinned, | ||
| uint | updateErrorCount, | ||
| const QString & | lastUpdateError, | ||
| const QUrl & | faviconLink, | ||
| const QString & | folderName, | ||
| QObject * | parent = nullptr ) |
Constructs a new Feed object with the given arguments.
|
override |
Deconstructs the Feed object.
| QDateTime added | ( | ) | const |
Returns the date and time the feed has been added.
|
signal |
This signal is emitted if the date and time changes the feed was added.
|
overridevirtual |
| QUrl faviconLink | ( | ) | const |
Returns the URL of the feed's favion.
|
signal |
This signal is emitted if the URL to the favicon of this feed changes.
|
signal |
| QString folderName | ( | ) | const |
Returns the name of the Folder the feed belongs to.
|
signal |
This signal is emitted if the name of the Folder changes the feed belongs to.
| QString lastUpdateError | ( | ) | const |
Returns the message of the last update error.
|
signal |
This signal is emitted if the message of the last update error changes.
| QUrl link | ( | ) | const |
Return the URL of the feed's homepage.
|
signal |
This signal is emitted if the URL of the homepage of this feed changes.
| void markAsRead | ( | bool | enqueue = false | ) |
Marks the complete feed as read on the remote server and local. 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 markAsRead | ( | Fuoten::AbstractConfiguration * | config, |
| Fuoten::AbstractStorage * | storage, | ||
| bool | enqueue = false ) |
Marks the complete feed as read on the remote server and local.
| config | pointer to an AbstractConfiguration subclass to get the account configuration |
| storage | pointer to an AbstractStorage subclass to query the newest item ID in the feed and update the local storage |
| enqueue | true to enqueue the marking local up to the next sync, valid storage has to be available |
| void move | ( | qint64 | targetFolderId | ) |
Moves this feed to a different folder 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 move | ( | qint64 | targetFolderId, |
| Fuoten::AbstractConfiguration * | config, | ||
| Fuoten::AbstractStorage * | storage = nullptr ) |
Moves this feed to a different folder on the remote server.
Will also move the feed in the local storage if a valid AbstractStorage object has been set.
| targetFolderId | ID of the folder the feed should be moved to |
| config | pointer to an AbstractConfiguration subclass to get the account configuration |
| storage | pointer to an AbstractStorage subclass to move the feed in the local storage |
| Feed::FeedOrdering ordering | ( | ) | const |
Returns the ordering of the items in this feed on the server.
|
signal |
This signal is emitted if the server side ordering of this feed changes.
| bool pinned | ( | ) | const |
Returns true if this feed is pinned.
|
signal |
This signal is emitted if the pinned status of the feed changes.
| void remove | ( | ) |
Removes this feed from 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 remove | ( | Fuoten::AbstractConfiguration * | config, |
| Fuoten::AbstractStorage * | storage = nullptr ) |
Removes this feed from the remote server.
Will also remove the feed from the local storage if a valid AbstractStorage object has been set.
| config | pointer to an AbstractConfiguration subclass to get the account configuration |
| storage | pointer to an AbstractStorage subclass to remove the feed from the local storage |
| void rename | ( | const QString & | newName | ) |
Sets a new name for the feed 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 rename | ( | const QString & | newName, |
| Fuoten::AbstractConfiguration * | config, | ||
| Fuoten::AbstractStorage * | storage = nullptr ) |
Sets a new name for the feed on the remote server.
Will also rename the feed in the local storage if a valid AbstractStorage object has been set.
| newName | the new name for the feed |
| config | pointer to an AbstractConfiguration subclass to get the account configuration |
| storage | pointer to an AbstractStorage subclass to rename the feed in the local storage |
| void setAdded | ( | const QDateTime & | nAdded | ) |
Sets the date and time the feed has been added.
| void setFaviconLink | ( | const QUrl & | nFaviconLink | ) |
Sets the URL of the feed's favicon.
| void setFolderId | ( | qint64 | nFolderId | ) |
| void setFolderName | ( | const QString & | nFolderName | ) |
Sets the name of the Folder the feed belongs to.
| void setLastUpdateError | ( | const QString & | nLastUpdateError | ) |
Sets the message of the last update error.
| void setLink | ( | const QUrl & | nLink | ) |
Sets the URL to the feed's homepage.
| void setOrdering | ( | Fuoten::Feed::FeedOrdering | nOrdering | ) |
Sets the ordering of the items in this feed on the server.
| void setPinned | ( | bool | nPinned | ) |
Set to true if this feed is pinned.
| void setTitle | ( | const QString & | nTitle | ) |
Sets the title of the feed.
| void setUnreadCount | ( | uint | nUnreadCount | ) |
Sets the count of unread items in this feed.
| void setUpdateErrorCount | ( | uint | nUpdateErrorCount | ) |
Sets the count of update errors.
| void setUrl | ( | const QUrl & | nUrl | ) |
Sets the URL of the feed.
| QString title | ( | ) | const |
Returns the title of the feed.
|
signal |
This signal is emitted if the feed's title changes.
| uint unreadCount | ( | ) | const |
Returns the count of unread items in this feed.
|
signal |
This signal is emitted if the count of unread items/articles in this feed changes.
| uint updateErrorCount | ( | ) | const |
Returns the count of update errors.
|
signal |
This signal is emitted if the count of update errors of this feed changes.
| QUrl url | ( | ) | const |
Returns the URL of the feed.
|
signal |
This signal is emitted if the feed's URL changes.