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

#include <Fuoten/Models/ArticleListFilterModel>

Inheritance diagram for ArticleListFilterModel:
BaseFilterModel

Properties

int bodyLimit
 
Fuoten::FuotenEnums::Type parentIdType
 
- 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

 ArticleListFilterModel (QObject *parent=nullptr)
 
 ~ArticleListFilterModel () override
 
int bodyLimit () const
 
bool inOperation () const override
 
Q_INVOKABLE void load (const QString &locale=QString()) override
 
bool loaded () const override
 
qint64 parentId () const override
 
FuotenEnums::Type parentIdType () const
 
Q_INVOKABLE void reload (const QString &locale=QString()) override
 
void setBodyLimit (int nBodyLimit)
 
void setParentId (qint64 nParentId) override
 
void setParentIdType (FuotenEnums::Type nParentIdType)
 
void setStorage (AbstractStorage *nStorage) override
 
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 bodyLimitChanged (int bodyLimit)
 
void parentIdTypeChanged (FuotenEnums::Type parentIdType)
 
- 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 ArticleListModel.

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

Property Documentation

◆ bodyLimit

int bodyLimit
readwrite

Limits the size of the body text in number of characters.

Values lower than 0 will return no body text, 0 will return the full body text, any other positive value will return a body stripped from HTML tags and limited to the amount of characters. Defaults to -1.

Access functions:
intbodyLimit() const
voidsetBodyLimit(int nBodyLimit)
Notifier signal:
voidbodyLimitChanged(int bodyLimit)

◆ parentIdType

FuotenEnums::Type parentIdType
readwrite

Defines the type of the parentId used in the underlying model.

Defaults to FuotenEnums::All

Access functions:
FuotenEnums::TypeparentIdType() const
voidsetParentIdType(FuotenEnums::Type nParentIdType)
Notifier signal:
voidparentIdTypeChanged(FuotenEnums::Type parentIdType)

Constructor & Destructor Documentation

◆ ArticleListFilterModel()

ArticleListFilterModel ( QObject *  parent = nullptr)
explicit

Constructs a new ArticleListFilterModel object with the given parent.

◆ ~ArticleListFilterModel()

~ArticleListFilterModel ( )
override

Destroys the ArticleListFilterModel object.

Member Function Documentation

◆ bodyLimit()

int bodyLimit ( ) const

◆ bodyLimitChanged

void bodyLimitChanged ( int  bodyLimit)
signal

This is emitted if the value of the bodyLimit property changes.

See also
AbstractArticleModel::bodyLimit(), AbstractArticleModel::setBodyLimit()

◆ inOperation()

bool inOperation ( ) const
overridevirtual

Returns true while the underlying ArticleListModel is loading.

Implements BaseFilterModel.

◆ load()

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

Loads the data in the underlying ArticleListModel.

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 ArticleListModel.

Implements BaseFilterModel.

◆ parentIdType()

FuotenEnums::Type parentIdType ( ) const

◆ parentIdTypeChanged

void parentIdTypeChanged ( FuotenEnums::Type  parentIdType)
signal

This is emitted if the value of the parentIdType property changes.

See also
ArticleListFilterModel::parentIdType(), ArticleListFilterModel::setParentIdType()

◆ reload()

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

Reloads the complete underlying ArticleListModel.

Implements BaseFilterModel.

◆ setBodyLimit()

void setBodyLimit ( int  nBodyLimit)

Setter function for the bodyLimit property. Emits the bodyLimitChanged() signal if nBodyLimit is not equal to the stored value.

See also
AbstractArticleModel::bodyLimit(), AbstractArticleModel::bodyLimitChanged()

◆ setParentId()

void setParentId ( qint64  nParentId)
overridevirtual

Sets the parent ID in the underlying ArticleListModel.

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

Implements BaseFilterModel.

◆ setParentIdType()

void setParentIdType ( FuotenEnums::Type  nParentIdType)

Setter function for the parentIdType property. Emits the parentIdTypeChanged() signal if nParentIdType is not equal to the stored value.

See also
ArticleListFilterModel::parentIdType(), ArticleListFilterModel::parentIdTypeChanged()

◆ setStorage()

void setStorage ( AbstractStorage nStorage)
overridevirtual

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

Parameters
nStoragereimplemented local storage

Implements BaseFilterModel.

◆ storage()

AbstractStorage * storage ( ) const
overridevirtual

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

Implements BaseFilterModel.