Skip to content

Commit

Permalink
Merge pull request #9992 from 3nids/itembrowser
Browse files Browse the repository at this point in the history
allow browsing feature list in feature mode
  • Loading branch information
3nids committed May 15, 2019
2 parents 7df3163 + 3b875a7 commit 053f54c
Show file tree
Hide file tree
Showing 16 changed files with 661 additions and 116 deletions.
2 changes: 2 additions & 0 deletions images/images.qrc
Expand Up @@ -751,6 +751,8 @@
<file>themes/default/mIconDataDefineColor.svg</file>
<file>themes/default/mIconDataDefineColorOn.svg</file>
<file>themes/default/mActionNewVirtualLayer.svg</file>
<file>themes/default/mActionDoubleArrowRight.svg</file>
<file>themes/default/mActionDoubleArrowLeft.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Expand Down
81 changes: 81 additions & 0 deletions images/themes/default/mActionDoubleArrowLeft.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions images/themes/default/mActionDoubleArrowRight.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions python/gui/auto_additions/qgsdualview.py
@@ -1,2 +1,3 @@
# The following has been generated automatically from src/gui/attributetable/qgsdualview.h
QgsDualView.ViewMode.baseClass = QgsDualView
QgsDualView.FeatureListBrowsingAction.baseClass = QgsDualView
13 changes: 12 additions & 1 deletion python/gui/auto_generated/attributetable/qgsdualview.sip.in
Expand Up @@ -35,14 +35,25 @@ and the attributes for the currently selected feature are shown in a form.
};


enum FeatureListBrowsingAction
{
NoAction,
FlashFeature,
PanToFeature,
ZoomToFeature,
};

explicit QgsDualView( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor

:param parent: The parent widget
%End

void init( QgsVectorLayer *layer, QgsMapCanvas *mapCanvas, const QgsFeatureRequest &request = QgsFeatureRequest(), const QgsAttributeEditorContext &context = QgsAttributeEditorContext(),
void init( QgsVectorLayer *layer,
QgsMapCanvas *mapCanvas,
const QgsFeatureRequest &request = QgsFeatureRequest(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(),
bool loadFeatures = true );
%Docstring
Has to be called to initialize the dual view.
Expand Down
40 changes: 40 additions & 0 deletions python/gui/auto_generated/attributetable/qgsfeaturelistview.sip.in
Expand Up @@ -118,6 +118,16 @@ setFeatureSelectionManager
Emitted whenever the current edit selection has been changed.

:param feat: the feature, which will be edited.
%End

void currentEditSelectionProgressChanged( int progress, int count );
%Docstring
Emitted whenever the current edit selection has been changed.

:param progress: the position of the feature in the list
:param count: the number of features in the list

.. versionadded:: 3.8
%End

void displayExpressionChanged( const QString &expression );
Expand Down Expand Up @@ -162,6 +172,36 @@ Select all currently visible features
void repaintRequested( const QModelIndexList &indexes );
void repaintRequested();

void editFirstFeature();
%Docstring
editFirstFeature will try to edit the first feature of the list

.. versionadded:: 3.8
%End

void editNextFeature();
%Docstring
editNextFeature will try to edit next feature of the list

.. versionadded:: 3.8
%End

void editPreviousFeature();
%Docstring
editPreviousFeature will try to edit previous feature of the list

.. versionadded:: 3.8
%End

void editLastFeature();
%Docstring
editLastFeature will try to edit the last feature of the list

.. versionadded:: 3.8
%End



};

/************************************************************************
Expand Down
5 changes: 3 additions & 2 deletions python/gui/auto_generated/qgsmapcanvas.sip.in
Expand Up @@ -232,12 +232,13 @@ Set canvas extent to the bounding box of a set of features
:param ids: the feature ids*
%End

void panToFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds &ids );
void panToFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds &ids, bool alwaysRecenter = true );
%Docstring
Centers canvas extent to feature ids

:param layer: the vector layer
:param ids: the feature ids*
:param ids: the feature ids
:param alwaysRecenter: if false, the canvas is recentered only if the bounding box is not contained within the current extent
%End

void panToSelected( QgsVectorLayer *layer = 0 );
Expand Down

0 comments on commit 053f54c

Please sign in to comment.