|
libfuoten 0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
|
#include <Fuoten/Model/AbstractFolderModel>
Public Member Functions | |
| AbstractFolderModel (QObject *parent=nullptr) | |
| ~AbstractFolderModel () override | |
| QModelIndex | findByID (qint64 id) const override |
| Public Member Functions inherited from BaseModel | |
| BaseModel (QObject *parent=nullptr) | |
| ~BaseModel () override | |
| double | doubleParentId () const |
| virtual QHash< qint64, QModelIndex > | findByIDs (const IdList &ids) const |
| bool | inOperation () const |
| int | limit () const |
| bool | loaded () const |
| qint64 | parentId () const |
| void | setDoubleParentId (double nDoubleParentId) |
| void | setLimit (int nLimit) |
| void | setParentId (qint64 nParentId) |
| void | setSortingRole (FuotenEnums::SortingRole nSortingRole) |
| void | setSortOrder (Qt::SortOrder nSortOrder) |
| void | setStorage (AbstractStorage *nStorage) |
| void | setUnreadOnly (bool nUnreadOnly) |
| FuotenEnums::SortingRole | sortingRole () const |
| Qt::SortOrder | sortOrder () const |
| AbstractStorage * | storage () const |
| bool | unreadOnly () const |
Public Slots | |
| void | load () override |
| Public Slots inherited from BaseModel | |
| virtual void | load ()=0 |
| virtual void | reload () |
Protected Slots | |
| void | feedCreated (qint64 feedId, qint64 folderId) |
| void | feedMarkedRead (qint64 id) |
| void | feedsRequested (const Fuoten::IdList &updatedFeeds, const Fuoten::IdList &newFeeds, const Fuoten::IdList &deletedFeeds) |
| void | folderCreated (qint64 id, const QString &name) |
| void | folderDeleted (qint64 id) |
| void | folderMarkedRead (qint64 id, qint64 newestItem) |
| void | folderRenamed (qint64 id, const QString &newName) |
| void | foldersRequested (const QList< QPair< qint64, QString > > &updatedFolders, const QList< QPair< qint64, QString > > &newFolders, const Fuoten::IdList &deletedFolders) |
| void | itemMarked (qint64 itemId, bool unread) |
| void | updateCountValues () |
Protected Member Functions | |
| void | clear () override |
| QList< Folder * > | folders () const |
| void | handleStorageChanged (AbstractStorage *old) override |
| Protected Member Functions inherited from BaseModel | |
| void | setInOperation (bool nInOperation) |
| void | setLoaded (bool loaded) |
Additional Inherited Members | |
| Properties inherited from BaseModel | |
| double | doubleParentId |
| bool | inOperation |
| int | limit |
| bool | loaded |
| qint64 | parentId |
| Fuoten::FuotenEnums::SortingRole | sortingRole |
| Qt::SortOrder | sortOrder |
| Fuoten::AbstractStorage * | storage |
| bool | unreadOnly |
| Signals inherited from BaseModel | |
| void | doubleParentIdChanged (double doubleParentId) |
| void | inOperationChanged (bool inOperation) |
| void | limitChanged (int limit) |
| void | loadedChanged (bool loaded) |
| void | parentIdChanged (qint64 parentId) |
| void | sortingRoleChanged (FuotenEnums::SortingRole sortingRole) |
| void | sortOrderChanged (Qt::SortOrder sortOrder) |
| void | storageChanged (Fuoten::AbstractStorage *storage) |
| void | unreadOnlyChanged (bool unreadOnly) |
Abstract folder model that provides basic functionalities for folder models.
|
explicit |
Constructs a new empty abstract folder model with the given parent.
|
override |
Destroys the AbstractFolderModel object.
|
overrideprotectedvirtual |
|
protectedslot |
Takes and processes data after a new feed has been created.
handleStorageChanged() will connect the AbstractStorage::createdFeed() signal to this slot.
|
protectedslot |
Takes and processes data after a feed has been created.
handleStorageChanged() will connect the AbstractStorage::markedReadFeed() and AbstractStorage::markedReadFeedInQueue() signals to this slot.
|
protectedslot |
Takes and processes data after the feeds have been requeste from the server.
handleStorageChanged() will connect the AbstractStorage::requestedFeeds() signal to this slot.
|
overridevirtual |
Returns the model index of the folder identified by id.
Reimplemented from BaseModel.
|
protectedslot |
Takes and processes data after a folder has been created.
Will add the new folder to the model. handleStorageChanged() will connect AbstractStorage::createdFolder() to this slot.
|
protectedslot |
Takes and processes data after a folder has been delted.
Will delete the folder identified by id from the model. handleStorageChanged() will connect AbstractStorage::deletedFolder() to this slot.
|
protectedslot |
Takes and processes data after a folder has been marked as read.
Will set the unreadCount of the folder identified by id to 0. handleStorageChanged() will connect the AbstractStorage::markedReadFolder() and AbstractStorage::markedReadFolderInQueue() signals to this slot.
|
protectedslot |
Takes and processes data after a folder has been renamed.
handleStorageChanged() will connect AbstractStorage::renamedFolder() signal to this slot.
|
protectedslot |
Takes and processes data after folders have been requested.
handleStorageChanged() will connect AbstractStorage::requestedFolders() signal to this slot.
|
overrideprotectedvirtual |
Connetcs the folder related signals of AbstractStorage to the model's slots.
Reimplemented from BaseModel.
|
protectedslot |
Takes and processes data after an item/article has been marked as read.
handleStorageChanged() will connnect the AbstractStorage::markedItem() signal to this slot.
| itemId | ID of the item/article that has been marked as read or unread |
| unread | true if the article has been marked as unread, false if it has been marked as read |
|
overrideslot |
Populates the mode with data from the local storage.
Uses AbstractStorage::getFolders() to get Folder objects from the local storage that will be added to the model.
|
protectedslot |
Will reload feedCount and unreadCount for every folder.
handleStorageChanged() will connect the following signals to this slot: