QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QgsDataProvider Class Referenceabstract

Abstract base class for spatial data provider implementations. More...

#include <qgsdataprovider.h>

Inheritance diagram for QgsDataProvider:
Inheritance graph
[legend]

Classes

struct  PreviewContext
 Stores settings related to the context in which a preview job runs. More...
 
struct  ProviderOptions
 Setting options for creating vector data providers. More...
 

Public Types

enum  ProviderProperty { EvaluateDefaultValues , CustomData = 3000 }
 Properties are used to pass custom configuration options into data providers. More...
 

Signals

void dataChanged ()
 Emitted whenever a change is made to the data provider which may have caused changes in the provider's data OUTSIDE of QGIS.
 
void fullExtentCalculated ()
 Emitted whenever a deferred extent calculation is completed by the provider.
 
void notify (const QString &msg)
 Emitted when the datasource issues a notification.
 

Public Member Functions

 QgsDataProvider (const QString &uri=QString(), const QgsDataProvider::ProviderOptions &providerOptions=QgsDataProvider::ProviderOptions(), Qgis::DataProviderReadFlags flags=Qgis::DataProviderReadFlags())
 Create a new dataprovider with the specified in the uri.
 
virtual QgsCoordinateReferenceSystem crs () const =0
 Returns the coordinate system for the data source.
 
