QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | List of all members
QgsFieldProxyModel Class Reference

The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer. More...

#include <qgsfieldproxymodel.h>

Inheritance diagram for QgsFieldProxyModel:
Inheritance graph
[legend]

Public Types

enum  Filter {
  String = 1, Int = 2, LongLong = 4, Double = 8,
  Numeric = Int | LongLong | Double, Date = 16, All = Numeric | Date | String
}
 

Public Member Functions

 QgsFieldProxyModel (QObject *parent=0)
 QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model. More...
 
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const
 
const Filters & filters () const
 
bool lessThan (const QModelIndex &left, const QModelIndex &right) const
 
QgsFieldProxyModelsetFilters (Filters filters)
 setFilters set flags that affect how fields are filtered More...
 
QgsFieldModelsourceFieldModel ()
 sourceFieldModel returns the QgsFieldModel used in this QSortFilterProxyModel More...
 

Detailed Description

The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer.

Note
added in 2.3

Definition at line 27 of file qgsfieldproxymodel.h.

Member Enumeration Documentation

Enumerator
String 
Int 
LongLong 
Double 
Numeric 
Date 
All 

Definition at line 33 of file qgsfieldproxymodel.h.

Constructor & Destructor Documentation

QgsFieldProxyModel::QgsFieldProxyModel ( QObject *  parent = 0)
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.

Member Function Documentation

bool QgsFieldProxyModel::filterAcceptsRow ( int  source_row,
const QModelIndex &  source_parent 
) const

Definition at line 34 of file qgsfieldproxymodel.cpp.

const Filters& QgsFieldProxyModel::filters ( ) const
inline

Definition at line 60 of file qgsfieldproxymodel.h.

bool QgsFieldProxyModel::lessThan ( const QModelIndex &  left,
const QModelIndex &  right 
) const

Definition at line 61 of file qgsfieldproxymodel.cpp.

QgsFieldProxyModel * QgsFieldProxyModel::setFilters ( Filters  filters)

setFilters set flags that affect how fields are filtered

Parameters
filtersare Filter flags
Note
added in 2.3

Definition at line 28 of file qgsfieldproxymodel.cpp.

QgsFieldModel* QgsFieldProxyModel::sourceFieldModel ( )
inline

sourceFieldModel returns the QgsFieldModel used in this QSortFilterProxyModel

Definition at line 52 of file qgsfieldproxymodel.h.


The documentation for this class was generated from the following files: