16#ifndef QQGSDATAPROVIDER_H 
   17#define QQGSDATAPROVIDER_H 
   45    if ( qobject_cast<QgsVectorDataProvider *>( sipCpp ) )
 
   47      sipType = sipType_QgsVectorDataProvider;
 
   49    else if ( qobject_cast<QgsRasterDataProvider *>( sipCpp ) )
 
   51      sipType = sipType_QgsRasterDataProvider;
 
   53    else if ( qobject_cast<QgsMeshDataProvider *>( sipCpp ) )
 
   55      sipType = sipType_QgsMeshDataProvider;
 
   57    else if ( qobject_cast<QgsPointCloudDataProvider *>( sipCpp ) )
 
   59      sipType = sipType_QgsPointCloudDataProvider;
 
   78      NoDataCapabilities  = 0,
 
   84    Q_DECLARE_FLAGS( DataCapabilities, DataCapability )
 
  123      FlagTrustDataSource = 1 << 0, 
 
  124      SkipFeatureCount = 1 << 1, 
 
  125      FlagLoadDefaultStyle = 1 << 2, 
 
  126      SkipGetExtent = 1 << 3, 
 
  127      SkipFullScan = 1 << 4, 
 
  128      ForceReadOnly = 1 << 5, 
 
  130    Q_DECLARE_FLAGS( ReadFlags, ReadFlag )
 
  139                     QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
 
  155      mDataSourceURI = uri;
 
  169      if ( expandAuthConfig && mDataSourceURI.contains( QLatin1String( 
"authcfg" ) ) )
 
  172        return uri.
uri( expandAuthConfig );
 
  176        return mDataSourceURI;
 
  197      mDataSourceURI = uri.
uri( 
true );
 
  215    virtual Qgis::DataProviderFlags flags() 
const;
 
  246    virtual 
bool isValid() const = 0;
 
  251    virtual 
void updateExtents()
 
  267      Q_UNUSED( updateFeatureCount )
 
  299      return QStringList();  
 
  311      return QStringList();  
 
  332      if ( layers.count() < 1 )
 
  346      if ( name.isEmpty() || !vis )
 
  369    virtual QString 
name() 
const = 0;
 
  427    virtual void reloadData();
 
  430    virtual QDateTime 
timestamp()
 const { 
return mTimestamp; }
 
  497    void setProviderProperty( ProviderProperty property, 
const QVariant &value );
 
  505    void setProviderProperty( 
int property, 
const QVariant &value ); 
 
  513    QVariant providerProperty( ProviderProperty property, 
const QVariant &defaultValue = QVariant() ) 
const;
 
  521    QVariant providerProperty( 
int property, 
const QVariant &defaultValue ) 
const; 
 
  533    virtual void setListening( 
bool isListening );
 
  545      double lastRenderingTimeMs = -1;
 
  548      double maxRenderingTimeMs = MAXIMUM_LAYER_PREVIEW_TIME_MS;
 
  613    static QString sublayerSeparator();
 
  623    void fullExtentCalculated();
 
  646    void notify( const QString &msg );
 
  654    QDateTime mTimestamp;
 
  666    QgsDataProvider::ReadFlags mReadFlags = QgsDataProvider::ReadFlags();
 
  674    QString mDataSourceURI;
 
  678    QMap< int, QVariant > mProviderProperties;
 
  683    mutable QMutex mOptionsMutex;
 
  689    virtual void reloadProviderData() {}
 
This class represents a coordinate reference system (CRS).
 
Contains information about the context in which a coordinate transform is executed.
 
Base class for handling properties relating to a data provider's temporal capabilities.
 
Abstract base class for spatial data provider implementations.
 
virtual void invalidateConnections(const QString &connection)
Invalidate connections corresponding to specified name.
 
virtual bool leaveUpdateMode()
Leave update mode.
 
void setUri(const QgsDataSourceUri &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)
 
ReadFlag
Flags which control dataprovider construction.
 
virtual QString name() const =0
Returns a provider name.
 
void setError(const QgsError &error)
Sets error message.
 
virtual QDateTime timestamp() const
Time stamp of data source in the moment when data/metadata were loaded by provider.
 
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....
 
ProviderProperty
Properties are used to pass custom configuration options into data providers.
 
@ EvaluateDefaultValues
Evaluate default values on provider side when calling QgsVectorDataProvider::defaultValue( int index ...
 
virtual QString subsetString() const
Returns the subset definition string (typically sql) currently in use by the layer and used by the pr...
 
virtual QgsLayerMetadata layerMetadata() const
Returns layer metadata collected from the provider's source.
 
virtual void setDataSourceUri(const QString &uri)
Set the data source specification.
 
virtual QString fileRasterFilters() const
Returns raster file filter string.
 
virtual QgsError error() const
Gets current status error.
 
DataCapability
Used in browser model to understand which items for which providers should be populated.
 
virtual QDateTime dataTimestamp() const
Current time stamp of data source.
 
virtual bool supportsSubsetString() const
Returns true if the provider supports setting of subset strings.
 
virtual QString dataSourceUri(bool expandAuthConfig=false) const
Gets the data source specification.
 
virtual QString description() const =0
Returns description.
 
QgsDataSourceUri uri() const
Gets the data source specification.
 
virtual QString fileVectorFilters() const
Returns vector file filter string.
 
virtual QStringList subLayerStyles() const
Sub-layer styles for each sub-layer handled by this provider, in order from bottom to top.
 
virtual bool setSubsetString(const QString &subset, bool updateFeatureCount=true)
Set the subset string used to create a subset of features in the layer.
 
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 bool writeLayerMetadata(const QgsLayerMetadata &metadata)
Writes layer metadata to the underlying provider source.
 
virtual bool enterUpdateMode()
Enter update mode.
 
virtual void setSubLayerVisibility(const QString &name, bool vis)
Set the visibility of the given sublayer name.
 
Class for storing the component parts of a RDBMS data source URI (e.g.
 
QString uri(bool expandAuthConfig=true) const
Returns the complete URI as a string.
 
QgsErrorMessage represents single error message.
 
QgsError is container for error messages (report).
 
void append(const QString &message, const QString &tag)
Append new error message.
 
A rectangle specified with double values.
 
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
 
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
 
Stores settings related to the context in which a preview job runs.
 
Setting options for creating vector data providers.
 
QgsCoordinateTransformContext transformContext
Coordinate transform context.