21 : QSortFilterProxyModel( parent )
39 QModelIndex
index = sourceModel()->index( source_row, 0, source_parent );
43 if ( typeVar.isNull() )
47 QVariant::Type type = ( QVariant::Type )typeVar.toInt( &ok );
53 (
mFilters.testFlag(
Int ) && type == QVariant::Int ) ||
55 (
mFilters.testFlag(
Date ) && type == QVariant::Date ) )
73 return leftId < rightId;
const Filters & filters() const
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
bool lessThan(const QModelIndex &left, const QModelIndex &right) const
The QgsFieldModel class is a model to display the list of fields of a layer in widgets.
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer...
QgsFieldProxyModel * setFilters(Filters filters)
setFilters set flags that affect how fields are filtered
QgsFieldProxyModel(QObject *parent=0)
QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model.