libfuoten 0.8.2
Qt based library to access the Nextcloud News App API.
Loading...
Searching...
No Matches
Fuoten::FeedListFilterModel Class Reference

Proxy filter model for FeedListModel. More...

#include <Fuoten/Models/FeedListFilterModel>

Inheritance diagram for Fuoten::FeedListFilterModel:
Fuoten::BaseFilterModel QSortFilterProxyModel QAbstractProxyModel QAbstractItemModel QObject

Properties

bool respectPinned
 Set this to true, to respect the pinned status in sorting.
bool sortByFolder
 Set to true to sort the feeds by the name of their folder.
Properties inherited from Fuoten::BaseFilterModel
double doubleParentId
 Stores the parent ID as double to make it accesseable from QML.
bool hideRead
 When true, items with no unread items will be hidden.
bool inOperation
 Returns true while the underlying BaseModel is initially loading data.
bool loaded
 This property holds true after the source model has initially loaded its data.
qint64 parentId
 Sets the parentId property of the underlying BaseModel.
QString search
 Search string to filter the model for.
Fuoten::FuotenEnums::SortingRole sortingRole
 The property the model items should be sorted by.
Qt::SortOrder sortOrder
 Defines the sort order.
Fuoten::AbstractStoragestorage
 Pointer to the AbstractStorage object of the underlying BaseModel.

Public Member Functions

 FeedListFilterModel (QObject *parent=nullptr)
 Constructs a new feed list filter model with the given parent.
 ~FeedListFilterModel () override
 Deconstructs the FeedListFilterModel object.
bool inOperation () const override
 Returns true while the underlying FeedListModel is loading.
Q_INVOKABLE void load (const QString &locale=QString()) override
 Loads the data in the underlying FeedListModel.
bool loaded () const override
 Returns true if the source model has initially loaded its data.
qint64 parentId () const override
 Returns the parent ID that is currently set in the underlying FeedListModel.
Q_INVOKABLE void reload (const QString &locale=QString()) override
 Reloads the complete underlying FeedListModel.
bool respectPinned () const
 Returns true if the pinned status should be respected on sorting.
void setParentId (qint64 nParentId) override
 Sets the parent ID in the underlying FeedListModel.
void setRespectPinned (bool nRespectPinned)
 Set this to true if the pinned status should be respected on sorting.
void setSortByFolder (bool nSortByFolder)
 Set this to true to sort the feeds by their folder.
void setStorage (AbstractStorage *nStorage) override
 Sets the pointer to a local storage object in the underlying FeedListModel.
bool sortByFolder () const
 Returns true if the feeds should be sorted by their folder.
AbstractStoragestorage () const override
 Returns the pointer to the local storage handler set in the underlying FeedListModel.
Public Member Functions inherited from Fuoten::BaseFilterModel
 BaseFilterModel (QObject *parent=nullptr)
 Constructs a new base filter model with the given parent.
 ~BaseFilterModel () override
 Deconstructs the BaseFilterModel object.
double doubleParentId () const
 Getter function for the doubleParentId property.
bool hideRead () const
 Returns true if model items with no unread items or unread articles should be hidden.
QString search () const
 Returns the currently set serach string.
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.
void setSearch (const QString &nSearch)
 Sets the search string.
virtual void setSortingRole (FuotenEnums::SortingRole nSortingRole)
 Sets the sorting role.
virtual void setSortOrder (Qt::SortOrder nSortOrder)
 Sets the sort order.
virtual FuotenEnums::SortingRole sortingRole () const
 Returns the currently set sorting role.
virtual Qt::SortOrder sortOrder () const
 Returns the currently set sort order.

Signals

void respectPinnedChanged (bool respectPinned)
 This is emitted if the FeedListFilterModel::respectPinned property changes.
void sortByFolderChanged (bool sortByFolder)
 This is emitted if the sortByFolder property changes.
Signals inherited from Fuoten::BaseFilterModel
void doubleParentIdChanged (double doubleParentId)
 This signal is emitted if the doubleParentId property changes.
void hideReadChanged (bool hideRead)
 This signal is emitted if the hideRead property changes.
void inOperationChanged (bool inOperation)
 This signal is emitted when the operational state of the underlying model changes.
void loadedChanged (bool loaded)
 This signal is emitted if the loaded property changes.
void parentIdChanged (qint64 parentId)
 This signal is emitted when the parent ID property changed in the underlying model.
void searchChanged (const QString &search)
 This signal is emitted if the search string changes.
void sortingRoleChanged (FuotenEnums::SortingRole sortingRole)
 This signal is emitted if the sorting role changes.
void sortOrderChanged (Qt::SortOrder sortOrder)
 This signal is emitted if the sort order changes.
