2017-06-08 15:51:05 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/attributetable/qgsattributetableview.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
class QgsAttributeTableView : QTableView
|
|
|
|
{
|
2017-06-08 15:51:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Provides a table view of features of a QgsVectorLayer.
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
This can either be used as a standalone widget. QgsBrowser features a reference implementation.
|
|
|
|
Or this can be used within the QgsDualView stacked widget.
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
|
2017-06-08 15:51:05 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsattributetableview.h"
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
public:
|
2017-12-12 11:44:10 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsAttributeTableView( QWidget *parent /TransferThis/ = 0 );
|
2017-12-12 11:44:10 +10:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsAttributeTableView
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual void setModel( QgsAttributeTableFilterModel *filterModel );
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager /Transfer/ );
|
2017-06-08 15:51:05 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
setFeatureSelectionManager
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param featureSelectionManager: We will take ownership
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
2014-05-27 23:22:50 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual bool eventFilter( QObject *object, QEvent *event );
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-06-08 15:51:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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.
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param object: The object which is the target of the event.
|
2018-05-27 16:42:41 +10:00
|
|
|
:param event: The intercepted event
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2019-02-26 19:54:09 +10:00
|
|
|
:return: Returns always ``False``, so the event gets processed
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
2014-05-27 23:22:50 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setAttributeTableConfig( const QgsAttributeTableConfig &config );
|
2017-06-08 15:51:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set the attribute table config which should be used to control
|
|
|
|
the appearance of the attribute table.
|
|
|
|
|
2017-06-08 15:51:05 +02:00
|
|
|
.. versionadded:: 2.16
|
2018-10-08 12:07:28 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QList<QgsFeatureId> selectedFeaturesIds() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the selected features in the attribute table in table sorted order.
|
|
|
|
|
|
|
|
:return: The selected features in the attribute table in the order sorted by the table.
|
|
|
|
|
|
|
|
.. versionadded:: 3.4
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
2016-06-03 12:23:11 +10:00
|
|
|
|
2013-02-20 12:14:02 +01:00
|
|
|
protected:
|
2017-06-08 15:51:05 +02:00
|
|
|
|
|
|
|
virtual void mousePressEvent( QMouseEvent *event );
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Called for mouse press events on a table cell.
|
|
|
|
Disables selection change for these events.
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param event: The mouse event
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void mouseReleaseEvent( QMouseEvent *event );
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Called for mouse release events on a table cell.
|
|
|
|
Disables selection change for these events.
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param event: The mouse event
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void mouseMoveEvent( QMouseEvent *event );
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Called for mouse move events on a table cell.
|
|
|
|
Disables selection change for these events.
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param event: The mouse event
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void keyPressEvent( QKeyEvent *event );
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Called for key press events
|
|
|
|
Disables selection change by only pressing an arrow key
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param event: The mouse event
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void contextMenuEvent( QContextMenuEvent *event );
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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.
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param event: The associated event object.
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void closeEvent( QCloseEvent *event );
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Saves geometry to the settings on close
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param event: not used
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
signals:
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void willShowContextMenu( QMenu *menu, const QModelIndex &atIndex );
|
2017-06-08 15:51:05 +02:00
|
|
|
%Docstring
|
2019-02-25 19:18:29 +10:00
|
|
|
Emitted in order to provide a hook to add additional* menu entries to the context menu.
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2018-05-27 16:42:41 +10:00
|
|
|
:param menu: If additional QMenuItems are added, they will show up in the context menu.
|
|
|
|
:param atIndex: The QModelIndex, to which the context menu belongs. Relative to the source model.
|
2018-05-24 21:21:14 +10:00
|
|
|
In most cases, this will be a :py:class:`QgsAttributeTableFilterModel`
|
2017-06-08 15:51:05 +02:00
|
|
|
%End
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2016-06-03 12:23:11 +10:00
|
|
|
void columnResized( int column, int width );
|
2017-06-08 15:51:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted when a column in the view has been resized.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param column: column index (starts at 0)
|
|
|
|
:param width: new width in pixel
|
|
|
|
|
2017-06-08 15:51:05 +02:00
|
|
|
.. versionadded:: 2.16
|
|
|
|
%End
|
|
|
|
|
|
|
|
void finished();
|
2016-06-03 12:23:11 +10:00
|
|
|
|
2013-06-23 16:00:16 +02:00
|
|
|
public slots:
|
2017-05-01 18:13:15 +02:00
|
|
|
void repaintRequested( const QModelIndexList &indexes );
|
2013-06-23 16:00:16 +02:00
|
|
|
void repaintRequested();
|
|
|
|
virtual void selectAll();
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2013-06-23 16:00:16 +02:00
|
|
|
virtual void selectRow( int row );
|
|
|
|
virtual void _q_selectRow( int row );
|
2017-06-08 15:51:05 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
2017-06-08 15:51:05 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/attributetable/qgsattributetableview.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|