15#ifndef QGSFEATURECHOOSER_H
16#define QGSFEATURECHOOSER_H
48 Q_PROPERTY(
QgsVectorLayer *layer READ layer WRITE setLayer NOTIFY layerChanged )
49 Q_PROPERTY( QString displayExpression READ displayExpression WRITE setDisplayExpression NOTIFY displayExpressionChanged )
50 Q_PROPERTY( QString filterExpression READ filterExpression WRITE setFilterExpression NOTIFY filterExpressionChanged )
51 Q_PROPERTY(
bool allowNull READ allowNull WRITE setAllowNull NOTIFY allowNullChanged )
52 Q_PROPERTY(
bool fetchGeometry READ fetchGeometry WRITE setFetchGeometry NOTIFY fetchGeometryChanged )
53 Q_PROPERTY(
int fetchLimit READ fetchLimit WRITE setFetchLimit NOTIFY fetchLimitChanged )
54 Q_PROPERTY(
bool showBrowserButtons READ showBrowserButtons WRITE setShowBrowserButtons NOTIFY showBrowserButtonsChanged )
87 QString displayExpression()
const;
93 void setDisplayExpression(
const QString &displayExpression );
99 QString filterExpression()
const;
105 int nullIndex()
const;
111 void setFilterExpression(
const QString &filterExpression );
116 bool allowNull()
const;
121 void setAllowNull(
bool allowNull );
126 bool fetchGeometry()
const;
131 void setFetchGeometry(
bool fetchGeometry );
136 int fetchLimit()
const;
142 void setFetchLimit(
int fetchLimit );
147 bool showBrowserButtons()
const;
153 void setShowBrowserButtons(
bool showBrowserButtons );
159 QModelIndex currentModelIndex()
const;
161 void focusOutEvent( QFocusEvent *event )
override;
163 void keyPressEvent( QKeyEvent *event )
override;
211 void onCurrentTextChanged(
const QString &text );
212 void onFilterUpdateCompleted();
213 void onLoadingChanged();
214 void onItemSelected(
const QModelIndex &index );
215 void onCurrentIndexChanged(
int i );
216 void onActivated( QModelIndex index );
217 void storeLineEditState();
218 void restoreLineEditState();
219 void onDataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight,
const QVector<int> &roles = QVector<int>() );
220 void browseFeatures(
int direction );
223 QComboBox *mComboBox;
224 QToolButton *mPreviousButton;
225 QToolButton *mNextButton;
227 QCompleter *mCompleter =
nullptr;
229 bool mPopupRequested =
false;
230 bool mIsCurrentlyEdited =
false;
231 bool mHasStoredEditState =
false;
232 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