The QgsFieldComboBox is a combo box which displays the list of fields of a given layer.
More...
#include <qgsfieldcombobox.h>
Signals |
void | fieldChanged (QString fieldName) |
| the signal is emitted when the currently selected field changes
|
Public Member Functions |
| QgsFieldComboBox (QWidget *parent=0) |
| QgsFieldComboBox creates a combo box to display the fields of a layer.
|
void | setFilters (QgsFieldProxyModel::Filters filters) |
| setFilters allows fitering according to the type of field
|
QgsFieldProxyModel::Filters | filters () const |
| currently used filter on list of fields
|
QString | currentField () const |
| return the currently selected field
|
QgsVectorLayer * | layer () const |
| Returns the currently used layer.
|
Properties |
QgsFieldProxyModel::Filters | filters |
Detailed Description
The QgsFieldComboBox is a combo box which displays the list of fields of a given layer.
It might be combined with a QgsMapLayerComboBox to automatically update fields according to a chosen layer. If expression must be used, QgsFieldExpressionWidget shall be used instead.
- See Also
- QgsMapLayerComboBox
- Note
- added in 2.3
Constructor & Destructor Documentation
QgsFieldComboBox::QgsFieldComboBox |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
Member Function Documentation
QString QgsFieldComboBox::currentField |
( |
| ) |
const |
return the currently selected field
void QgsFieldComboBox::fieldChanged |
( |
QString |
fieldName | ) |
|
|
signal |
the signal is emitted when the currently selected field changes
QgsFieldProxyModel::Filters QgsFieldComboBox::filters |
( |
| ) |
const |
|
inline |
currently used filter on list of fields
void QgsFieldComboBox::indexChanged |
( |
int |
i | ) |
|
|
protectedslot |
Returns the currently used layer.
void QgsFieldComboBox::setField |
( |
QString |
fieldName | ) |
|
|
slot |
setField sets the currently selected field
void QgsFieldComboBox::setFilters |
( |
QgsFieldProxyModel::Filters |
filters | ) |
|
setFilters allows fitering according to the type of field
set the layer of which the fields are listed
Property Documentation
QgsFieldProxyModel::Filters QgsFieldComboBox::filters |
|
readwrite |
The documentation for this class was generated from the following files: