38 if ( originVariant.
isNull() )
65 if ( mFilters.testFlag(
HideReadOnly ) && isReadOnly( index ) )
68 if ( mFilters.testFlag(
All ) )
78 QVariant::Type type = ( QVariant::Type )typeVar.
toInt( &ok );
82 if (( mFilters.testFlag(
String ) && type == QVariant::String ) ||
83 ( mFilters.testFlag(
LongLong ) && type == QVariant::LongLong ) ||
84 ( mFilters.testFlag(
Int ) && type == QVariant::Int ) ||
85 ( mFilters.testFlag(
Double ) && type == QVariant::Double ) ||
86 ( mFilters.testFlag(
Date ) && type == QVariant::Date ) ||
87 ( mFilters.testFlag(
Date ) && type == QVariant::DateTime ) ||
88 ( mFilters.testFlag(
Time ) && type == QVariant::Time ) )
106 return leftId < rightId;
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
QgsFieldProxyModel * setFilters(const QgsFieldProxyModel::Filters &filters)
Set flags that affect how fields are filtered in the model.
field comes from a joined layer (originIndex / 1000 = index of the join, originIndex % 1000 = index w...
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const=0
virtual void setSourceModel(QAbstractItemModel *sourceModel)
field has been temporarily added in editing mode (originIndex = index in the list of added attributes...
The QgsFieldModel class is a model to display the list of fields of a layer in widgets.
field comes from the underlying data provider of the vector layer (originIndex = index in provider's ...
it has not been specified where the field comes from
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer...
int toInt(bool *ok) const
QgsFieldProxyModel(QObject *parent=nullptr)
QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model.
virtual QVariant data(const QModelIndex &index, int role) const=0
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override
const Filters & filters() const
Returns the filters controlling displayed fields.
QAbstractItemModel * sourceModel() const
field is calculated from an expression
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override