Skip to content
Permalink
Browse files

allow fetching all features in QgsFeaturePickerWidget (#36193)

and more documentation
  • Loading branch information
3nids committed May 5, 2020
1 parent 9e91eb5 commit c22c73dde2990250b4dbeedc8b59e8c83cb25af0
@@ -148,6 +148,7 @@ Returns the feature request fetch limit
void setFetchLimit( int fetchLimit );
%Docstring
Defines the feature request fetch limit
If set to 0, no limit is applied when fetching
%End

signals:
@@ -110,6 +110,7 @@ Returns the feature request fetch limit
void setFetchLimit( int fetchLimit );
%Docstring
Defines the feature request fetch limit
If set to 0, no limit is applied when fetching
%End

bool showBrowserButtons() const;
@@ -120,6 +121,10 @@ Returns if the browsing buttons are shown
void setShowBrowserButtons( bool showBrowserButtons );
%Docstring
Defines if the browsing buttons are shown

.. note::

Buttons are browsing the currently fetched features. If a limit is set, there might be more features to be fetched from the layer.
%End


@@ -409,7 +409,8 @@ void QgsFeaturePickerModelBase::scheduledReload()

if ( !mFetchGeometry )
request.setFlags( QgsFeatureRequest::NoGeometry );
request.setLimit( mFetchLimit );
if ( mFetchLimit > 0 )
request.setLimit( mFetchLimit );

mGatherer = createValuesGatherer( request );
mGatherer->setData( mShouldReloadCurrentFeature );
@@ -170,6 +170,7 @@ class CORE_EXPORT QgsFeaturePickerModelBase : public QAbstractItemModel SIP_ABST

/**
* Defines the feature request fetch limit
* If set to 0, no limit is applied when fetching
*/
void setFetchLimit( int fetchLimit );

@@ -137,6 +137,7 @@ class GUI_EXPORT QgsFeaturePickerWidget : public QWidget

/**
* Defines the feature request fetch limit
* If set to 0, no limit is applied when fetching
*/
void setFetchLimit( int fetchLimit );

@@ -147,6 +148,7 @@ class GUI_EXPORT QgsFeaturePickerWidget : public QWidget

/**
* Defines if the browsing buttons are shown
* \note Buttons are browsing the currently fetched features. If a limit is set, there might be more features to be fetched from the layer.
*/
void setShowBrowserButtons( bool showBrowserButtons );

0 comments on commit c22c73d

Please sign in to comment.
You can’t perform that action at this time.