QGIS API Documentation 3.38.0-Grenoble (exported)
|
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer. More...
#include <qgsfieldproxymodel.h>
Public Types | |
enum | Filter { String = 1 << 0 , Int = 1 << 1 , LongLong = 1 << 2 , Double = 1 << 3 , Numeric = Int | LongLong | Double , Date = 1 << 4 , Time = 1 << 5 , HideReadOnly = 1 << 6 , DateTime = 1 << 7 , Binary = 1 << 8 , Boolean = 1 << 9 , OriginProvider = 1 << 10 , AllTypes = Numeric | Date | String | Time | DateTime | Binary | Boolean } |
Field type filters. More... | |
typedef QFlags< Filter > | Filters |
Public Member Functions | |
QgsFieldProxyModel (QObject *parent=nullptr) | |
QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model. | |
bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override |
const Filters & | filters () const |
Returns the filters controlling displayed fields. | |
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
QgsFieldProxyModel * | setFilters (QgsFieldProxyModel::Filters filters) |
Set flags that affect how fields are filtered in the model. | |
QgsFieldModel * | sourceFieldModel () |
Returns the QgsFieldModel used in this QSortFilterProxyModel. | |
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer.
Definition at line 31 of file qgsfieldproxymodel.h.
typedef QFlags< Filter > QgsFieldProxyModel::Filters |
Definition at line 54 of file qgsfieldproxymodel.h.
Field type filters.
Definition at line 38 of file qgsfieldproxymodel.h.
|
explicit |
QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model.
It can be used to filter the fields based on their types.
Definition at line 20 of file qgsfieldproxymodel.cpp.
|
override |
Definition at line 81 of file qgsfieldproxymodel.cpp.
|
inline |
Returns the filters controlling displayed fields.
Definition at line 77 of file qgsfieldproxymodel.h.
|
override |
Definition at line 133 of file qgsfieldproxymodel.cpp.
QgsFieldProxyModel * QgsFieldProxyModel::setFilters | ( | QgsFieldProxyModel::Filters | filters | ) |
Set flags that affect how fields are filtered in the model.
filters | are Filter flags |
Definition at line 28 of file qgsfieldproxymodel.cpp.
|
inline |
Returns the QgsFieldModel used in this QSortFilterProxyModel.
Definition at line 64 of file qgsfieldproxymodel.h.