16 #ifndef QQGSDATAPROVIDER_H 17 #define QQGSDATAPROVIDER_H 22 #include <QStringList> 57 NoDataCapabilities = 0,
78 : mDataSourceURI( uri )
102 mDataSourceURI = uri;
116 if ( expandAuthConfig && mDataSourceURI.contains(
"authcfg" ) )
119 return uri.
uri( expandAuthConfig );
123 return mDataSourceURI;
139 virtual bool isValid() = 0;
161 Q_UNUSED( updateFeatureCount );
177 return QString::null;
223 if ( layers.
count() < 1 )
273 virtual QString description()
const = 0;
382 void setProviderProperty(
int property,
const QVariant& value );
398 QVariant providerProperty(
int property ,
const QVariant& defaultValue )
const;
407 void fullExtentCalculated();
422 void dataChanged(
int changed );
virtual void setSubLayerVisibility(const QString &name, bool vis)
Set the visibility of the given sublayer name.
virtual QString subsetString()
Returns the subset definition string (typically sql) currently in use by the layer and used by the pr...
virtual bool setSubsetString(const QString &subset, bool updateFeatureCount=true)
Set the subset string used to create a subset of features in the layer.
A rectangle specified with double values.
virtual void updateExtents()
Update the extents of the layer.
virtual QgsError error() const
Get current status error.
virtual QString fileRasterFilters() const
Return raster file filter string.
virtual bool supportsSubsetString()
Provider supports setting of subset strings.
QDateTime mTimestamp
Timestamp of data in the moment when the data were loaded by provider.
virtual QStringList subLayers() const
Sub-layers handled by this provider, in order from bottom to top.
virtual uint subLayerCount() const
return the number of layers for the current data source
Abstract base class for spatial data provider implementations.
void setError(const QgsError &theError)
Set error message.
const char * name() const
int count(const T &value) const
QgsDataProvider(QString const &uri="")
virtual QDateTime dataTimestamp() const
Current time stamp of data source.
virtual QString dataSourceUri(bool expandAuthConfig=false) const
Get 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) ...
QString uri(bool expandAuthConfig=true) const
return complete uri
QgsErrorMessage represents single error message.
virtual void setDataSourceUri(const QString &uri)
Set the data source specification.
Class for storing the component parts of a PostgreSQL/RDBMS datasource URI.
virtual QDateTime timestamp() const
Time stamp of data source in the moment when data/metadata were loaded by provider.
QgsError is container for error messages (report).
void append(const QString &theMessage, const QString &theTag)
Append new error message.
virtual QString fileVectorFilters() const
Return vector file filter string.
virtual void reloadData()
Reloads the data from the source.
Class for storing a coordinate reference system (CRS)
virtual bool enterUpdateMode()
Enter update mode.
void appendError(const QgsErrorMessage &theMessage)
Add error message.
virtual QStringList subLayerStyles() const
Sub-layer styles for each sub-layer handled by this provider, in order from bottom to top...
virtual void invalidateConnections(const QString &connection)
Invalidate connections corresponding to specified name.
virtual ~QgsDataProvider()
We need this so the subclass destructors get called.
ProviderProperty
Properties are used to pass custom configuration options into data providers.
Evaluate default values on provider side when calling QgsVectorDataProvider::defaultValue( int index ...
virtual bool leaveUpdateMode()
Leave update mode.