The MiamSortFilterProxyModel class provides support for the MiamItemModel class.
More...
#include <miamsortfilterproxymodel.h>
The MiamSortFilterProxyModel class provides support for the MiamItemModel class.
This class has 2 ways to filter music in a library when one is typing a string.
- By excluding all terms which are not matching the filter
- By keeping everything visible to the user, and highlighting (in bold) the terms that are matching input
- Author
- Matthieu Bachelier
- Copyright
- GNU General Public License v3
MiamSortFilterProxyModel::MiamSortFilterProxyModel |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
virtual MiamSortFilterProxyModel::~MiamSortFilterProxyModel |
( |
| ) |
|
|
inlinevirtual |
void MiamSortFilterProxyModel::aboutToHighlightLetters |
( |
const QSet< QChar > & |
letters | ) |
|
|
signal |
virtual int MiamSortFilterProxyModel::defaultSortColumn |
( |
| ) |
const |
|
inlinevirtual |
For classes that are subclassing this filter, allow to change sort column (for models based on a Table for example).
Reimplemented in UniqueLibraryFilterProxyModel.
void MiamSortFilterProxyModel::findMusic |
( |
const QString & |
text | ) |
|
Single entry point for filtering library, and dispatch to the chosen operation defined in settings.
void MiamSortFilterProxyModel::highlightMatchingText |
( |
const QString & |
text | ) |
|
Highlight items in the Tree when one has activated this option in settings.
void MiamSortFilterProxyModel::setTopLevelItems |
( |
const QMultiHash< SeparatorItem *, QModelIndex > & |
topLevelItems | ) |
|
|
inline |
QMultiHash<SeparatorItem*, QModelIndex> MiamSortFilterProxyModel::_topLevelItems |
|
protected |
Top levels items are specific items, like letters 'A', 'B', ... in the library. Each letter has a reference to all items beginning with this letter.
The documentation for this class was generated from the following files: