QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
19 #include <QStackedWidget>
21 #include "ui_qgsdualviewbase.h"
41 class GUI_EXPORT
QgsDualView :
public QStackedWidget,
private Ui::QgsDualViewBase
77 Q_ENUM( FeatureListBrowsingAction )
101 bool loadFeatures =
true );
109 void setView( ViewMode view );
116 ViewMode view()
const;
138 void setSelectedOnTop(
bool selectedOnTop );
153 int filteredFeatureCount();
162 Q_DECL_DEPRECATED
void setFilteredFeatures(
const QgsFeatureIds &filteredFeatures );
214 void setSortExpression(
const QString &sortExpression, Qt::SortOrder sortOrder = Qt::AscendingOrder );
219 QString sortExpression()
const;
242 bool saveEditChanges();
244 void openConditionalStyles();
250 void setMultiEditEnabled(
bool enabled );
257 void toggleSearchMode(
bool enabled );
263 void copyCellContent()
const;
269 void cancelProgress( );
279 void parentFormValueChanged(
const QString &attribute,
const QVariant &value );
316 void hideEvent( QHideEvent *event )
override;
320 void featureListAboutToChangeEditSelection(
bool &ok );
327 void featureListCurrentEditSelectionChanged(
const QgsFeature &feat );
329 void previewExpressionBuilder();
331 void previewColumnChanged( QAction *previewAction,
const QString &expression );
333 void viewWillShowContextMenu( QMenu *menu,
const QModelIndex &atIndex );
335 void widgetWillShowContextMenu(
QgsActionMenu *menu,
const QModelIndex &atIndex );
337 void showViewHeaderMenu( QPoint point );
339 void organizeColumns();
341 void tableColumnResized(
int column,
int width );
347 void autosizeColumn();
349 void previewExpressionChanged(
const QString &expression );
351 void onSortColumnChanged();
353 void updateSelectedFeatures();
355 void extentChanged();
362 void featureFormAttributeChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
370 virtual void progress(
int i,
bool &cancel );
376 virtual void finished();
379 void zoomToCurrentFeature();
381 void panToCurrentFeature();
383 void flashCurrentFeature();
385 void rebuildFullLayerCache();
387 void panZoomGroupButtonToggled( QAbstractButton *button,
bool checked );
389 void flashButtonClicked(
bool clicked );
396 void columnBoxInit();
397 void initLayerCache(
bool cacheGeometry );
399 void restoreRecentDisplayExpressions();
400 void saveRecentDisplayExpressions()
const;
401 void setDisplayExpression(
const QString &expression );
402 void insertRecentlyUsedDisplayExpression(
const QString &expression );
403 void updateEditSelectionProgress(
int progress,
int count );
406 void setBrowsingAutoPanScaleAllowed(
bool allowed );
418 QMenu *mPreviewColumnsMenu =
nullptr;
419 QMenu *mPreviewActionMenu =
nullptr;
420 QAction *mLastDisplayExpressionAction =
nullptr;
421 QMenu *mHorizontalHeaderMenu =
nullptr;
423 QPointer< QgsVectorLayer > mLayer =
nullptr;
424 QProgressDialog *mProgressDlg =
nullptr;
426 QString mDisplayExpression;
433 bool mBrowsingAutoPanScaleAllowed =
true;
434 ViewMode mPreviousView = AttributeTable;
436 friend class TestQgsDualView;
437 friend class TestQgsAttributeTable;
456 : QAction( name, dualView )
457 , mDualView( dualView )
459 , mFieldIdx( fieldIdx )
469 QModelIndex mFieldIdx;
482 : QAction( name, dualView )
483 , mDualView( dualView )
485 , mFieldIdx( fieldIdx )
494 QModelIndex mFieldIdx;
499 #endif // QGSDUALVIEW_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
An action which can run on map layers.
This class caches features of a given QgsVectorLayer.
QgsAttributeTableAction(const QString &name, QgsDualView *dualView, QUuid action, const QModelIndex &fieldIdx)
Create a new attribute table action.
void formModeChanged(QgsAttributeEditorContext::Mode mode)
Emitted when the form changes mode.
@ PanToFeature
The map is panned to the center of the feature bounding-box.
Map canvas is a class for displaying all GIS data types on a canvas.
void filterChanged()
Emitted whenever the filter changes.
QgsAttributeTableMapLayerAction(const QString &name, QgsDualView *dualView, QgsMapLayerAction *action, const QModelIndex &fieldIdx)
This widget is used to show the attributes of a set of features of a QgsVectorLayer.
QgsAttributeTableView * tableView()
Returns the table view.
FeatureListBrowsingAction
Action on the map canvas when browsing the list of features.
QgsAttributeTableModel * masterModel() const
Returns the model which has the information about all features (not only filtered)
QgsFeatureIds filteredFeatures()
Gets a list of currently visible feature ids.
This is a container for configuration of the attribute table.
This class wraps a request for features to a vector layer (or directly its vector data provider).
@ ZoomToFeature
The map is zoomed to contained the feature bounding-box.
Q_DECLARE_METATYPE(QModelIndex)
A model backed by a QgsVectorLayerCache which is able to provide feature/attribute information to a Q...
QgsAttributeTableFilterModel::FilterMode filterMode()
Gets the filter mode.
QSet< QgsFeatureId > QgsFeatureIds
ViewMode
The view modes, in which this widget can present information.
Represents a vector layer which manages a vector based data sets.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void filterExpressionSet(const QString &expression, QgsAttributeForm::FilterType type)
Emitted when a filter expression is set using the view.
void showContextMenuExternally(QgsActionMenu *menu, QgsFeatureId fid)
Emitted when selecting context menu on the feature list to create the context menu individually.
Is an interface class to abstract feature selection handling.
Class for parsing and evaluation of expressions (formerly called "search strings").
Provides a table view of features of a QgsVectorLayer.
This class contains context information for attribute editor widgets.
FilterMode
The filter mode defines how the rows should be filtered.
void displayExpressionChanged(const QString &expression)
Emitted whenever the display expression is successfully changed.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features