|
| QgsVectorDataProvider (const QString &uri=QString(), const QgsDataProvider::ProviderOptions &providerOptions=QgsDataProvider::ProviderOptions(), QgsDataProvider::ReadFlags flags=QgsDataProvider::ReadFlags()) |
| Constructor for a vector data provider. More...
|
|
virtual bool | addAttributes (const QList< QgsField > &attributes) |
| Adds new attributes to the provider. More...
|
|
bool | addFeatures (QgsFeatureList &flist, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) override |
| Adds a list of features to the sink. More...
|
|
virtual QVariant | aggregate (QgsAggregateCalculator::Aggregate aggregate, int index, const QgsAggregateCalculator::AggregateParameters ¶meters, QgsExpressionContext *context, bool &ok, QgsFeatureIds *fids=nullptr) const |
| Calculates an aggregated value from the layer's features. More...
|
|
virtual QgsAttributeList | attributeIndexes () const |
| Returns list of indexes to fetch all attributes in nextFeature() More...
|
|
virtual bool | cancelReload () |
| Cancels the current reloading of data. More...
|
|
virtual Q_INVOKABLE QgsVectorDataProvider::Capabilities | capabilities () const |
| Returns flags containing the supported capabilities. More...
|
|
QString | capabilitiesString () const |
| Returns the above in friendly format. More...
|
|
virtual bool | changeAttributeValues (const QgsChangedAttributesMap &attr_map) |
| Changes attribute values of existing features. More...
|
|
virtual bool | changeFeatures (const QgsChangedAttributesMap &attr_map, const QgsGeometryMap &geometry_map) |
| Changes attribute values and geometries of existing features. More...
|
|
virtual bool | changeGeometryValues (const QgsGeometryMap &geometry_map) |
| Changes geometries of existing features. More...
|
|
void | clearErrors () |
| Clear recorded errors. More...
|
|
virtual bool | createAttributeIndex (int field) |
| Create an attribute index on the datasource. More...
|
|
virtual QgsAbstractVectorLayerLabeling * | createLabeling (const QVariantMap &configuration=QVariantMap()) const |
| Creates labeling settings, using provider backend specific information. More...
|
|
virtual QgsFeatureRenderer * | createRenderer (const QVariantMap &configuration=QVariantMap()) const |
| Creates a new vector layer feature renderer, using provider backend specific information. More...
|
|
virtual bool | createSpatialIndex () |
| Creates a spatial index on the datasource (if supported by the provider type). More...
|
|
virtual QString | dataComment () const override |
| Returns a short comment for the data that this provider is providing access to (e.g. More...
|
|
virtual QVariant | defaultValue (int fieldIndex) const |
| Returns any literal default values which are present at the provider for a specified field index. More...
|
|
virtual QString | defaultValueClause (int fieldIndex) const |
| Returns any default value clauses which are present at the provider for a specified field index. More...
|
|
virtual bool | deleteAttributes (const QgsAttributeIds &attributes) |
| Deletes existing attributes from the provider. More...
|
|
virtual bool | deleteFeatures (const QgsFeatureIds &id) |
| Deletes one or more features from the provider. More...
|
|
virtual QSet< QgsMapLayerDependency > | dependencies () const |
| Gets the list of layer ids on which this layer depends. More...
|
|
virtual QList< QgsRelation > | discoverRelations (const QgsVectorLayer *target, const QList< QgsVectorLayer * > &layers) const |
| Discover the available relations with the given layers. More...
|
|
virtual bool | doesStrictFeatureTypeCheck () const |
| Returns true if the provider is strict about the type of inserted features (e.g. More...
|
|
virtual bool | empty () const |
| Returns true if the layer does not contain any feature. More...
|
|
QString | encoding () const |
| Returns the encoding which is used for accessing data. More...
|
|
virtual void | enumValues (int index, QStringList &enumList) const |
| Returns the possible enum values of an attribute. More...
|
|
QStringList | errors () const |
| Gets recorded errors. More...
|
|
long long | featureCount () const override=0 |
| Number of features in the layer. More...
|
|
virtual QgsAbstractFeatureSource * | featureSource () const =0 |
| Returns feature source object that can be used for querying provider's data. More...
|
|
QgsFieldConstraints::Constraints | fieldConstraints (int fieldIndex) const |
| Returns any constraints which are present at the provider for a specified field index. More...
|
|
int | fieldNameIndex (const QString &fieldName) const |
| Returns the index of a field name or -1 if the field does not exist. More...
|
|
QMap< QString, int > | fieldNameMap () const |
| Returns a map where the key is the name of the field and the value is its index. More...
|
|
QgsFields | fields () const override=0 |
| Returns the fields associated with this data provider. More...
|
|
virtual Q_DECL_DEPRECATED void | forceReload () |
|
QgsFeatureIterator | getFeatures (const QgsFeatureRequest &request=QgsFeatureRequest()) const override=0 |
| Query the provider for features specified in request. More...
|
|
virtual void | handlePostCloneOperations (QgsVectorDataProvider *source) |
| Handles any post-clone operations required after this vector data provider was cloned from the source provider. More...
|
|
bool | hasErrors () const |
| Provider has errors to report. More...
|
|
QgsFeatureSource::FeatureAvailability | hasFeatures () const override |
| Will always return FeatureAvailability::FeaturesAvailable or FeatureAvailability::NoFeaturesAvailable. More...
|
|
virtual bool | hasMetadata () const |
| Returns true if the data source has metadata, false otherwise. More...
|
|
virtual bool | isDeleteStyleFromDatabaseSupported () const |
| It returns false by default. More...
|
|
virtual bool | isSaveAndLoadStyleToDatabaseSupported () const |
| It returns false by default. More...
|
|
virtual bool | isSqlQuery () const |
| Returns true if the layer is a query (SQL) layer. More...
|
|
QString | lastError () const override |
| Returns the most recent error encountered by the sink, e.g. More...
|
|
QVariant | maximumValue (int index) const override |
| Returns the maximum value of an attribute. More...
|
|
virtual QVariantMap | metadata () const |
| Gets metadata, dependent on the provider type, that will be display in the metadata tab of the layer properties. More...
|
|
QVariant | minimumValue (int index) const override |
| Returns the minimum value of an attribute. More...
|
|
QList< QgsVectorDataProvider::NativeType > | nativeTypes () const |
| Returns the names of the supported types. More...
|
|
virtual QgsAttrPalIndexNameHash | palAttributeIndexNames () const |
| Returns list of indexes to names for QgsPalLabeling fix. More...
|
|
virtual QgsAttributeList | pkAttributeIndexes () const |
| Returns list of indexes of fields that make up the primary key. More...
|
|
virtual bool | renameAttributes (const QgsFieldNameMap &renamedAttributes) |
| Renames existing attributes. More...
|
|
virtual void | setEncoding (const QString &e) |
| Set encoding used for accessing data from layer. More...
|
|
virtual bool | skipConstraintCheck (int fieldIndex, QgsFieldConstraints::Constraint constraint, const QVariant &value=QVariant()) const |
| Returns true if a constraint check should be skipped for a specified field (e.g., if the value returned by defaultValue() is trusted implicitly. More...
|
|
QgsCoordinateReferenceSystem | sourceCrs () const override |
| Returns the coordinate reference system for features in the source. More...
|
|
QgsRectangle | sourceExtent () const override |
| Returns the extent of all geometries from the source. More...
|
|
QString | sourceName () const override |
| Returns a friendly display name for the source. More...
|
|
virtual QString | storageType () const |
| Returns the permanent storage type for this layer as a friendly name. More...
|
|
bool | supportedType (const QgsField &field) const |
| check if provider supports type of field More...
|
|
const QgsVectorDataProviderTemporalCapabilities * | temporalCapabilities () const override |
| Returns the provider's temporal capabilities. More...
|
|
QgsVectorDataProviderTemporalCapabilities * | temporalCapabilities () override |
| Returns the provider's temporal capabilities. More...
|
|
virtual QgsTransaction * | transaction () const |
| Returns the transaction this data provider is included in, if any. More...
|
|
virtual QString | translateMetadataKey (const QString &mdKey) const |
| Gets the translated metadata key. More...
|
|
virtual QString | translateMetadataValue (const QString &mdKey, const QVariant &value) const |
| Gets the translated metadata value. More...
|
|
virtual bool | truncate () |
| Removes all features from the layer. More...
|
|
virtual QStringList | uniqueStringsMatching (int index, const QString &substring, int limit=-1, QgsFeedback *feedback=nullptr) const |
| Returns unique string values of an attribute which contain a specified subset string. More...
|
|
virtual Qgis::VectorLayerTypeFlags | vectorLayerTypeFlags () const |
| Returns the vector layer type flags. More...
|
|
QgsWkbTypes::Type | wkbType () const override=0 |
| Returns the geometry type which is returned by this layer. More...
|
|
| QgsDataProvider (const QString &uri=QString(), const QgsDataProvider::ProviderOptions &providerOptions=QgsDataProvider::ProviderOptions(), QgsDataProvider::ReadFlags flags=QgsDataProvider::ReadFlags()) |
| Create a new dataprovider with the specified in the uri. More...
|
|
virtual QgsCoordinateReferenceSystem | crs () const =0 |
| Returns the coordinate system for the data source. More...
|
|
virtual QString | dataComment () const |
| Returns a short comment for the data that this provider is providing access to (e.g. More...
|
|
virtual QString | dataSourceUri (bool expandAuthConfig=false) const |
| Gets the data source specification. More...
|
|
virtual QDateTime | dataTimestamp () const |
| Current time stamp of data source. More...
|
|
virtual QString | description () const =0 |
| Returns description. More...
|
|
virtual bool | enterUpdateMode () |
| Enter update mode. More...
|
|
virtual QgsError | error () const |
| Gets current status error. More...
|
|
virtual QgsRectangle | extent () const =0 |
| Returns the extent of the layer. More...
|
|
virtual QString | fileRasterFilters () const |
| Returns raster file filter string. More...
|
|
virtual QString | fileVectorFilters () const |
| Returns vector file filter string. More...
|
|
virtual Qgis::DataProviderFlags | flags () const |
| Returns the generic data provider flags. More...
|
|
virtual void | invalidateConnections (const QString &connection) |
| Invalidate connections corresponding to specified name. More...
|
|
virtual bool | isValid () const =0 |
| Returns true if this is a valid layer. More...
|
|
virtual QgsLayerMetadata | layerMetadata () const |
| Returns layer metadata collected from the provider's source. More...
|
|
virtual bool | leaveUpdateMode () |
| Leave update mode. More...
|
|
virtual QString | name () const =0 |
| Returns a provider name. More...
|
|
QVariant | providerProperty (int property, const QVariant &defaultValue) const |
| Gets the current value of a certain provider property. More...
|
|
QVariant | providerProperty (ProviderProperty property, const QVariant &defaultValue=QVariant()) const |
| Gets the current value of a certain provider property. More...
|
|
virtual void | reloadData () |
| Reloads the data from the source for providers with data caches to synchronize, changes in the data source, feature counts and other specific actions. More...
|
|
virtual bool | renderInPreview (const QgsDataProvider::PreviewContext &context) |
| Returns whether the layer must be rendered in preview jobs. More...
|
|
virtual void | setDataSourceUri (const QString &uri) |
| Set the data source specification. More...
|
|
virtual void | setLayerOrder (const QStringList &layers) |
| Reorder the list of layer names to be rendered by this provider (in order from bottom to top) More...
|
|
virtual void | setListening (bool isListening) |
| Set whether the provider will listen to datasource notifications If set, the provider will issue notify signals. More...
|
|
void | setProviderProperty (int property, const QVariant &value) |
| Allows setting arbitrary properties on the provider. More...
|
|
void | setProviderProperty (ProviderProperty property, const QVariant &value) |
| Allows setting arbitrary properties on the provider. More...
|
|
virtual void | setSubLayerVisibility (const QString &name, bool vis) |
| Set the visibility of the given sublayer name. More...
|
|
virtual bool | setSubsetString (const QString &subset, bool updateFeatureCount=true) |
| Set the subset string used to create a subset of features in the layer. More...
|
|
virtual void | setTransformContext (const QgsCoordinateTransformContext &transformContext) |
| Sets data coordinate transform context to transformContext. More...
|
|
void | setUri (const QgsDataSourceUri &uri) |
| Set the data source specification. More...
|
|
virtual uint | subLayerCount () const |
| Returns the number of layers for the current data source. More...
|
|
virtual QStringList | subLayers () const |
| Sub-layers handled by this provider, in order from bottom to top. More...
|
|
virtual QStringList | subLayerStyles () const |
| Sub-layer styles for each sub-layer handled by this provider, in order from bottom to top. More...
|
|
virtual QString | subsetString () const |
| Returns the subset definition string (typically sql) currently in use by the layer and used by the provider to limit the feature set. More...
|
|
virtual bool | supportsSubsetString () const |
| Returns true if the provider supports setting of subset strings. More...
|
|
virtual QgsDataProviderTemporalCapabilities * | temporalCapabilities () |
| Returns the provider's temporal capabilities. More...
|
|
virtual const QgsDataProviderTemporalCapabilities * | temporalCapabilities () const |
| Returns the provider's temporal capabilities. More...
|
|
virtual QDateTime | timestamp () const |
| Time stamp of data source in the moment when data/metadata were loaded by provider. More...
|
|
QgsCoordinateTransformContext | transformContext () const |
| Returns data provider coordinate transform context. More...
|
|
virtual void | updateExtents () |
| Update the extents of the layer. More...
|
|
QgsDataSourceUri | uri () const |
| Gets the data source specification. More...
|
|
virtual bool | writeLayerMetadata (const QgsLayerMetadata &metadata) |
| Writes layer metadata to the underlying provider source. More...
|
|
virtual | ~QgsFeatureSink ()=default |
|
virtual bool | addFeature (QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) |
| Adds a single feature to the sink. More...
|
|
virtual bool | addFeatures (QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) |
| Adds all features from the specified iterator to the sink. More...
|
|
virtual bool | addFeatures (QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())=0 |
| Adds a list of features to the sink. More...
|
|
virtual bool | flushBuffer () |
| Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination. More...
|
|
virtual QString | lastError () const |
| Returns the most recent error encountered by the sink, e.g. More...
|
|
virtual | ~QgsFeatureSource ()=default |
|
virtual QgsFeatureIds | allFeatureIds () const |
| Returns a list of all feature IDs for features present in the source. More...
|
|
virtual long long | featureCount () const =0 |
| Returns the number of features contained in the source, or -1 if the feature count is unknown. More...
|
|
virtual QgsFields | fields () const =0 |
| Returns the fields associated with features in the source. More...
|
|
virtual QgsFeatureIterator | getFeatures (const QgsFeatureRequest &request=QgsFeatureRequest()) const =0 |
| Returns an iterator for the features in the source. More...
|
|
virtual FeatureAvailability | hasFeatures () const |
| Determines if there are any features available in the source. More...
|
|
virtual SpatialIndexPresence | hasSpatialIndex () const |
| Returns an enum value representing the presence of a valid spatial index on the source, if it can be determined. More...
|
|
QgsVectorLayer * | materialize (const QgsFeatureRequest &request, QgsFeedback *feedback=nullptr) |
| Materializes a request (query) made against this feature source, by running it over the source and returning a new memory based vector layer containing the result. More...
|
|
virtual QVariant | maximumValue (int fieldIndex) const |
| Returns the maximum value for an attribute column or an invalid variant in case of error. More...
|
|
virtual QVariant | minimumValue (int fieldIndex) const |
| Returns the minimum value for an attribute column or an invalid variant in case of error. More...
|
|
virtual QgsCoordinateReferenceSystem | sourceCrs () const =0 |
| Returns the coordinate reference system for features in the source. More...
|
|
virtual QgsRectangle | sourceExtent () const |
| Returns the extent of all geometries from the source. More...
|
|
virtual QString | sourceName () const =0 |
| Returns a friendly display name for the source. More...
|
|
virtual QSet< QVariant > | uniqueValues (int fieldIndex, int limit=-1) const |
| Returns the set of unique values contained within the specified fieldIndex from this source. More...
|
|
virtual QgsWkbTypes::Type | wkbType () const =0 |
| Returns the geometry type for features returned by this source. More...
|
|