8 Commits

Author SHA1 Message Date
Nyall Dawson
bcb3e5f425 [FEATURE] Add 'materialize' method to QgsFeatureSource
When called, materialize takes a QgsFeatureRequest argument
and runs it over the source. The resultant features
are saved into a new memory provider based QgsVectorLayer, which
is returned by the function (along with ownership of the layer)

This makes it easy to create a new layer from a subset of an
existing one.

Materialize also considers subsets of attributes, so that the
returned layer only contains fetched fields (and not blank
fields filled with NULL values).
2017-09-26 14:27:40 +10:00
Nyall Dawson
f799d3afc8 Move allFeatureIds from QgsVectorLayer to QgsFeatureSource 2017-09-08 20:09:29 +10:00
Nyall Dawson
eb0c3015f9 Push minimumValues/maximumValues up to QgsFeatureSource base class
Allows these methods to be called on feature sources
2017-07-13 20:07:33 +10:00
Nyall Dawson
7ae1ee975d Add sourceName() method to QgsFeatureSource
Sometimes it's necessary to retrieve the name of a source...
2017-06-26 12:15:01 +10:00
Nyall Dawson
c6c20c6114 Add sourceExtent method to QgsFeatureSource 2017-06-06 17:26:07 +10:00
Nyall Dawson
3388857526 Move uniqueValues to QgsFeatureSource
Also change signature of QgsVectorLayer/QgsVectorDataProvider
uniqueValues method to match (and improve API)
2017-06-05 16:59:08 +10:00
Nyall Dawson
4647662664 Add crs, fields, wkbType and featureCount to QgsFeatureSource 2017-05-25 12:31:06 +10:00
Nyall Dawson
ce063b8691 Add QgsFeatureSource interface as interface for classes which
provide feature iterators via a getFeatures method
2017-05-25 12:31:06 +10:00