QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
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. | |
void | displayExpressionChanged () |
The display expression will be used to display features as well as the the value to match the typed text against. | |
void | featureChanged (const QgsFeature &feature) |
Sends the feature as soon as it is chosen. | |
void | fetchGeometryChanged () |
Emitted when the fetching of the geometry changes. | |
void | fetchLimitChanged () |
Emitted when the fetching limit for the feature request changes. | |
void | filterExpressionChanged () |
An additional expression to further restrict the available features. | |
void | layerChanged () |
The layer from which features should be listed. | |
void | modelUpdated () |
The underlying model has been updated. | |
void | showBrowserButtonsChanged () |
Emitted when showing the browser buttons changes. | |
Public Member Functions | |
QgsFeaturePickerWidget (QWidget *parent=nullptr) | |
Create a new QgsFeaturePickerWidget, optionally specifying a parent. | |
bool | allowNull () const |
Determines if a NULL value should be available in the list. | |
QModelIndex | currentModelIndex () const |
The index of the currently selected item. | |
QString | displayExpression () const |
The display expression will be used to display features as well as the value to match the typed text against. | |
QgsFeature | feature () const |
Returns the current feature. | |
bool | fetchGeometry () const |
Returns if the geometry is fetched. | |
int | fetchLimit () const |
Returns the feature request fetch limit. | |
QString | filterExpression () const |
An additional expression to further restrict the available features. | |
void | focusOutEvent (QFocusEvent *event) override |
void | keyPressEvent (QKeyEvent *event) override |
QgsVectorLayer * | layer () const |
The layer from which features should be listed. | |
int | nullIndex () const |
Returns the current index of the NULL value, or -1 if NULL values are not allowed. | |
void | setAllowNull (bool allowNull) |
Determines if a NULL value should be available in the list. | |
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. | |
void | setFeature (QgsFeatureId featureId) |
Sets the current index by using the given feature. | |
void | setFetchGeometry (bool fetchGeometry) |
Defines if the geometry will be fetched. | |
void | setFetchLimit (int fetchLimit) |
Defines the feature request fetch limit If set to 0, no limit is applied when fetching. | |
void | setFilterExpression (const QString &filterExpression) |
An additional expression to further restrict the available features. | |
void | setLayer (QgsVectorLayer *layer) |
The layer from which features should be listed. | |
void | setShowBrowserButtons (bool showBrowserButtons) |
Defines if the browsing buttons are shown. | |
bool | showBrowserButtons () const |
Returns if the browsing buttons are shown. | |
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 51 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 49 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 52 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 53 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 50 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 48 of file qgsfeaturepickerwidget.h.
|
readwrite |
Definition at line 54 of file qgsfeaturepickerwidget.h.