19 #include <QStackedWidget> 22 #include "ui_qgsdualviewbase.h" 42 class GUI_EXPORT
QgsDualView :
public QStackedWidget,
private Ui::QgsDualViewBase
89 bool loadFeatures = true );
126 void setSelectedOnTop(
bool selectedOnTop );
141 int filteredFeatureCount();
149 void setFilteredFeatures(
const QgsFeatureIds &filteredFeatures );
193 void setSortExpression(
const QString &sortExpression, Qt::SortOrder sortOrder = Qt::AscendingOrder );
198 QString sortExpression()
const;
221 bool saveEditChanges();
223 void openConditionalStyles();
229 void setMultiEditEnabled(
bool enabled );
236 void toggleSearchMode(
bool enabled );
242 void copyCellContent()
const;
248 void cancelProgress( );
256 void displayExpressionChanged(
const QString &expression );
261 void filterChanged();
285 void hideEvent( QHideEvent *event )
override;
289 void mFeatureList_aboutToChangeEditSelection(
bool &ok );
296 void mFeatureList_currentEditSelectionChanged(
const QgsFeature &feat );
298 void previewExpressionBuilder();
300 void previewColumnChanged( QAction *previewAction,
const QString &expression );
302 void viewWillShowContextMenu( QMenu *menu,
const QModelIndex &atIndex );
304 void widgetWillShowContextMenu(
QgsActionMenu *menu,
const QModelIndex &atIndex );
306 void showViewHeaderMenu( QPoint point );
308 void organizeColumns();
310 void tableColumnResized(
int column,
int width );
316 void autosizeColumn();
320 void previewExpressionChanged(
const QString &expression );
322 void onSortColumnChanged();
324 void sortByPreviewExpression();
326 void updateSelectedFeatures();
328 void extentChanged();
335 void featureFormAttributeChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
343 virtual void progress(
int i,
bool &cancel );
349 virtual void finished();
352 void zoomToCurrentFeature();
354 void panToCurrentFeature();
356 void flashCurrentFeature();
358 void rebuildFullLayerCache();
365 void columnBoxInit();
366 void initLayerCache(
bool cacheGeometry );
368 void restoreRecentDisplayExpressions();
369 void saveRecentDisplayExpressions()
const;
370 void setDisplayExpression(
const QString &expression );
371 void insertRecentlyUsedDisplayExpression(
const QString &expression );
378 QMenu *mPreviewColumnsMenu =
nullptr;
379 QMenu *mPreviewActionMenu =
nullptr;
380 QAction *mLastDisplayExpressionAction =
nullptr;
381 QMenu *mHorizontalHeaderMenu =
nullptr;
383 QPointer< QgsVectorLayer > mLayer =
nullptr;
384 QProgressDialog *mProgressDlg =
nullptr;
386 QString mDisplayExpression;
393 friend class TestQgsDualView;
394 friend class TestQgsAttributeTable;
413 : QAction( name, dualView )
414 , mDualView( dualView )
416 , mFieldIdx( fieldIdx )
426 QModelIndex mFieldIdx;
439 : QAction( name, dualView )
440 , mDualView( dualView )
442 , mFieldIdx( fieldIdx )
451 QModelIndex mFieldIdx;
456 #endif // QGSDUALVIEW_H
Provides a table view of features of a QgsVectorLayer.
QSet< QgsFeatureId > QgsFeatureIds
This class contains context information for attribute editor widgets.
QgsAttributeTableView * tableView()
Returns the table view.
ViewMode
The view modes, in which this widget can present information.
QgsAttributeTableMapLayerAction(const QString &name, QgsDualView *dualView, QgsMapLayerAction *action, const QModelIndex &fieldIdx)
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
A model backed by a QgsVectorLayerCache which is able to provide feature/attribute information to a Q...
Q_DECLARE_METATYPE(QModelIndex)
Map canvas is a class for displaying all GIS data types on a canvas.
FilterMode filterMode()
The current filterModel.
This class wraps a request for features to a vector layer (or directly its vector data provider)...
QgsFeatureIds filteredFeatures()
Gets a list of currently visible feature ids.
This class caches features of a given QgsVectorLayer.
QgsAttributeTableModel * masterModel() const
Returns the model which has the information about all features (not only filtered) ...
This is a container for configuration of the attribute table.
Is an interface class to abstract feature selection handling.
Represents a vector layer which manages a vector based data sets.
An action which can run on map layers.
QgsAttributeTableAction(const QString &name, QgsDualView *dualView, QUuid action, const QModelIndex &fieldIdx)
Create a new attribute table action.
This widget is used to show the attributes of a set of features of a QgsVectorLayer.