|
libfuoten 0.8.2
Qt based library to access the Nextcloud News App API.
|
Contains information about a single folder. More...
#include <Fuoten/Folder>
Properties | |
| uint | feedCount |
| Returns the number of feeds conained in this folder. | |
| QString | name |
| The name of the folder. | |
| uint | unreadCount |
| Returns the number of unread items in this folder. | |
| 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 | |
| Folder (qint64 id, const QString &name, uint feedCount, uint unreadCount, QObject *parent=nullptr) | |
| Constructs a new Folder object from the given arguments. | |
| Folder (QObject *parent=nullptr) | |
| Constructs a new empty Folder object with the given parent. | |
| ~Folder () override | |
| Deconstructs the Folder object. | |
| void | copy (BaseItem *other) override |
| Makes a deep copy of other. | |
| uint | feedCount () const |
| Returns the number of feeds contained in this folder. | |
| Q_INVOKABLE void | markAsRead (bool enqueue=false) |
| Marks the complete folder 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 folder as read on the remote server and local. | |
| QString | name () const |
| Returns the name of the folder. | |
| Q_INVOKABLE void | remove () |
| Removes this folder 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 folder from the remote server. | |
| Q_INVOKABLE void | rename (const QString &newName) |
| Sets a new name for the 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 | rename (const QString &newName, Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage=nullptr) |
| Sets a new name for the folder on the remote server. | |
| void | setFeedCount (uint nFeedCount) |
| Sets the number of feeds the folder contains. | |
| void | setName (const QString &nName) |
| Sets the name of the folder. | |
| void | setUnreadCount (uint nUnreadCount) |
| Sets the number of unread items in this folder. | |
| uint | unreadCount () const |
| Returns the number of unread items in this folder. | |
| 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 | feedCountChanged (uint feedCount) |
| This signal will be emitted if the number of feeds in the folder changes. | |
| void | nameChanged (const QString &name) |
| This signal will be emitted if the folder name changes. | |
| void | unreadCountChanged (uint unreadCount) |
| This signal will be emitted if the number of unread items in the folder 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 folder.
|
read |
Returns the number of feeds conained in this folder.
| uint | feedCount() const |
| void | feedCountChanged(uint feedCount) |
|
read |
The name of the folder.
| QString | name() const |
| void | nameChanged(const QString &name) |
|
read |
Returns the number of unread items in this folder.
| uint | unreadCount() const |
| void | unreadCountChanged(uint unreadCount) |
|
explicit |
Constructs a new empty Folder object with the given parent.
|
override |
Deconstructs the Folder object.
| Folder::Folder | ( | qint64 | id, |
| const QString & | name, | ||
| uint | feedCount, | ||
| uint | unreadCount, | ||
| QObject * | parent = nullptr ) |
Constructs a new Folder object from the given arguments.
|
overridevirtual |
| uint Folder::feedCount | ( | ) | const |
Returns the number of feeds contained in this folder.
|
signal |
This signal will be emitted if the number of feeds in the folder changes.
| void Folder::markAsRead | ( | bool | enqueue = false | ) |
Marks the complete folder 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 Folder::markAsRead | ( | Fuoten::AbstractConfiguration * | config, |
| Fuoten::AbstractStorage * | storage, | ||
| bool | enqueue = false ) |
Marks the complete folder 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 folder and update the local storage |
| enqueue | true to enqueue the marking local up to the next sync, valid storage has to be available |
| QString Folder::name | ( | ) | const |
Returns the name of the folder.
|
signal |
This signal will be emitted if the folder name changes.
| void Folder::remove | ( | ) |
Removes this folder 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 Folder::remove | ( | Fuoten::AbstractConfiguration * | config, |
| Fuoten::AbstractStorage * | storage = nullptr ) |
Removes this folder from the remote server.
Will also remove the folder from the local storage if a valid AbstractStorage object has been set.
This function is invokable from QML.
| void Folder::rename | ( | const QString & | newName | ) |
Sets a new name for the 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 Folder::rename | ( | const QString & | newName, |
| Fuoten::AbstractConfiguration * | config, | ||
| Fuoten::AbstractStorage * | storage = nullptr ) |
Sets a new name for the folder on the remote server.
Will also rename the folder in the local storage if a valid AbstractStorage object has been set.
This function is invokable from QML.
| void Folder::setFeedCount | ( | uint | nFeedCount | ) |
Sets the number of feeds the folder contains.
| void Folder::setUnreadCount | ( | uint | nUnreadCount | ) |
Sets the number of unread items in this folder.
| uint Folder::unreadCount | ( | ) | const |
Returns the number of unread items in this folder.
|
signal |
This signal will be emitted if the number of unread items in the folder changes.