19 #include <QStackedWidget> 21 #include "ui_qgsdualviewbase.h" 42 class GUI_EXPORT
QgsDualView :
public QStackedWidget,
private Ui::QgsDualViewBase
102 bool loadFeatures =
true );
139 void setSelectedOnTop(
bool selectedOnTop );
154 int filteredFeatureCount();
162 void setFilteredFeatures(
const QgsFeatureIds &filteredFeatures );
206 void setSortExpression(
const QString &sortExpression, Qt::SortOrder sortOrder = Qt::AscendingOrder );
211 QString sortExpression()
const;
234 bool saveEditChanges();
236 void openConditionalStyles();
242 void setMultiEditEnabled(
bool enabled );
249 void toggleSearchMode(
bool enabled );
255 void copyCellContent()
const;
261 void cancelProgress( );
269 void displayExpressionChanged(
const QString &expression );
274 void filterChanged();
298 void hideEvent( QHideEvent *event )
override;
302 void featureListAboutToChangeEditSelection(
bool &ok );
309 void featureListCurrentEditSelectionChanged(
const QgsFeature &feat );
311 void previewExpressionBuilder();
313 void previewColumnChanged( QAction *previewAction,
const QString &expression );
315 void viewWillShowContextMenu( QMenu *menu,
const QModelIndex &atIndex );
317 void widgetWillShowContextMenu(
QgsActionMenu *menu,
const QModelIndex &atIndex );
319 void showViewHeaderMenu( QPoint point );
321 void organizeColumns();
323 void tableColumnResized(
int column,
int width );
329 void autosizeColumn();
333 void previewExpressionChanged(
const QString &expression );
335 void onSortColumnChanged();
337 void sortByPreviewExpression();
339 void updateSelectedFeatures();
341 void extentChanged();
348 void featureFormAttributeChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
356 virtual void progress(
int i,
bool &cancel );
362 virtual void finished();
365 void zoomToCurrentFeature();
367 void panToCurrentFeature();
369 void flashCurrentFeature();
371 void rebuildFullLayerCache();
373 void panZoomGroupButtonToggled( QAbstractButton *button,
bool checked );
375 void flashButtonClicked(
bool clicked );
382 void columnBoxInit();
383 void initLayerCache(
bool cacheGeometry );
385 void restoreRecentDisplayExpressions();
386 void saveRecentDisplayExpressions()
const;
387 void setDisplayExpression(
const QString &expression );
388 void insertRecentlyUsedDisplayExpression(
const QString &expression );
389 void updateEditSelectionProgress(
int progress,
int count );
398 QMenu *mPreviewColumnsMenu =
nullptr;
399 QMenu *mPreviewActionMenu =
nullptr;
400 QAction *mLastDisplayExpressionAction =
nullptr;
401 QMenu *mHorizontalHeaderMenu =
nullptr;
403 QPointer< QgsVectorLayer > mLayer =
nullptr;
404 QProgressDialog *mProgressDlg =
nullptr;
406 QString mDisplayExpression;
414 friend class TestQgsDualView;
415 friend class TestQgsAttributeTable;
434 : QAction( name, dualView )
435 , mDualView( dualView )
437 , mFieldIdx( fieldIdx )
447 QModelIndex mFieldIdx;
460 : QAction( name, dualView )
461 , mDualView( dualView )
463 , mFieldIdx( fieldIdx )
472 QModelIndex mFieldIdx;
477 #endif // QGSDUALVIEW_H
Provides a table view of features of a QgsVectorLayer.
QSet< QgsFeatureId > QgsFeatureIds
QgsAttributeTableModel * masterModel() const
Returns the model which has the information about all features (not only filtered) ...
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 map is zoomed to contained the feature bounding-box.
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
The filter mode defines how the rows should be filtered.
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.
FeatureListBrowsingAction
Action on the map canvas when browsing the list of features.
This class caches features of a given QgsVectorLayer.
QgsAttributeTableFilterModel::FilterMode filterMode()
Gets the filter mode.
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.
The map is panned to the center of the feature bounding-box.