Provides a table view of features of a QgsVectorLayer.
More...
#include <qgsattributetableview.h>
|
void | columnResized (int column, int width) |
| Emitted when a column in the view has been resized. More...
|
|
void | finished () |
|
void | willShowContextMenu (QMenu *menu, const QModelIndex &atIndex) |
| Is emitted, in order to provide a hook to add additional* menu entries to the context menu. More...
|
|
|
void | closeEvent (QCloseEvent *event) override |
| Saves geometry to the settings on close. More...
|
|
void | contextMenuEvent (QContextMenuEvent *event) override |
| Is called when the context menu will be shown. More...
|
|
void | keyPressEvent (QKeyEvent *event) override |
| Called for key press events Disables selection change by only pressing an arrow key. More...
|
|
void | mouseMoveEvent (QMouseEvent *event) override |
| Called for mouse move events on a table cell. More...
|
|
void | mousePressEvent (QMouseEvent *event) override |
| Called for mouse press events on a table cell. More...
|
|
void | mouseReleaseEvent (QMouseEvent *event) override |
| Called for mouse release events on a table cell. More...
|
|
Provides a table view of features of a QgsVectorLayer.
This can either be used as a standalone widget. QgsBrowser features a reference implementation. Or this can be used within the QgsDualView stacked widget.
Definition at line 49 of file qgsattributetableview.h.
QgsAttributeTableView::QgsAttributeTableView |
( |
QWidget * |
parent = nullptr | ) |
|
void QgsAttributeTableView::_q_selectRow |
( |
int |
row | ) |
|
|
virtualslot |
void QgsAttributeTableView::closeEvent |
( |
QCloseEvent * |
event | ) |
|
|
overrideprotected |
void QgsAttributeTableView::columnResized |
( |
int |
column, |
|
|
int |
width |
|
) |
| |
|
signal |
Emitted when a column in the view has been resized.
- Parameters
-
column | column index (starts at 0) |
width | new width in pixel |
- Since
- QGIS 2.16
void QgsAttributeTableView::contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
overrideprotected |
Is called when the context menu will be shown.
Emits a willShowContextMenu() signal, so the menu can be populated by other parts of the application.
- Parameters
-
event | The associated event object. |
Definition at line 346 of file qgsattributetableview.cpp.
bool QgsAttributeTableView::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
event |
|
) |
| |
|
override |
This event filter is installed on the verticalHeader to intercept mouse press and release events.
These are used to disable / enable live synchronisation with the map canvas selection which can be slow due to recurring canvas repaints.
- Parameters
-
object | The object which is the target of the event. |
event | The intercepted event |
- Returns
- Returns always false, so the event gets processed
Definition at line 68 of file qgsattributetableview.cpp.
void QgsAttributeTableView::finished |
( |
| ) |
|
|
signal |
void QgsAttributeTableView::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
Called for key press events Disables selection change by only pressing an arrow key.
- Parameters
-
Definition at line 304 of file qgsattributetableview.cpp.
void QgsAttributeTableView::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Called for mouse move events on a table cell.
Disables selection change for these events.
- Parameters
-
Definition at line 297 of file qgsattributetableview.cpp.
void QgsAttributeTableView::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Called for mouse press events on a table cell.
Disables selection change for these events.
- Parameters
-
Definition at line 283 of file qgsattributetableview.cpp.
void QgsAttributeTableView::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Called for mouse release events on a table cell.
Disables selection change for these events.
- Parameters
-
Definition at line 290 of file qgsattributetableview.cpp.
void QgsAttributeTableView::repaintRequested |
( |
const QModelIndexList & |
indexes | ) |
|
|
slot |
void QgsAttributeTableView::repaintRequested |
( |
| ) |
|
|
slot |
void QgsAttributeTableView::selectAll |
( |
| ) |
|
|
overrideslot |
QList< QgsFeatureId > QgsAttributeTableView::selectedFeaturesIds |
( |
| ) |
const |
Returns the selected features in the attribute table in table sorted order.
- Returns
- The selected features in the attribute table in the order sorted by the table.
- Since
- QGIS 3.4
Definition at line 110 of file qgsattributetableview.cpp.
void QgsAttributeTableView::selectRow |
( |
int |
row | ) |
|
|
virtualslot |
Set the attribute table config which should be used to control the appearance of the attribute table.
- Since
- QGIS 2.16
Definition at line 89 of file qgsattributetableview.cpp.
setFeatureSelectionManager
- Parameters
-
featureSelectionManager | We will take ownership |
Definition at line 168 of file qgsattributetableview.cpp.
void QgsAttributeTableView::willShowContextMenu |
( |
QMenu * |
menu, |
|
|
const QModelIndex & |
atIndex |
|
) |
| |
|
signal |
Is emitted, in order to provide a hook to add additional* menu entries to the context menu.
- Parameters
-
menu | If additional QMenuItems are added, they will show up in the context menu. |
atIndex | The QModelIndex, to which the context menu belongs. Relative to the source model. In most cases, this will be a QgsAttributeTableFilterModel |
The documentation for this class was generated from the following files: