15#ifndef QGSFEATURECHOOSER_H
16#define QGSFEATURECHOOSER_H
47 Q_PROPERTY(
QgsVectorLayer *layer READ layer WRITE setLayer NOTIFY layerChanged )
48 Q_PROPERTY( QString displayExpression READ displayExpression WRITE setDisplayExpression NOTIFY displayExpressionChanged )
49 Q_PROPERTY( QString filterExpression READ filterExpression WRITE setFilterExpression NOTIFY filterExpressionChanged )
50 Q_PROPERTY(
bool allowNull READ allowNull WRITE setAllowNull NOTIFY allowNullChanged )
51 Q_PROPERTY(
bool fetchGeometry READ fetchGeometry WRITE setFetchGeometry NOTIFY fetchGeometryChanged )
52 Q_PROPERTY(
int fetchLimit READ fetchLimit WRITE setFetchLimit NOTIFY fetchLimitChanged )
53 Q_PROPERTY(
bool showBrowserButtons READ showBrowserButtons WRITE setShowBrowserButtons NOTIFY showBrowserButtonsChanged )
86 QString displayExpression()
const;
92 void setDisplayExpression(
const QString &displayExpression );
98 QString filterExpression()
const;
104 int nullIndex()
const;
110 void setFilterExpression(
const QString &filterExpression );
115 bool allowNull()
const;
120 void setAllowNull(
bool allowNull );
125 bool fetchGeometry()
const;
130 void setFetchGeometry(
bool fetchGeometry );
135 int fetchLimit()
const;
141 void setFetchLimit(
int fetchLimit );
146 bool showBrowserButtons()
const;
152 void setShowBrowserButtons(
bool showBrowserButtons );
158 QModelIndex currentModelIndex()
const;
160 void focusOutEvent( QFocusEvent *event )
override;
162 void keyPressEvent( QKeyEvent *event )
override;
210 void onCurrentTextChanged(
const QString &text );
211 void onFilterUpdateCompleted();
212 void onLoadingChanged();
213 void onItemSelected(
const QModelIndex &index );
214 void onCurrentIndexChanged(
int i );
215 void onActivated( QModelIndex index );
216 void storeLineEditState();
217 void restoreLineEditState();
218 void onDataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight,
const QVector<int> &roles = QVector<int>() );
219 void browseFeatures(
int direction );
222 QComboBox *mComboBox;
223 QToolButton *mPreviousButton;
224 QToolButton *mNextButton;
226 QCompleter *mCompleter =
nullptr;
228 bool mPopupRequested =
false;
229 bool mIsCurrentlyEdited =
false;
230 bool mHasStoredEditState =
false;
231 bool mShowBrowserButtons =
false;
Animated icon is keeping an animation running if there are listeners connected to frameChanged.
Provides a list of features based on filter conditions.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
Represents a vector layer which manages a vector based data sets.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features