void storageChanged (Fuoten::AbstractStorage *storage)
 This signal is emitted when the pointer to the local storage handler changes in the underlying model.

Additional Inherited Members

Protected Member Functions inherited from Fuoten::BaseFilterModel
bool find (const QString &str) const
 Returns true if the string set by setSearch() is part of str.

Detailed Description

Proxy filter model for FeedListModel.

This proxy model filters and sorts the data of a FeedListModel that is internally created.

Property Documentation

◆ respectPinned

bool Fuoten::FeedListFilterModel::respectPinned
readwrite

Set this to true, to respect the pinned status in sorting.

Access functions:
boolrespectPinned() const
voidsetRespectPinned(bool nRespectPinned)
Notifier signal:
voidrespectPinnedChanged(bool respectPinned)

◆ sortByFolder

bool Fuoten::FeedListFilterModel::sortByFolder
readwrite

Set to true to sort the feeds by the name of their folder.

Access functions:
boolsortByFolder() const
voidsetSortByFolder(bool nSortByFolder)
Notifier signal:
voidsortByFolderChanged(bool sortByFolder)

Constructor & Destructor Documentation

◆ FeedListFilterModel()

FeedListFilterModel::FeedListFilterModel ( QObject * parent = nullptr)
explicit

Constructs a new feed list filter model with the given parent.

◆ ~FeedListFilterModel()

FeedListFilterModel::~FeedListFilterModel ( )
override

Deconstructs the FeedListFilterModel object.

Member Function Documentation

◆ inOperation()

bool FeedListFilterModel::inOperation ( ) const
overridevirtual

Returns true while the underlying FeedListModel is loading.

Implements Fuoten::BaseFilterModel.

◆ load()

void FeedListFilterModel::load ( const QString & locale = QString())
overridevirtual

Loads the data in the underlying FeedListModel.

Implements Fuoten::BaseFilterModel.

◆ loaded()

bool FeedListFilterModel::loaded ( ) const
overridevirtual

Returns true if the source model has initially loaded its data.

Implements Fuoten::BaseFilterModel.

◆ parentId()

qint64 FeedListFilterModel::parentId ( ) const
overridevirtual

Returns the parent ID that is currently set in the underlying FeedListModel.

Implements Fuoten::BaseFilterModel.

◆ reload()

void FeedListFilterModel::reload ( const QString & locale = QString())
overridevirtual

Reloads the complete underlying FeedListModel.

Implements Fuoten::BaseFilterModel.

◆ respectPinned()

bool FeedListFilterModel::respectPinned ( ) const

Returns true if the pinned status should be respected on sorting.

See also
respectPinned

◆ respectPinnedChanged

void Fuoten::FeedListFilterModel::respectPinnedChanged ( bool respectPinned)
signal

This is emitted if the FeedListFilterModel::respectPinned property changes.

See also
respectPinned

◆ setParentId()

void FeedListFilterModel::setParentId ( qint64 nParentId)
overridevirtual

Sets the parent ID in the underlying FeedListModel.

Parameters
nParentIdID of the parent folder, -1 (default) to show all feeds

Implements Fuoten::BaseFilterModel.

◆ setRespectPinned()

void FeedListFilterModel::setRespectPinned ( bool nRespectPinned)

Set this to true if the pinned status should be respected on sorting.

See also
respectPinned

◆ setSortByFolder()

void FeedListFilterModel::setSortByFolder ( bool nSortByFolder)

Set this to true to sort the feeds by their folder.

◆ setStorage()

void FeedListFilterModel::setStorage ( AbstractStorage * nStorage)
overridevirtual

Sets the pointer to a local storage object in the underlying FeedListModel.

Parameters
nStoragereimplemented local storage

Implements Fuoten::BaseFilterModel.

◆ sortByFolder()

bool FeedListFilterModel::sortByFolder ( ) const

Returns true if the feeds should be sorted by their folder.

See also
sortByFolder

◆ sortByFolderChanged

void Fuoten::FeedListFilterModel::sortByFolderChanged ( bool sortByFolder)
signal

This is emitted if the sortByFolder property changes.

See also
sortByFolder

◆ storage()

AbstractStorage * FeedListFilterModel::storage ( ) const
overridevirtual

Returns the pointer to the local storage handler set in the underlying FeedListModel.

Implements Fuoten::BaseFilterModel.


The documentation for this class was generated from the following files:
  • Fuoten/Models/feedlistfiltermodel.h
  • build/Fuoten/FuotenQt5_autogen/include/moc_feedlistfiltermodel.cpp
  • Fuoten/Models/feedlistfiltermodel.cpp