QGIS API Documentation
2.8.2-Wien
|
The QgsFieldComboBox is a combo box which displays the list of fields of a given layer. More...
#include <qgsfieldcombobox.h>
Public Slots | |
void | setField (QString fieldName) |
setField sets the currently selected field | |
void | setLayer (QgsVectorLayer *layer) |
set the layer of which the fields are listed | |
void | setLayer (QgsMapLayer *layer) |
convenience slot to connect QgsMapLayerComboBox layer signal |
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. | |
QString | currentField () const |
return the currently selected field | |
QgsFieldProxyModel::Filters | filters () const |
currently used filter on list of fields | |
QgsVectorLayer * | layer () const |
Returns the currently used layer. | |
void | setFilters (QgsFieldProxyModel::Filters filters) |
setFilters allows fitering according to the type of field |
Protected Slots | |
void | indexChanged (int i) |
Properties | |
QgsFieldProxyModel::Filters | filters |
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.
Definition at line 33 of file qgsfieldcombobox.h.
|
explicit |
QgsFieldComboBox creates a combo box to display the fields of a layer.
The layer can be either manually given or dynamically set by connecting the signal QgsMapLayerComboBox::layerChanged to the slot setLayer.
Definition at line 21 of file qgsfieldcombobox.cpp.
QString QgsFieldComboBox::currentField | ( | ) | const |
return the currently selected field
Definition at line 70 of file qgsfieldcombobox.cpp.
|
signal |
the signal is emitted when the currently selected field changes
|
inline |
currently used filter on list of fields
Definition at line 50 of file qgsfieldcombobox.h.
|
protectedslot |
Definition at line 84 of file qgsfieldcombobox.cpp.
QgsVectorLayer * QgsFieldComboBox::layer | ( | ) | const |
Returns the currently used layer.
Definition at line 49 of file qgsfieldcombobox.cpp.
|
slot |
setField sets the currently selected field
Definition at line 54 of file qgsfieldcombobox.cpp.
void QgsFieldComboBox::setFilters | ( | QgsFieldProxyModel::Filters | filters | ) |
setFilters allows fitering according to the type of field
Definition at line 30 of file qgsfieldcombobox.cpp.
|
slot |
set the layer of which the fields are listed
Definition at line 44 of file qgsfieldcombobox.cpp.
|
slot |
convenience slot to connect QgsMapLayerComboBox layer signal
Definition at line 35 of file qgsfieldcombobox.cpp.
|
readwrite |
Definition at line 37 of file qgsfieldcombobox.h.