19 #include <QStackedWidget> 22 #include "ui_qgsdualviewbase.h" 43 class GUI_EXPORT
QgsDualView :
public QStackedWidget,
private Ui::QgsDualViewBase
90 bool loadFeatures =
true );
127 void setSelectedOnTop(
bool selectedOnTop );
142 int filteredFeatureCount();
150 void setFilteredFeatures(
const QgsFeatureIds &filteredFeatures );
194 void setSortExpression(
const QString &sortExpression, Qt::SortOrder sortOrder = Qt::AscendingOrder );
199 QString sortExpression()
const;
216 bool saveEditChanges();
218 void openConditionalStyles();
224 void setMultiEditEnabled(
bool enabled );
231 void toggleSearchMode(
bool enabled );
237 void copyCellContent()
const;
243 void cancelProgress( );
251 void displayExpressionChanged(
const QString &expression );
256 void filterChanged();
280 void hideEvent( QHideEvent *event )
override;
284 void mFeatureList_aboutToChangeEditSelection(
bool &ok );
291 void mFeatureList_currentEditSelectionChanged(
const QgsFeature &feat );
293 void previewExpressionBuilder();
295 void previewColumnChanged( QAction *previewAction,
const QString &expression );
297 void viewWillShowContextMenu( QMenu *menu,
const QModelIndex &atIndex );
299 void widgetWillShowContextMenu(
QgsActionMenu *menu,
const QModelIndex &atIndex );
301 void showViewHeaderMenu( QPoint point );
303 void organizeColumns();
305 void tableColumnResized(
int column,
int width );
311 void autosizeColumn();
315 void previewExpressionChanged(
const QString &expression );
317 void onSortColumnChanged();
319 void sortByPreviewExpression();
321 void updateSelectedFeatures();
323 void extentChanged();
330 void featureFormAttributeChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
338 virtual void progress(
int i,
bool &cancel );
344 virtual void finished();
347 void zoomToCurrentFeature();
349 void panToCurrentFeature();
351 void flashCurrentFeature();
353 void rebuildFullLayerCache();
360 void columnBoxInit();
361 void initLayerCache(
bool cacheGeometry );
363 void restoreRecentDisplayExpressions();
364 void saveRecentDisplayExpressions()
const;
365 void setDisplayExpression(
const QString &expression );
366 void insertRecentlyUsedDisplayExpression(
const QString &expression );
373 QMenu *mPreviewColumnsMenu =
nullptr;
374 QMenu *mPreviewActionMenu =
nullptr;
375 QAction *mLastDisplayExpressionAction =
nullptr;
376 QMenu *mHorizontalHeaderMenu =
nullptr;
378 QPointer< QgsVectorLayer > mLayer =
nullptr;
379 QProgressDialog *mProgressDlg =
nullptr;
382 QString mDisplayExpression;
390 friend class TestQgsDualView;
391 friend class TestQgsAttributeTable;
410 : QAction( name, dualView )
411 , mDualView( dualView )
413 , mFieldIdx( fieldIdx )
423 QModelIndex mFieldIdx;
436 : QAction( name, dualView )
437 , mDualView( dualView )
439 , mFieldIdx( fieldIdx )
448 QModelIndex mFieldIdx;
453 #endif // QGSDUALVIEW_H
Provides a table view of features of a QgsVectorLayer.
QgsAttributeTableModel * masterModel() const
Returns the model which has the information about all features (not only filtered) ...
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
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()
Get a list of currently visible feature ids.
This class caches features of a given QgsVectorLayer.
QgsAttributeTableFilterModel::FilterMode filterMode()
Get the filter mode.
A general purpose distance and area calculator, capable of performing ellipsoid based calculations...
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.