|
libfuoten 0.8.2
Qt based library to access the Nextcloud News App API.
|
Contains information about a single feed. More...
#include <Fuoten/Feed>
Public Types | |
| enum | FeedOrdering : quint8 { NoSpecial = 0 , OldestFirst = 1 , NewestFirst = 2 } |
| Type of the article ordering in this feed on the server. More... | |
Properties | |
| QDateTime | added |
| Date and time the feed has been added. | |
| QUrl | faviconLink |
| The URL to the feed's favicon. | |
| qint64 | folderId |
| The ID of the folder, the feed belongs to. | |
| QString | folderName |
| The name of the folder the feed belongs to. | |
| QString | lastUpdateError |
| Contains the last update error message, if any. | |
| QUrl | link |
| Link to the homepage of the feed. | |
| Fuoten::Feed::FeedOrdering | ordering |
| The ordering of the articles in this feed on the server. | |
| bool | pinned |
| True if the feed is pinned. | |
| QString | title |
| The title of the feed. | |
| uint | unreadCount |
| The number of unread items in this feed. | |
| uint | updateErrorCount |
| Indicating that the feed has faild to update that many times. | |
| QUrl | url |
| The URL of the feed. | |
| Properties inherited from Fuoten::BaseItem | |
| Fuoten::Error * | error |
Pointer to an Error object, if an error occurred, otherwise returns a nullptr. | |
| qint64 | id |
| Database ID of the Article, Feed or Folder. | |
| bool | inOperation |
| Returns true while there is an operation running on the item. | |
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) | |
| Constructs a new Feed object with the given arguments. | |
| Feed (QObject *parent=nullptr) | |
| Constructs a new empty Feed object with the given parent. | |
| ~Feed () override | |
| Deconstructs the Feed object. | |
| QDateTime | added () const |
| Returns the date and time the feed has been added. | |
| void | copy (BaseItem *other) override |
| Makes a deep copy of other. | |
| QUrl | faviconLink () const |
| Returns the URL of the feed's favion. | |
| qint64 | folderId () const |
| Return the ID of the Folder the feed belongs to. | |
| QString | folderName () const |
| Returns the name of the Folder the feed belongs to. | |
| QString | lastUpdateError () const |
| Returns the message of the last update error. | |
| QUrl | link () const |
| Return the URL of the feed's homepage. | |
| Q_INVOKABLE 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(). | |
| Q_INVOKABLE void | markAsRead (Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage, bool enqueue=false) |
| Marks the complete feed as read on the remote server and local. | |
| Q_INVOKABLE 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(). | |
| Q_INVOKABLE void | move (qint64 targetFolderId, Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr) |
| Moves this feed to a different folder on the remote server. | |
| FeedOrdering | ordering () const |
| Returns the ordering of the items in this feed on the server. | |
| bool | pinned () const |
| Returns true if this feed is pinned. | |
| Q_INVOKABLE 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(). | |
| Q_INVOKABLE void | remove (Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr) |
| Removes this feed from the remote server. | |
| Q_INVOKABLE 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(). | |
| Q_INVOKABLE void | rename (const QString &newName, Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr) |
| Sets a new name for the feed on the remote server. | |
| 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) |
| Sets the ID of the Folder the feed belongs to. | |
| 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. | |
| uint | unreadCount () const |
| Returns the count of unread items in this feed. | |
| uint | updateErrorCount () const |
| Returns the count of update errors. | |
| QUrl | url () const |
| Returns the URL of the feed. | |
| Public Member Functions inherited from Fuoten::BaseItem | |
| BaseItem (QObject *parent=nullptr) | |
| Constructs an empty base item with the given parent. | |
| ~BaseItem () override | |
| Deconstructs the base item. | |
| Q_INVOKABLE void | clearError () |
Removes the current Error object and sets a nullptr. | |
| Error * | error () const |
Returns a pointer to an Error object, if any error occurred, otherwise a nullptr. | |
| qint64 | id () const |
| Returns the ID of the item. | |
| bool | inOperation () const |
| Returns true while there is some operation ongoing directly on the item. | |
| void | setId (qint64 nId) |
| Sets the database ID of the item/feed/folder. | |
Signals | |
| void | addedChanged (const QDateTime &added) |
| This signal is emitted if the date and time changes the feed was added. | |
| void | faviconLinkChanged (const QUrl &faviconLink) |
| This signal is emitted if the URL to the favicon of this feed changes. | |
| void | folderIdChanged (qint64 folderId) |
| This signal is emitted if the id of the Folder changes the feed belongs to. | |
| void | folderNameChanged (const QString &folderName) |
| This signal is emitted if the name of the Folder changes the feed belongs to. | |
| void | lastUpdateErrorChanged (const QString &lastUpdateError) |
| This signal is emitted if the message of the last update error changes. | |
| void | linkChanged (const QUrl &link) |
| This signal is emitted if the URL of the homepage of this feed changes. | |
| void | orderingChanged (Fuoten::Feed::FeedOrdering ordering) |
| This signal is emitted if the server side ordering of this feed changes. | |
| void | pinnedChanged (bool pinned) |
| This signal is emitted if the pinned status of the feed changes. | |
| void | titleChanged (const QString &title) |
| This signal is emitted if the feed's title changes. | |
| void | unreadCountChanged (uint unreadCount) |
| This signal is emitted if the count of unread items/articles in this feed changes. | |
| void | updateErrorCountChanged (uint updateErrorCount) |
| This signal is emitted if the count of update errors of this feed changes. | |
| void | urlChanged (const QUrl &url) |
| This signal is emitted if the feed's URL changes. | |
| Signals inherited from Fuoten::BaseItem | |
| void | errorChanged (Fuoten::Error *error) |
| This signal will be emitted whenever the error property changes. May return a nullptr. | |
| void | idChanged (qint64 id) |
| This signal will be emitted whenever the id property changes. | |
| void | inOperationChanged (bool inOperation) |
| This signal will be emitted whenever the inOperation property changes. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Fuoten::BaseItem | |
| Component * | component () const |
| Returns the pointer to the currently active Component. | |
| void | setComponent (Component *nComp) |
| Sets the API component to perform an internal API request. | |
| void | setError (Error *nError) |
| Sets the Error object of the error property. | |
Contains information about a single feed.
| enum Fuoten::Feed::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::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.
|
signal |
This signal is emitted if the date and time changes the feed was added.
|
overridevirtual |
| QUrl Feed::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 Feed::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 Feed::lastUpdateError | ( | ) | const |
Returns the message of the last update error.
|
signal |
This signal is emitted if the message of the last update error changes.
|
signal |
This signal is emitted if the URL of the homepage of this feed changes.
| void Feed::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 Feed::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 Feed::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 Feed::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 Feed::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 Feed::pinned | ( | ) | const |
Returns true if this feed is pinned.
|
signal |
This signal is emitted if the pinned status of the feed changes.
| void Feed::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 Feed::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 Feed::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 Feed::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 Feed::setAdded | ( | const QDateTime & | nAdded | ) |
Sets the date and time the feed has been added.
| void Feed::setFaviconLink | ( | const QUrl & | nFaviconLink | ) |
Sets the URL of the feed's favicon.
| void Feed::setFolderId | ( | qint64 | nFolderId | ) |
| void Feed::setFolderName | ( | const QString & | nFolderName | ) |
Sets the name of the Folder the feed belongs to.
| void Feed::setLastUpdateError | ( | const QString & | nLastUpdateError | ) |
Sets the message of the last update error.
| void Feed::setOrdering | ( | Fuoten::Feed::FeedOrdering | nOrdering | ) |
Sets the ordering of the items in this feed on the server.
| void Feed::setPinned | ( | bool | nPinned | ) |
Set to true if this feed is pinned.
| void Feed::setUnreadCount | ( | uint | nUnreadCount | ) |
Sets the count of unread items in this feed.
| void Feed::setUpdateErrorCount | ( | uint | nUpdateErrorCount | ) |
Sets the count of update errors.
|
signal |
This signal is emitted if the feed's title changes.
| uint Feed::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 Feed::updateErrorCount | ( | ) | const |
Returns the count of update errors.
|
signal |
This signal is emitted if the count of update errors of this feed changes.
|
signal |
This signal is emitted if the feed's URL changes.