libfuoten  0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
Properties | Public Member Functions | Signals | List of all members
FeedListFilterModel Class Reference

#include <Fuoten/Models/FeedListFilterModel>

Inheritance diagram for FeedListFilterModel:
BaseFilterModel

Properties

bool respectPinned
 
bool sortByFolder
 
- Properties inherited from BaseFilterModel
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

 FeedListFilterModel (QObject *parent=nullptr)
 
 ~FeedListFilterModel () override
 
bool inOperation () const override
 
Q_INVOKABLE void load (const QString &locale=QString()) override
 
bool loaded () const override
 
qint64 parentId () const override
 
Q_INVOKABLE void reload (const QString &locale=QString()) override
 
bool respectPinned () const
 
void setParentId (qint64 nParentId) override
 
void setRespectPinned (bool nRespectPinned)
 
void setSortByFolder (bool nSortByFolder)
 
void setStorage (AbstractStorage *nStorage) override
 
bool sortByFolder () const
 
AbstractStoragestorage () const override
 
- Public Member Functions inherited from BaseFilterModel
 BaseFilterModel (QObject *parent=nullptr)
 
 ~BaseFilterModel () override
 
double doubleParentId () const
 
bool hideRead () const
 
QString search () const
 
void setDoubleParentId (double nDoubleParentId)
 
void setHideRead (bool nHideRead)
 
void setSearch (const QString &nSearch)
 
virtual void setSortingRole (FuotenEnums::SortingRole nSortingRole)
 
virtual void setSortOrder (Qt::SortOrder nSortOrder)
 
virtual FuotenEnums::SortingRole sortingRole () const
 
virtual Qt::SortOrder sortOrder () const
 

Signals

void respectPinnedChanged (bool respectPinned)
 
void sortByFolderChanged (bool sortByFolder)
 
- Signals inherited from BaseFilterModel
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)
 

Additional Inherited Members

- Protected Member Functions inherited from BaseFilterModel
bool find (const QString &str) const
 

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 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 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 ( QObject *  parent = nullptr)
explicit

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

◆ ~FeedListFilterModel()

~FeedListFilterModel ( )
override

Deconstructs the FeedListFilterModel object.

Member Function Documentation

◆ inOperation()

bool inOperation ( ) const
overridevirtual

Returns true while the underlying FeedListModel is loading.

Implements BaseFilterModel.

◆ load()

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

Loads the data in the underlying FeedListModel.

Implements BaseFilterModel.

◆ loaded()

bool loaded ( ) const
overridevirtual

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

Implements BaseFilterModel.

◆ parentId()

qint64 parentId ( ) const
overridevirtual

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

Implements BaseFilterModel.

◆ reload()

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

Reloads the complete underlying FeedListModel.

Implements BaseFilterModel.

◆ respectPinned()

bool respectPinned ( ) const

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

See also
respectPinned

◆ respectPinnedChanged

void respectPinnedChanged ( bool  respectPinned)
signal

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

See also
respectPinned

◆ setParentId()

void 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 BaseFilterModel.

◆ setRespectPinned()

void setRespectPinned ( bool  nRespectPinned)

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

See also
respectPinned

◆ setSortByFolder()

void setSortByFolder ( bool  nSortByFolder)

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

◆ setStorage()

void setStorage ( AbstractStorage nStorage)
overridevirtual

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

Parameters
nStoragereimplemented local storage

Implements BaseFilterModel.

◆ sortByFolder()

bool sortByFolder ( ) const

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

See also
sortByFolder

◆ sortByFolderChanged

void sortByFolderChanged ( bool  sortByFolder)
signal

This is emitted if the sortByFolder property changes.

See also
sortByFolder

◆ storage()

AbstractStorage * storage ( ) const
overridevirtual

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

Implements BaseFilterModel.