16 #ifndef QQGSDATAPROVIDER_H
17 #define QQGSDATAPROVIDER_H
22 #include <QStringList>
54 NoDataCapabilities = 0,
62 : mDataSourceURI( uri )
96 return mDataSourceURI;
111 virtual bool isValid() = 0;
133 Q_UNUSED( updateFeatureCount );
152 return QString::null;
164 return QStringList();
177 return QStringList();
198 if ( layers.count() < 1 )
212 if ( name.isEmpty() || !vis )
234 virtual QString name()
const = 0;
248 virtual QString description()
const = 0;
289 virtual QDateTime
timestamp()
const {
return mTimestamp; }
307 void fullExtentCalculated();
321 void dataChanged(
int changed );
virtual uint subLayerCount() const
return the number of layers for the current data source
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...
A rectangle specified with double values.
virtual void updateExtents()
Update the extents of the layer.
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.
Abstract base class for spatial data provider implementations.
void setError(const QgsError &theError)
Set error message.
virtual QString fileVectorFilters() const
return vector file filter string
virtual QDateTime dataTimestamp() const
Current time stamp of data source.
virtual QStringList subLayers() const
Sub-layers handled by this provider, in order from bottom to top.
QgsDataProvider(QString const &uri="")
virtual bool setSubsetString(QString subset, bool updateFeatureCount=true)
Set the subset string used to create a subset of features in the layer.
virtual QDateTime timestamp() const
Time stamp of data source in the moment when data/metadata were loaded by provider.
virtual void setLayerOrder(const QStringList &layers)
Reorder the list of layer names to be rendered by this provider (in order from bottom to top) ...
QgsErrorMessage represents single error message.
virtual void setDataSourceUri(const QString &uri)
Set the data source specification.
virtual QStringList subLayerStyles() const
Sub-layer styles for each sub-layer handled by this provider, in order from bottom to top...
QgsError is container for error messages (report).
virtual void reloadData()
Reloads the data from the source.
Class for storing a coordinate reference system (CRS)
QString mDataSourceURI
Universal Resource Identifier for source data.
void appendError(const QgsErrorMessage &theMessage)
Add error message.
virtual ~QgsDataProvider()
We need this so the subclass destructors get called.
virtual QgsError error() const
Get current status error.
virtual QString dataSourceUri() const
Get the data source specification.