|
libfuoten 0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
|
#include <Fuoten/Folder>
Properties | |
| uint | feedCount |
| QString | name |
| uint | unreadCount |
| Properties inherited from BaseItem | |
| Fuoten::Error * | error |
| qint64 | id |
| bool | inOperation |
Public Member Functions | |
| Folder (qint64 id, const QString &name, uint feedCount, uint unreadCount, QObject *parent=nullptr) | |
| Folder (QObject *parent=nullptr) | |
| ~Folder () override | |
| void | copy (BaseItem *other) override |
| uint | feedCount () const |
| Q_INVOKABLE void | markAsRead (bool enqueue=false) |
| Q_INVOKABLE void | markAsRead (Fuoten::AbstractConfiguration *config, Fuoten::AbstractStorage *storage, bool enqueue=false) |
| QString | name () 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 | setFeedCount (uint nFeedCount) |
| void | setName (const QString &nName) |
| void | setUnreadCount (uint nUnreadCount) |
| uint | unreadCount () 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 | feedCountChanged (uint feedCount) |
| void | nameChanged (const QString &name) |
| void | unreadCountChanged (uint unreadCount) |
| 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 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 | ( | qint64 | id, |
| const QString & | name, | ||
| uint | feedCount, | ||
| uint | unreadCount, | ||
| QObject * | parent = nullptr ) |
Constructs a new Folder object from the given arguments.
|
overridevirtual |
| uint 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 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 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 name | ( | ) | const |
Returns the name of the folder.
|
signal |
This signal will be emitted if the folder name changes.
| 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().
| void 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 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 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 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.
|
signal |
This signal will be emitted if the number of unread items in the folder changes.