16#ifndef QGSFEATURELISTVIEW_H
17#define QGSFEATURELISTVIEW_H
66#pragma clang diagnostic push
67#pragma clang diagnostic ignored "-Woverloaded-virtual"
77#pragma clang diagnostic pop
95 bool setDisplayExpression(
const QString &displayExpression );
104 const QString displayExpression()
const;
111 QString parserErrorString();
125 void setCurrentFeatureEdited(
bool state );
134 void mouseMoveEvent( QMouseEvent *event )
override;
135 void mousePressEvent( QMouseEvent *event )
override;
136 void mouseReleaseEvent( QMouseEvent *event )
override;
137 void keyPressEvent( QKeyEvent *event )
override;
138 void contextMenuEvent( QContextMenuEvent *event )
override;
187 void setEditSelection(
const QModelIndex &index, QItemSelectionModel::SelectionFlags command );
223 void editSelectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
231 void ensureEditSelection(
bool inSelection =
false );
234 void selectRow(
const QModelIndex &index,
bool anchor );
236 void updateEditSelection(
bool inSelection =
false );
246 void editOtherFeature( PositionInList positionInList );
249 QgsFeatureListModel *mModel =
nullptr;
250 QItemSelectionModel *mCurrentEditSelectionModel =
nullptr;
251 QgsFeatureSelectionModel *mFeatureSelectionModel =
nullptr;
252 QgsIFeatureSelectionManager *mOwnedFeatureSelectionManager =
nullptr;
253 QgsIFeatureSelectionManager *mFeatureSelectionManager =
nullptr;
254 QgsFeatureListViewDelegate *mItemDelegate =
nullptr;
263 DragMode mDragMode = DragMode::Inactive;
266 QItemSelectionModel::SelectionFlags mCtrlDragSelectionFlag;
268 QTimer mUpdateEditSelectionTimerWithSelection;
269 QTimer mUpdateEditSelectionTimerWithoutSelection;
A proxy model for filtering an attribute table model.
A model backed by a QgsVectorLayerCache which is able to provide feature/attribute information to a Q...
A proxy model for feature lists.
Custom item delegate for feature list views.
void currentEditSelectionProgressChanged(int progress, int count)
Emitted whenever the current edit selection has been changed.
void editNextFeature()
editNextFeature will try to edit next feature of the list
void editLastFeature()
editLastFeature will try to edit the last feature of the list
void editFirstFeature()
editFirstFeature will try to edit the first feature of the list
void displayExpressionChanged(const QString &expression)
Emitted whenever the display expression is successfully changed.
void repaintRequested(const QModelIndexList &indexes)
void setEditSelection(const QgsFeatureIds &fids)
Set the feature(s) to be edited.
void selectAll() override
Select all currently visible features.
void editPreviousFeature()
editPreviousFeature will try to edit previous feature of the list
QgsVectorLayerCache * layerCache()
Returns the layer cache.
void willShowContextMenu(QgsActionMenu *menu, const QModelIndex &atIndex)
Emitted when the context menu is created to add the specific actions to it.
QgsFeatureListModel * featureListModel()
Gets the featureListModel used by this view.
QgsFeatureListView(QWidget *parent=nullptr)
Creates a feature list view.
virtual void setModel(QgsFeatureListModel *featureListModel)
Set the QgsFeatureListModel which is used to retrieve information.
void currentEditSelectionChanged(QgsFeature &feat)
Emitted whenever the current edit selection has been changed.
void aboutToChangeEditSelection(bool &ok)
Item selection model for selecting features.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Is an interface class to abstract feature selection handling.
Caches features for a given QgsVectorLayer.
Represents a vector layer which manages a vector based dataset.
QSet< QgsFeatureId > QgsFeatureIds
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features