Miam-Player  0.8.0
A nice music player
LibraryFilterProxyModel Class Reference

The LibraryFilterProxyModel class is used to filter Library by looking in all items. More...

#include <libraryfilterproxymodel.h>

Inheritance diagram for LibraryFilterProxyModel:

Public Member Functions

 LibraryFilterProxyModel (QObject *parent=nullptr)
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
- Public Member Functions inherited from MiamSortFilterProxyModel
 MiamSortFilterProxyModel (QObject *parent=nullptr)
void setTopLevelItems (const QMultiHash< SeparatorItem *, QModelIndex > &topLevelItems)
void findMusic (const QString &text)
void highlightMatchingText (const QString &text)

Protected Member Functions

virtual bool filterAcceptsRow (int sourceRow, const QModelIndex &parent) const override
virtual bool lessThan (const QModelIndex &idxLeft, const QModelIndex &idxRight) const override

Additional Inherited Members

- Signals inherited from MiamSortFilterProxyModel
void aboutToHighlightLetters (const QSet< QChar > &letters)
- Protected Attributes inherited from MiamSortFilterProxyModel
QMultiHash< SeparatorItem *, QModelIndex > _topLevelItems

Detailed Description

The LibraryFilterProxyModel class is used to filter Library by looking in all items.

When filtering, the method filterAcceptsRow will not stop if a search term was not found in a node. The algorithm will continue recursively until all subnodes and leaves are evaluated.

Matthieu Bachelier

Constructor & Destructor Documentation

LibraryFilterProxyModel::LibraryFilterProxyModel ( QObject *  parent = nullptr)

Member Function Documentation

QVariant LibraryFilterProxyModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

Redefined to override Qt::FontRole.

bool LibraryFilterProxyModel::filterAcceptsRow ( int  sourceRow,
const QModelIndex &  parent 
) const

Redefined from QSortFilterProxyModel.

bool LibraryFilterProxyModel::lessThan ( const QModelIndex &  idxLeft,
const QModelIndex &  idxRight 
) const

Redefined for custom sorting.

The documentation for this class was generated from the following files: