QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
This offers a combobox with autocompleter that allows selecting features from a layer. More...
#include <qgsfeaturepickerwidget.h>
Signals | |
void | allowNullChanged () |
Determines if a NULL value should be available in the list. More... | |
void | displayExpressionChanged () |
The display expression will be used to display features as well as the the value to match the typed text against. More... | |
void | featureChanged (const QgsFeature &feature) |
Sends the feature as soon as it is chosen. More... | |
void | fetchGeometryChanged () |
Emitted when the fetching of the geometry changes. More... | |
void | fetchLimitChanged () |
Emitted when the fetching limit for the feature request changes. More... | |
void | filterExpressionChanged () |
An additional expression to further restrict the available features. More... | |
void | layerChanged () |
The layer from which features should be listed. More... | |
void | modelUpdated () |
The underlying model has been updated. More... | |
void | showBrowserButtonsChanged () |
Emitted when showing the browser buttons changes. More... | |
Public Member Functions | |
QgsFeaturePickerWidget (QWidget *parent=nullptr) | |
Create a new QgsFeaturePickerWidget, optionally specifying a parent. More... | |
bool | allowNull () const |
Determines if a NULL value should be available in the list. More... | |
QModelIndex | currentModelIndex () const |
The index of the currently selected item. More... | |
QString | displayExpression () const |
The display expression will be used to display features as well as the value to match the typed text against. More... | |
QgsFeature | feature () const |
Returns the current feature. More... | |
bool | fetchGeometry () const |
Returns if the geometry is fetched. More... | |
int | fetchLimit () const |
Returns the feature request fetch limit. More... | |
QString | filterExpression () const |
An additional expression to further restrict the available features. More... | |
void | focusOutEvent (QFocusEvent *event) override |
void | keyPressEvent (QKeyEvent *event) override |
QgsVectorLayer * | layer () const |
The layer from which features should be listed. More... | |
int | nullIndex () const |
Returns the current index of the NULL value, or -1 if NULL values are not allowed. More... | |
void | setAllowNull (bool allowNull) |
Determines if a NULL value should be available in the list. More... | |
void | setDisplayExpression (const QString &displayExpression) |
The display expression will be used to display features as well as the value to match the typed text against. More... | |
void | setFeature (QgsFeatureId featureId) |
Sets the current index by using the given feature. More... | |
void | setFetchGeometry (bool fetchGeometry) |
Defines if the geometry will be fetched. More... | |
void | setFetchLimit (int fetchLimit) |
Defines the feature request fetch limit If set to 0, no limit is applied when fetching. More... | |
void | setFilterExpression (const QString &filterExpression) |
An additional expression to further restrict the available features. More... | |
void | setLayer (QgsVectorLayer *layer) |
The layer from which features should be listed. More... | |
void | setShowBrowserButtons (bool showBrowserButtons) |
Defines if the browsing buttons are shown. More... | |
bool | showBrowserButtons () const |
Returns if the browsing buttons are shown. More... | |
Properties | |
bool | allowNull |
QString | displayExpression |
bool | fetchGeometry |
int | fetchLimit |
QString | filterExpression |
QgsVectorLayer * | layer |
bool | showBrowserButtons |
This offers a combobox with autocompleter that allows selecting features from a layer.
It will show up to 100 entries at a time. The entries can be chosen based on the displayExpression and whenever text is typed into the combobox, the completer and popup will adjust to features matching the typed text.
Definition at line 44 of file qgsfeaturepickerwidget.h.
QgsFeaturePickerWidget::QgsFeaturePickerWidget | ( | QWidget * | parent = nullptr | ) |
Create a new QgsFeaturePickerWidget, optionally specifying a parent.
Definition at line 24 of file qgsfeaturepickerwidget.cpp.
bool QgsFeaturePickerWidget::allowNull | ( | ) | const |
Determines if a NULL value should be available in the list.
Definition at line 236 of file qgsfeaturepickerwidget.cpp.
|
signal |
Determines if a NULL value should be available in the list.
QModelIndex QgsFeaturePickerWidget::currentModelIndex | ( | ) | const |
The index of the currently selected item.
Definition at line 215 of file qgsfeaturepickerwidget.cpp.
QString QgsFeaturePickerWidget::displayExpression | ( | ) | const |
The display expression will be used to display features as well as the value to match the typed text against.
Definition at line 106 of file qgsfeaturepickerwidget.cpp.
|
signal |
The display expression will be used to display features as well as the the value to match the typed text against.
QgsFeature QgsFeaturePickerWidget::feature | ( | ) | const |
Returns the current feature.
Definition at line 101 of file qgsfeaturepickerwidget.cpp.
|
signal |
Sends the feature as soon as it is chosen.
bool QgsFeaturePickerWidget::fetchGeometry | ( | ) | const |
Returns if the geometry is fetched.
Definition at line 257 of file qgsfeaturepickerwidget.cpp.
|
signal |
Emitted when the fetching of the geometry changes.
int QgsFeaturePickerWidget::fetchLimit | ( | ) | const |
Returns the feature request fetch limit.
Definition at line 267 of file qgsfeaturepickerwidget.cpp.
|
signal |
Emitted when the fetching limit for the feature request changes.
QString QgsFeaturePickerWidget::filterExpression | ( | ) | const |
An additional expression to further restrict the available features.
This can be used to integrate additional spatial or other constraints.
Definition at line 247 of file qgsfeaturepickerwidget.cpp.
|
signal |
An additional expression to further restrict the available features.
This can be used to integrate additional spatial or other constraints.
|
override |
Definition at line 220 of file qgsfeaturepickerwidget.cpp.
|
override |
Definition at line 227 of file qgsfeaturepickerwidget.cpp.
QgsVectorLayer * QgsFeaturePickerWidget::layer | ( | ) | const |
The layer from which features should be listed.
Definition at line 86 of file qgsfeaturepickerwidget.cpp.
|
signal |
The layer from which features should be listed.
|
signal |
The underlying model has been updated.
int QgsFeaturePickerWidget::nullIndex | ( | ) | const |
Returns the current index of the NULL value, or -1 if NULL values are not allowed.
Definition at line 183 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setAllowNull | ( | bool | allowNull | ) |
Determines if a NULL value should be available in the list.
Definition at line 241 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setDisplayExpression | ( | const QString & | displayExpression | ) |
The display expression will be used to display features as well as the value to match the typed text against.
Definition at line 111 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setFeature | ( | QgsFeatureId | featureId | ) |
Sets the current index by using the given feature.
Definition at line 96 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setFetchGeometry | ( | bool | fetchGeometry | ) |
Defines if the geometry will be fetched.
Definition at line 262 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setFetchLimit | ( | int | fetchLimit | ) |
Defines the feature request fetch limit If set to 0, no limit is applied when fetching.
Definition at line 272 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setFilterExpression | ( | const QString & | filterExpression | ) |
An additional expression to further restrict the available features.
This can be used to integrate additional spatial or other constraints.
Definition at line 252 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setLayer | ( | QgsVectorLayer * | layer | ) |
The layer from which features should be listed.
Definition at line 91 of file qgsfeaturepickerwidget.cpp.
void QgsFeaturePickerWidget::setShowBrowserButtons | ( | bool | showBrowserButtons | ) |
Defines if the browsing buttons are shown.
Definition at line 282 of file qgsfeaturepickerwidget.cpp.
bool QgsFeaturePickerWidget::showBrowserButtons | ( | ) | const |
Returns if the browsing buttons are shown.
Definition at line 277 of file qgsfeaturepickerwidget.cpp.
|
signal |
Emitted when showing the browser buttons changes.
|
readwrite |
Definition at line 1 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 1 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 1 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 1 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 1 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 1 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 1 of file qgsfeaturepickerwidget.h.