|
libfuoten 0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
|
#include <Fuoten/Model/BaseFilterModel>
Properties | |
| double | doubleParentId |
| bool | hideRead |
| bool | inOperation |
| bool | loaded |
| qint64 | parentId |
| QString | search |
| Fuoten::FuotenEnums::SortingRole | sortingRole |
| Qt::SortOrder | sortOrder |
| Fuoten::AbstractStorage * | storage |
Public Member Functions | |
| BaseFilterModel (QObject *parent=nullptr) | |
| ~BaseFilterModel () override | |
| double | doubleParentId () const |
| bool | hideRead () const |
| virtual bool | inOperation () const =0 |
| virtual Q_INVOKABLE void | load (const QString &locale=QString())=0 |
| virtual bool | loaded () const =0 |
| virtual qint64 | parentId () const =0 |
| virtual Q_INVOKABLE void | reload (const QString &locale=QString())=0 |
| QString | search () const |
| void | setDoubleParentId (double nDoubleParentId) |
| void | setHideRead (bool nHideRead) |
| virtual void | setParentId (qint64 nParentId)=0 |
| void | setSearch (const QString &nSearch) |
| virtual void | setSortingRole (FuotenEnums::SortingRole nSortingRole) |
| virtual void | setSortOrder (Qt::SortOrder nSortOrder) |
| virtual void | setStorage (AbstractStorage *nStorage)=0 |
| virtual FuotenEnums::SortingRole | sortingRole () const |
| virtual Qt::SortOrder | sortOrder () const |
| virtual AbstractStorage * | storage () const =0 |
Signals | |
| void | doubleParentIdChanged (double doubleParentId) |
| void | hideReadChanged (bool hideRead) |
| void | inOperationChanged (bool inOperation) |
| void | loadedChanged (bool loaded) |
| void | parentIdChanged (qint64 parentId) |
| void | searchChanged (const QString &search) |
| void | sortingRoleChanged (FuotenEnums::SortingRole sortingRole) |
| void | sortOrderChanged (Qt::SortOrder sortOrder) |
| void | storageChanged (Fuoten::AbstractStorage *storage) |
Protected Member Functions | |
| bool | find (const QString &str) const |
Abstract base filter model for other filter models.
|
readwrite |
Stores the parent ID as double to make it accesseable from QML.
| double | doubleParentId() const |
| void | setDoubleParentId(double nDoubleParentId) |
| void | doubleParentIdChanged(double doubleParentId) |
|
readwrite |
When true, items with no unread items will be hidden.
| bool | hideRead() const |
| void | setHideRead(bool nHideRead) |
| void | hideReadChanged(bool hideRead) |
|
read |
Returns true while the underlying BaseModel is initially loading data.
| bool | inOperation() const |
| void | inOperationChanged(bool inOperation) |
|
read |
This property holds true after the source model has initially loaded its data.
|
readwrite |
Sets the parentId property of the underlying BaseModel.
| qint64 | parentId() const |
| void | setParentId(qint64 nParentId) |
| void | parentIdChanged(qint64 parentId) |
|
readwrite |
Search string to filter the model for.
| QString | search() const |
| void | setSearch(const QString &nSearch) |
| void | searchChanged(const QString &search) |
|
readwrite |
The property the model items should be sorted by.
| FuotenEnums::SortingRole | sortingRole() const |
| void | setSortingRole(FuotenEnums::SortingRole nSortingRole) |
| void | sortingRoleChanged(FuotenEnums::SortingRole sortingRole) |
|
readwrite |
Defines the sort order.
| Qt::SortOrder | sortOrder() const |
| void | setSortOrder(Qt::SortOrder nSortOrder) |
| void | sortOrderChanged(Qt::SortOrder sortOrder) |
|
readwrite |
Pointer to the AbstractStorage object of the underlying BaseModel.
| AbstractStorage* | storage() const |
| void | setStorage(AbstractStorage *nStorage) |
| void | storageChanged(AbstractStorage *storage) |
|
explicit |
Constructs a new base filter model with the given parent.
QSortFilterProxyModel::isSortLocaleAware will be set to true.
|
override |
Deconstructs the BaseFilterModel object.
| double doubleParentId | ( | ) | const |
Getter function for the doubleParentId property.
|
signal |
This signal is emitted if the doubleParentId property changes.
|
protected |
Returns true if the string set by setSearch() is part of str.
| bool hideRead | ( | ) | const |
Returns true if model items with no unread items or unread articles should be hidden.
|
signal |
This signal is emitted if the hideRead property changes.
|
pure virtual |
Returns true while the underlying model is in operational mode.
Reimplement this in a derived class.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
|
signal |
This signal is emitted when the operational state of the underlying model changes.
|
pure virtual |
Loads the data in the underlying model.
Reimplement this in a subclass and call the underlying model's BaseModel::load() function. If locale is not an empty string, the default locale will be set to the defined locale.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
|
pure virtual |
Returns true if the source model has initially loaded its data.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
|
signal |
This signal is emitted if the loaded property changes.
|
pure virtual |
Returns the parent ID that is currently set to the underlyiing model. Reimplement this in a derived class.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
|
signal |
This signal is emitted when the parent ID property changed in the underlying model.
|
pure virtual |
Reloads the complete underlying model.
Reimplement this in a subclass and call the underlying model's BaseModel::reload() function. If localse is not an empty string, the default local will be set to the defined locale.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
| QString search | ( | ) | const |
Returns the currently set serach string.
|
signal |
This signal is emitted if the search string changes.
| void setDoubleParentId | ( | double | nDoubleParentId | ) |
Setter function for the doubleParentId property.
| void setHideRead | ( | bool | nHideRead | ) |
Set this to true to hide items with no unread content or read articles.
|
pure virtual |
Sets the parent ID for the underlying model.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
|
virtual |
Sets the sorting role.
|
virtual |
Sets the sort order.
|
pure virtual |
Sets the local storage handler for the underlying model.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
|
virtual |
Returns the currently set sorting role.
|
signal |
This signal is emitted if the sorting role changes.
|
virtual |
Returns the currently set sort order.
|
signal |
This signal is emitted if the sort order changes.
|
pure virtual |
Returns the local storage that is currently set to the underlying model.
Reimplement this in a derived class.
Implemented in ArticleListFilterModel, FeedListFilterModel, and FolderListFilterModel.
|
signal |
This signal is emitted when the pointer to the local storage handler changes in the underlying model.