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.
Base class for all map layer types.
QgsFieldModel * sourceFieldModel()
Returns the QgsFieldModel used in this QSortFilterProxyModel.
QString currentField() const
return the currently selected field
void setLayer(QgsVectorLayer *layer)
set the layer of which the fields are listed
QgsVectorLayer * layer()
returns the currently used layer
const char * name() const
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer...
void setField(const QString &fieldName)
setField sets the currently selected field
QgsVectorLayer * layer() const
Returns the currently used layer.
void setLayer(QgsVectorLayer *layer)
set the layer of whch fields are displayed
void activated(int index)
void fieldChanged(const QString &fieldName)
the signal is emitted when the currently selected field changes
QgsFieldProxyModel::Filters filters() const
currently used filter on list of fields
void setModel(QAbstractItemModel *model)
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
void setCurrentIndex(int index)
QgsFieldComboBox(QWidget *parent=nullptr)
QgsFieldComboBox creates a combo box to display the fields of a layer.
void setFilters(const QgsFieldProxyModel::Filters &filters)
setFilters allows fitering according to the type of field
QModelIndex indexFromName(const QString &fieldName)
return the index corresponding to a given fieldName
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Represents a vector layer which manages a vector based data sets.
virtual QVariant data(const QModelIndex &index, int role) const