19 #include <QStackedWidget> 21 #include "ui_qgsdualviewbase.h" 41 class GUI_EXPORT
QgsDualView :
public QStackedWidget,
private Ui::QgsDualViewBase
101 bool loadFeatures =
true );
138 void setSelectedOnTop(
bool selectedOnTop );
153 int filteredFeatureCount();
161 void setFilteredFeatures(
const QgsFeatureIds &filteredFeatures );
205 void setSortExpression(
const QString &sortExpression, Qt::SortOrder sortOrder = Qt::AscendingOrder );
210 QString sortExpression()
const;
233 bool saveEditChanges();
235 void openConditionalStyles();
241 void setMultiEditEnabled(
bool enabled );
248 void toggleSearchMode(
bool enabled );
254 void copyCellContent()
const;
260 void cancelProgress( );
268 void displayExpressionChanged(
const QString &expression );
273 void filterChanged();
297 void hideEvent( QHideEvent *event )
override;
301 void featureListAboutToChangeEditSelection(
bool &ok );
308 void featureListCurrentEditSelectionChanged(
const QgsFeature &feat );
310 void previewExpressionBuilder();
312 void previewColumnChanged( QAction *previewAction,
const QString &expression );
314 void viewWillShowContextMenu( QMenu *menu,
const QModelIndex &atIndex );
316 void widgetWillShowContextMenu(
QgsActionMenu *menu,
const QModelIndex &atIndex );
318 void showViewHeaderMenu( QPoint point );
320 void organizeColumns();
322 void tableColumnResized(
int column,
int width );
328 void autosizeColumn();
332 void previewExpressionChanged(
const QString &expression );
334 void onSortColumnChanged();
336 void sortByPreviewExpression();
338 void updateSelectedFeatures();
340 void extentChanged();
347 void featureFormAttributeChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
355 virtual void progress(
int i,
bool &cancel );
361 virtual void finished();
364 void zoomToCurrentFeature();
366 void panToCurrentFeature();
368 void flashCurrentFeature();
370 void rebuildFullLayerCache();
372 void panZoomGroupButtonToggled( QAbstractButton *button,
bool checked );
374 void flashButtonClicked(
bool clicked );
381 void columnBoxInit();
382 void initLayerCache(
bool cacheGeometry );
384 void restoreRecentDisplayExpressions();
385 void saveRecentDisplayExpressions()
const;
386 void setDisplayExpression(
const QString &expression );
387 void insertRecentlyUsedDisplayExpression(
const QString &expression );
388 void updateEditSelectionProgress(
int progress,
int count );
391 void setBrowsingAutoPanScaleAllowed(
bool allowed );
399 QMenu *mPreviewColumnsMenu =
nullptr;
400 QMenu *mPreviewActionMenu =
nullptr;
401 QAction *mLastDisplayExpressionAction =
nullptr;
402 QMenu *mHorizontalHeaderMenu =
nullptr;
404 QPointer< QgsVectorLayer > mLayer =
nullptr;
405 QProgressDialog *mProgressDlg =
nullptr;
407 QString mDisplayExpression;
414 bool mBrowsingAutoPanScaleAllowed =
true;
416 friend class TestQgsDualView;
417 friend class TestQgsAttributeTable;
436 : QAction( name, dualView )
437 , mDualView( dualView )
439 , mFieldIdx( fieldIdx )
449 QModelIndex mFieldIdx;
462 : QAction( name, dualView )
463 , mDualView( dualView )
465 , mFieldIdx( fieldIdx )
474 QModelIndex mFieldIdx;
479 #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.