A simple filtering model that shows only data marked "active" in the underlying model or otherwise marked as acceptable for viewing.
More...
#include <aiselectorprivate.h>
|
| InactiveFilterProxyModel (QObject *pParent=0) |
|
virtual QVariant | data (const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override |
| Return filtered data from the underlying model, with visual roles augmented for inactive rows.
|
|
|
virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
| Show the row if it's active or someone told us it's OK to show it.
|
|
virtual bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
|
A simple filtering model that shows only data marked "active" in the underlying model or otherwise marked as acceptable for viewing.
This filter does not impose a sort order on the data. The inactive records are shown mingled with the active ones to simplify finding them in long completer lists. The inactive records are formatted to distinguish them from active ones.
- See also
- InactiveFilterProxyModel::data
◆ InactiveFilterProxyModel()
InactiveFilterProxyModel::InactiveFilterProxyModel |
( |
QObject * | pParent = 0 | ) |
|
◆ data()
QVariant InactiveFilterProxyModel::data |
( |
const QModelIndex & | pIndex, |
|
|
int | pRole = Qt::DisplayRole ) const |
|
overridevirtual |
Return filtered data from the underlying model, with visual roles augmented for inactive rows.
Inactive rows are displayed specially with an icon, the "expired" color from the current user's locale, and strikethrough text.
◆ filterAcceptsRow()
bool InactiveFilterProxyModel::filterAcceptsRow |
( |
int | sourceRow, |
|
|
const QModelIndex & | sourceParent ) const |
|
overrideprotectedvirtual |
Show the row if it's active or someone told us it's OK to show it.
The allowedIds
list contains the internal ids of rows someone told us should be visible. A list allows for more complex uses cases with little added code complexity.
◆ lessThan()
bool InactiveFilterProxyModel::lessThan |
( |
const QModelIndex & | left, |
|
|
const QModelIndex & | right ) const |
|
overrideprotectedvirtual |
◆ allowedIds
QList<int> InactiveFilterProxyModel::allowedIds |
The documentation for this class was generated from the following files:
- aiselectorprivate.h
- aiselector.cpp