virtual QString dataComment () const
 Returns a short comment for the data that this provider is providing access to (e.g.
 
virtual QString dataSourceUri (bool expandAuthConfig=false) const
 Gets the data source specification.
 
virtual QDateTime dataTimestamp () const
 Current time stamp of data source.
 
virtual QString description () const =0
 Returns description.
 
virtual QgsDataProviderElevationPropertieselevationProperties ()
 Returns the provider's elevation properties.
 
virtual const QgsDataProviderElevationPropertieselevationProperties () const
 Returns the provider's elevation properties.
 
virtual bool enterUpdateMode ()
 Enter update mode.
 
virtual QgsError error () const
 Gets current status error.
 
virtual QgsRectangle extent () const =0
 Returns the extent of the layer.
 
virtual QgsBox3D extent3D () const
 Returns the 3D extent of the layer.
 
virtual QString fileRasterFilters () const
 Returns raster file filter string.
 
virtual QString fileVectorFilters () const
 Returns vector file filter string.
 
virtual Qgis::DataProviderFlags flags () const
 Returns the generic data provider flags.
 
virtual QString htmlMetadata () const
 Obtain a formatted HTML string containing assorted metadata for this data provider.
 
virtual void invalidateConnections (const QString &connection)
 Invalidate connections corresponding to specified name.
 
virtual bool isValid () const =0
 Returns true if this is a valid layer.
 
virtual QgsLayerMetadata layerMetadata () const
 Returns layer metadata collected from the provider's source.
 
virtual bool leaveUpdateMode ()
 Leave update mode.
 
virtual QString name () const =0
 Returns a provider name.
 
QVariant providerProperty (int property, const QVariant &defaultValue) const
 Gets the current value of a certain provider property.
 
QVariant providerProperty (ProviderProperty property, const QVariant &defaultValue=QVariant()) const
 Gets the current value of a certain provider property.
 
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.
 
virtual bool renderInPreview (const QgsDataProvider::PreviewContext &context)
 Returns whether the layer must be rendered in preview jobs.
 
virtual void setDataSourceUri (const QString &uri)
 Set the data source specification.
 
virtual void setLayerOrder (const QStringList &layers)
 Reorder the list of layer names to be rendered by this provider (in order from bottom to top)
 
virtual void setListening (bool isListening)
 Set whether the provider will listen to datasource notifications If set, the provider will issue notify signals.
 
void setProviderProperty (int property, const QVariant &value)
 Allows setting arbitrary properties on the provider.
 
void setProviderProperty (ProviderProperty property, const QVariant &value)
 Allows setting arbitrary properties on the provider.
 
virtual void setSubLayerVisibility (const QString &name, bool vis)
 Set the visibility of the given sublayer name.
 
virtual bool setSubsetString (const QString &subset, bool updateFeatureCount=true)
 Set the subset string used to create a subset of features in the layer.
 
virtual void setTransformContext (const QgsCoordinateTransformContext &transformContext)
 Sets data coordinate transform context to transformContext.
 
void setUri (const QgsDataSourceUri &uri)
 Set the data source specification.
 
void setUri (const QString &uri)
 Set the data source specification.
 
virtual Qgis::ProviderStyleStorageCapabilities styleStorageCapabilities () const
 Returns the style storage capabilities.
 
virtual uint subLayerCount () const
 Returns the number of layers for the current data source.
 
virtual QStringList subLayers () const
 Sub-layers handled by this provider, in order from bottom to top.
 
virtual QStringList subLayerStyles () const
 Sub-layer styles for each sub-layer handled by this provider, in order from bottom to top.
 
virtual QString subsetString () const
 Returns the subset definition string currently in use by the layer and used by the provider to limit the feature set.
 
virtual QString subsetStringDialect () const
 Returns a user-friendly string describing the dialect which is supported for subset strings by the provider.
 
virtual QString subsetStringHelpUrl () const
 Returns a URL pointing to documentation describing the dialect which is supported for subset strings by the provider.
 
virtual bool supportsSubsetString () const
 Returns true if the provider supports setting of subset strings.
 
virtual QgsDataProviderTemporalCapabilitiestemporalCapabilities ()
 Returns the provider's temporal capabilities.
 
virtual const QgsDataProviderTemporalCapabilitiestemporalCapabilities () const
 Returns the provider's temporal capabilities.
 
virtual QDateTime timestamp () const
 Time stamp of data source in the moment when data/metadata were loaded by provider.
 
QgsCoordinateTransformContext transformContext () const
 Returns data provider coordinate transform context.
 
virtual void updateExtents ()
 Update the extents of the layer.
 
QgsDataSourceUri uri () const
 Gets the data source specification.
 
virtual bool writeLayerMetadata (const QgsLayerMetadata &metadata)
 Writes layer metadata to the underlying provider source.
 

Static Public Member Functions

static QString sublayerSeparator ()
 String sequence used for separating components of sublayers strings.
 

Protected Member Functions

void appendError (const QgsErrorMessage &message)
 Add error message.
 
void setError (const QgsError &error)
 Sets error message.
 

Protected Attributes

QgsError mError
 Error.
 
Qgis::DataProviderReadFlags mReadFlags
 Read flags. It's up to the subclass to respect these when needed.
 
QDateTime mTimestamp
 Timestamp of data in the moment when the data were loaded by provider.
 

Friends

class TestQgsProject
 

Detailed Description

Abstract base class for spatial data provider implementations.

Definition at line 41 of file qgsdataprovider.h.

Member Enumeration Documentation

◆ ProviderProperty

Properties are used to pass custom configuration options into data providers.

This enum defines a list of custom properties which can be used on different providers. It depends on the provider, which properties are supported. In addition to these default properties, providers can add their custom properties starting from CustomData.

Enumerator
EvaluateDefaultValues 

Evaluate default values on provider side when calling QgsVectorDataProvider::defaultValue( int index ) rather than on commit.

CustomData 

Custom properties for 3rd party providers or very provider-specific properties which are not expected to be of interest for other providers can be added starting from this value up.

Definition at line 79 of file qgsdataprovider.h.

Constructor & Destructor Documentation

◆ QgsDataProvider()

QgsDataProvider::QgsDataProvider ( const QString &  uri = QString(),
const QgsDataProvider::ProviderOptions providerOptions = QgsDataProvider::ProviderOptions(),
Qgis::DataProviderReadFlags  flags = Qgis::DataProviderReadFlags() 
)

Create a new dataprovider with the specified in the uri.

Additional creation options are specified within the options value and since QGIS 3.16 creation flags are specified within the flags value.

Definition at line 23 of file qgsdataprovider.cpp.

Member Function Documentation

◆ appendError()

void QgsDataProvider::appendError ( const QgsErrorMessage message)
inlineprotected

Add error message.

Definition at line 696 of file qgsdataprovider.h.

◆ crs()

virtual QgsCoordinateReferenceSystem QgsDataProvider::crs ( ) const
pure virtual

Returns the coordinate system for the data source.

If the provider isn't capable of returning its projection then an invalid QgsCoordinateReferenceSystem will be returned.

◆ dataChanged

void QgsDataProvider::dataChanged ( )
signal

Emitted whenever a change is made to the data provider which may have caused changes in the provider's data OUTSIDE of QGIS.

When emitted from a QgsVectorDataProvider, any cached information such as feature ids should be invalidated.

Warning
This signal is NOT emitted when changes are made to a provider from INSIDE QGIS – e.g. when adding features to a vector layer, deleting features or modifying existing features. Instead, the specific QgsVectorLayer signals should be used to detect these operations.

◆ dataComment()

virtual QString QgsDataProvider::dataComment ( ) const
inlinevirtual

Returns a short comment for the data that this provider is providing access to (e.g.

the comment for postgres table).

Note
The default implementation returns an empty string.
Since
QGIS 3.14

Reimplemented in QgsVectorDataProvider.

Definition at line 157 of file qgsdataprovider.h.

◆ dataSourceUri()

virtual QString QgsDataProvider::dataSourceUri ( bool  expandAuthConfig = false) const
inlinevirtual

Gets the data source specification.

This may be a path or database connection string

Parameters
expandAuthConfigWhether to expand any assigned authentication configuration
Returns
data source specification
Note
The default authentication configuration expansion is false. This keeps credentials out of layer data source URIs and project files. Expansion should be specifically done only when needed within a provider

Definition at line 137 of file qgsdataprovider.h.

◆ dataTimestamp()

virtual QDateTime QgsDataProvider::dataTimestamp ( ) const
inlinevirtual

Current time stamp of data source.

Reimplemented in QgsRasterDataProvider.

Definition at line 475 of file qgsdataprovider.h.

◆ description()

virtual QString QgsDataProvider::description ( ) const
pure virtual

Returns description.

Returns a terse string describing what the provider is.

◆ elevationProperties() [1/2]

QgsDataProviderElevationProperties * QgsDataProvider::elevationProperties ( )
virtual

Returns the provider's elevation properties.

This may be nullptr, depending on the data provider.

Since
QGIS 3.32

Reimplemented in QgsRasterDataProvider, and QgsVectorDataProvider.

Definition at line 59 of file qgsdataprovider.cpp.

◆ elevationProperties() [2/2]

const QgsDataProviderElevationProperties * QgsDataProvider::elevationProperties ( ) const
virtual

Returns the provider's elevation properties.

This may be nullptr, depending on the data provider.

Since
QGIS 3.32

Reimplemented in QgsRasterDataProvider, and QgsVectorDataProvider.

Definition at line 66 of file qgsdataprovider.cpp.

◆ enterUpdateMode()

virtual bool QgsDataProvider::enterUpdateMode ( )
inlinevirtual

Enter update mode.

This is aimed at providers that can open differently the connection to the datasource, according it to be in update mode or in read-only mode. A call to this method shall be balanced with a call to leaveUpdateMode(), if this method returns true.

Most providers will have an empty implementation for that method.

For backward compatibility, providers that implement enterUpdateMode() should still make sure to allow editing operations to work even if enterUpdateMode() is not explicitly called.

Several successive calls to enterUpdateMode() can be done. So there is a concept of stack of calls that must be handled by the provider. Only the first call to enterUpdateMode() will really turn update mode on.

Returns
true in case of success (or no-op implementation), false in case of failure.

Definition at line 510 of file qgsdataprovider.h.

◆ error()

virtual QgsError QgsDataProvider::error ( ) const
inlinevirtual

Gets current status error.

This error describes some principal problem for which provider cannot work and thus is not valid. It is not last error after accessing data by block(), identify() etc.

Definition at line 482 of file qgsdataprovider.h.

◆ extent()

virtual QgsRectangle QgsDataProvider::extent ( ) const
pure virtual

Returns the extent of the layer.

Warning
This may be expensive to calculate for some data providers, as it may involve additional network requests or in some cases, iterating through all the features in a layer. If the provider returns the Qgis::DataProviderFlag::FastExtent2D flag from the flags() method then the call to extent() is guaranteed to ALWAYS be fast and not involve any additional work.

Implemented in QgsVectorTileDataProvider, and QgsRasterDataProvider.

◆ extent3D()

virtual QgsBox3D QgsDataProvider::extent3D ( ) const
inlinevirtual

Returns the 3D extent of the layer.

Warning
This may be expensive to calculate for some data providers, as it may involve additional network requests or in some cases, iterating through all the features in a layer. If the provider returns the Qgis::DataProviderFlag::FastExtent3D flag from the flags() method then the call to extent3D() is guaranteed to ALWAYS be fast and not involve any additional work.
Since
QGIS 3.36

Definition at line 257 of file qgsdataprovider.h.

◆ fileRasterFilters()

virtual QString QgsDataProvider::fileRasterFilters ( ) const
inlinevirtual

Returns raster file filter string.

Returns a string suitable for a QFileDialog of raster file formats supported by the data provider. Naturally this will be an empty string for those data providers that do not deal with plain files, such as databases and servers.

Definition at line 455 of file qgsdataprovider.h.

◆ fileVectorFilters()

virtual QString QgsDataProvider::fileVectorFilters ( ) const
inlinevirtual

Returns vector file filter string.

Returns a string suitable for a QFileDialog of vector file formats supported by the data provider. Naturally this will be an empty string for those data providers that do not deal with plain files, such as databases and servers.

Definition at line 441 of file qgsdataprovider.h.

◆ flags()

Qgis::DataProviderFlags QgsDataProvider::flags ( ) const
virtual

Returns the generic data provider flags.

Since
QGIS 3.26

Definition at line 38 of file qgsdataprovider.cpp.

◆ fullExtentCalculated

void QgsDataProvider::fullExtentCalculated ( )
signal

Emitted whenever a deferred extent calculation is completed by the provider.

Layers should connect to this signal and update their cached extents whenever it is emitted.

◆ htmlMetadata()

QString QgsDataProvider::htmlMetadata ( ) const
virtual

Obtain a formatted HTML string containing assorted metadata for this data provider.

Since
QGIS 3.36

Definition at line 31 of file qgsdataprovider.cpp.

◆ invalidateConnections()

virtual void QgsDataProvider::invalidateConnections ( const QString &  connection)
inlinevirtual

Invalidate connections corresponding to specified name.

Definition at line 487 of file qgsdataprovider.h.

◆ isValid()

virtual bool QgsDataProvider::isValid ( ) const
pure virtual

Returns true if this is a valid layer.

It is up to individual providers to determine what constitutes a valid layer.

◆ layerMetadata()

virtual QgsLayerMetadata QgsDataProvider::layerMetadata ( ) const
inlinevirtual

Returns layer metadata collected from the provider's source.

Individual data providers must implement this method if they support collecting metadata.

See also
writeLayerMetadata()

Definition at line 605 of file qgsdataprovider.h.

◆ leaveUpdateMode()

virtual bool QgsDataProvider::leaveUpdateMode ( )
inlinevirtual

Leave update mode.

This is aimed at providers that can open differently the connection to the datasource, according it to be in update mode or in read-only mode. This method shall be balanced with a successful call to enterUpdateMode().

Most providers will have an empty implementation for that method.

Several successive calls to enterUpdateMode() can be done. So there is a concept of stack of calls that must be handled by the provider. Only the last call to leaveUpdateMode() will really turn update mode off.

Returns
true in case of success (or no-op implementation), false in case of failure.

Definition at line 528 of file qgsdataprovider.h.

◆ name()

virtual QString QgsDataProvider::name ( ) const
pure virtual

Returns a provider name.

Essentially just returns the provider key. Should be used to build file dialogs so that providers can be shown with their supported types. Thus if more than one provider supports a given format, the user is able to select a specific provider to open that file.

◆ notify

void QgsDataProvider::notify ( const QString &  msg)
signal

Emitted when the datasource issues a notification.

See also
setListening

◆ providerProperty() [1/2]

QVariant QgsDataProvider::providerProperty ( int  property,
const QVariant &  defaultValue = QVariant() 
) const

Gets the current value of a certain provider property.

It depends on the provider which properties are supported.

Definition at line 131 of file qgsdataprovider.cpp.

◆ providerProperty() [2/2]

QVariant QgsDataProvider::providerProperty ( QgsDataProvider::ProviderProperty  property,
const QVariant &  defaultValue = QVariant() 
) const

Gets the current value of a certain provider property.

It depends on the provider which properties are supported.

Definition at line 124 of file qgsdataprovider.cpp.

◆ reloadData()

void QgsDataProvider::reloadData ( )
virtual

Reloads the data from the source for providers with data caches to synchronize, changes in the data source, feature counts and other specific actions.

Emits the dataChanged signal

Note
only available for providers which implement the reloadProviderData() method.

Definition at line 101 of file qgsdataprovider.cpp.

◆ renderInPreview()

bool QgsDataProvider::renderInPreview ( const QgsDataProvider::PreviewContext context)
virtual

Returns whether the layer must be rendered in preview jobs.

The context argument gives useful information which can be used to determine whether the layer should be rendered or not.

The base implementation returns true if lastRenderingTimeMs <= maxRenderingTimeMs.

Note
not available in Python bindings

Reimplemented in QgsVectorTileDataProvider.

Definition at line 145 of file qgsdataprovider.cpp.

◆ setDataSourceUri()

virtual void QgsDataProvider::setDataSourceUri ( const QString &  uri)
inlinevirtual

Set the data source specification.

This may be a path or database connection string

Parameters
urisource specification

Definition at line 123 of file qgsdataprovider.h.

◆ setError()

void QgsDataProvider::setError ( const QgsError error)
inlineprotected

Sets error message.

Definition at line 699 of file qgsdataprovider.h.

◆ setLayerOrder()

virtual void QgsDataProvider::setLayerOrder ( const QStringList &  layers)
inlinevirtual

Reorder the list of layer names to be rendered by this provider (in order from bottom to top)

Note
layers must have been previously added.

Definition at line 385 of file qgsdataprovider.h.

◆ setListening()

void QgsDataProvider::setListening ( bool  isListening)
virtual

Set whether the provider will listen to datasource notifications If set, the provider will issue notify signals.

The default implementation does nothing.

See also
notify

Definition at line 138 of file qgsdataprovider.cpp.

◆ setProviderProperty() [1/2]

void QgsDataProvider::setProviderProperty ( int  property,
const QVariant &  value 
)

Allows setting arbitrary properties on the provider.

It depends on the provider which properties are supported.

Definition at line 117 of file qgsdataprovider.cpp.

◆ setProviderProperty() [2/2]

void QgsDataProvider::setProviderProperty ( QgsDataProvider::ProviderProperty  property,
const QVariant &  value 
)

Allows setting arbitrary properties on the provider.

It depends on the provider which properties are supported.

Definition at line 110 of file qgsdataprovider.cpp.

◆ setSubLayerVisibility()

virtual void QgsDataProvider::setSubLayerVisibility ( const QString &  name,
bool  vis 
)
inlinevirtual

Set the visibility of the given sublayer name.

Definition at line 399 of file qgsdataprovider.h.

◆ setSubsetString()

bool QgsDataProvider::setSubsetString ( const QString &  subset,
bool  updateFeatureCount = true 
)
virtual

Set the subset string used to create a subset of features in the layer.

This may be a SQL where clause, or any other string that can be used by the data provider to create a subset. See subsetStringDialect() and subsetStringHelpUrl() for additional metadata on the dialect supported by the subset string.

Must be implemented in the data provider.

See also
subsetString()
subsetStringDialect()
subsetStringHelpUrl()
supportsSubsetString()

Reimplemented in QgsPointCloudDataProvider.

Definition at line 83 of file qgsdataprovider.cpp.

◆ setTransformContext()

void QgsDataProvider::setTransformContext ( const QgsCoordinateTransformContext transformContext)
virtual

Sets data coordinate transform context to transformContext.

The default implementation is a simple setter, subclasses may override to perform additional actions required by a change of coordinate transform context.

See also
transformContext()
Note
not available in Python bindings
Since
QGIS 3.8

Definition at line 160 of file qgsdataprovider.cpp.

◆ setUri() [1/2]

void QgsDataProvider::setUri ( const QgsDataSourceUri uri)
inline

Set the data source specification.

Definition at line 170 of file qgsdataprovider.h.

◆ setUri() [2/2]

void QgsDataProvider::setUri ( const QString &  uri)
inline

Set the data source specification.

Since
QGIS 3.38

Definition at line 180 of file qgsdataprovider.h.

◆ styleStorageCapabilities()

Qgis::ProviderStyleStorageCapabilities QgsDataProvider::styleStorageCapabilities ( ) const
virtual

Returns the style storage capabilities.

Since
QGIS 3.34

Definition at line 173 of file qgsdataprovider.cpp.

◆ subLayerCount()

virtual uint QgsDataProvider::subLayerCount ( ) const
inlinevirtual

Returns the number of layers for the current data source.

Definition at line 374 of file qgsdataprovider.h.

◆ subLayers()

virtual QStringList QgsDataProvider::subLayers ( ) const
inlinevirtual

Sub-layers handled by this provider, in order from bottom to top.

Sub-layers are used when the provider's source can combine layers it knows about in some way before it hands them off to the provider.

See also
SUBLAYER_SEPARATOR

Reimplemented in QgsRasterDataProvider.

Definition at line 353 of file qgsdataprovider.h.

◆ sublayerSeparator()

QString QgsDataProvider::sublayerSeparator ( )
static

String sequence used for separating components of sublayers strings.

Note
Replaces the static const SUBLAYER_SEPARATOR
See also
subLayers()
Since
QGIS 3.12

Definition at line 168 of file qgsdataprovider.cpp.

◆ subLayerStyles()

virtual QStringList QgsDataProvider::subLayerStyles ( ) const
inlinevirtual

Sub-layer styles for each sub-layer handled by this provider, in order from bottom to top.

Sub-layer styles are used to abstract the way the provider's source can symbolise layers in some way at the server, before it serves them to the provider.

Definition at line 365 of file qgsdataprovider.h.

◆ subsetString()

QString QgsDataProvider::subsetString ( ) const
virtual

Returns the subset definition string currently in use by the layer and used by the provider to limit the feature set.

This may be a SQL where clause, or any other string that can be used by the data provider to create a subset. See subsetStringDialect() and subsetStringHelpUrl() for additional metadata on the dialect supported by the subset string.

Must be overridden in the data provider, otherwise returns an empty string.

See also
setSubsetString()
subsetStringDialect()
subsetStringHelpUrl()
supportsSubsetString()

Reimplemented in QgsPointCloudDataProvider.

Definition at line 96 of file qgsdataprovider.cpp.

◆ subsetStringDialect()

QString QgsDataProvider::subsetStringDialect ( ) const
virtual

Returns a user-friendly string describing the dialect which is supported for subset strings by the provider.

See also
subsetStringHelpUrl()
supportsSubsetString()
setSubsetString()
subsetString()
Since
QGIS 3.40

Reimplemented in QgsPointCloudDataProvider.

Definition at line 73 of file qgsdataprovider.cpp.

◆ subsetStringHelpUrl()

QString QgsDataProvider::subsetStringHelpUrl ( ) const
virtual

Returns a URL pointing to documentation describing the dialect which is supported for subset strings by the provider.

See also
subsetStringDialect()
supportsSubsetString()
setSubsetString()
subsetString()
Since
QGIS 3.40

Reimplemented in QgsPointCloudDataProvider.

Definition at line 78 of file qgsdataprovider.cpp.

◆ supportsSubsetString()

bool QgsDataProvider::supportsSubsetString ( ) const
virtual

Returns true if the provider supports setting of subset strings.

See also
subsetString()
setSubsetString()

Reimplemented in QgsPointCloudDataProvider.

Definition at line 91 of file qgsdataprovider.cpp.

◆ temporalCapabilities() [1/2]

QgsDataProviderTemporalCapabilities * QgsDataProvider::temporalCapabilities ( )
virtual

Returns the provider's temporal capabilities.

This may be nullptr, depending on the data provider.

Since
QGIS 3.14

Reimplemented in QgsMeshDataProvider, QgsRasterDataProvider, and QgsVectorDataProvider.

Definition at line 45 of file qgsdataprovider.cpp.

◆ temporalCapabilities() [2/2]

const QgsDataProviderTemporalCapabilities * QgsDataProvider::temporalCapabilities ( ) const
virtual

Returns the provider's temporal capabilities.

This may be nullptr, depending on the data provider.

Since
QGIS 3.14

Reimplemented in QgsMeshDataProvider, QgsRasterDataProvider, and QgsVectorDataProvider.

Definition at line 52 of file qgsdataprovider.cpp.

◆ timestamp()

virtual QDateTime QgsDataProvider::timestamp ( ) const
inlinevirtual

Time stamp of data source in the moment when data/metadata were loaded by provider.

Reimplemented in QgsRasterDataProvider.

Definition at line 472 of file qgsdataprovider.h.

◆ transformContext()

QgsCoordinateTransformContext QgsDataProvider::transformContext ( ) const

Returns data provider coordinate transform context.

See also
setTransformContext()
Note
not available in Python bindings
Since
QGIS 3.8

Definition at line 152 of file qgsdataprovider.cpp.

◆ updateExtents()

virtual void QgsDataProvider::updateExtents ( )
inlinevirtual

Update the extents of the layer.

Not implemented by default.

Definition at line 271 of file qgsdataprovider.h.

◆ uri()

QgsDataSourceUri QgsDataProvider::uri ( ) const
inline

Gets the data source specification.

Definition at line 189 of file qgsdataprovider.h.

◆ writeLayerMetadata()

virtual bool QgsDataProvider::writeLayerMetadata ( const QgsLayerMetadata metadata)
inlinevirtual

Writes layer metadata to the underlying provider source.

Support depends on individual provider capabilities.

Returns true if metadata was successfully written to the data provider.

See also
layerMetadata()

Definition at line 614 of file qgsdataprovider.h.

Friends And Related Symbol Documentation

◆ TestQgsProject

friend class TestQgsProject
friend

Definition at line 727 of file qgsdataprovider.h.

Member Data Documentation

◆ mError

QgsError QgsDataProvider::mError
protected

Error.

Definition at line 693 of file qgsdataprovider.h.

◆ mReadFlags

Qgis::DataProviderReadFlags QgsDataProvider::mReadFlags
protected

Read flags. It's up to the subclass to respect these when needed.

Definition at line 702 of file qgsdataprovider.h.

◆ mTimestamp

QDateTime QgsDataProvider::mTimestamp
protected

Timestamp of data in the moment when the data were loaded by provider.

Definition at line 690 of file qgsdataprovider.h.


The documentation for this class was generated from the following files: