17 #ifndef QGSVIRTUALLAYERDEFINITION_H 18 #define QGSVIRTUALLAYERDEFINITION_H 43 : mName( name ), mSource( source ), mProvider( provider ), mEncoding( encoding ) {}
144 bool hasSourceLayer(
const QString& name )
const;
147 bool hasReferencedLayers()
const;
156 SourceLayers mSourceLayers;
QString geometryField() const
Get the name of the geometry field. Empty if no geometry field.
void setFields(const QgsFields &fields)
Set field definitions.
QString query() const
Get the SQL query.
SourceLayer(const QString &name, const QString &source, const QString &provider, const QString &encoding)
Constructor variant to build a layer with a provider and a source.
Container of fields for a vector layer.
QString source() const
The source url used by the provider to build the layer.
void setFilePath(const QString &filePath)
Set the file path.
const QgsFields & fields() const
Get field definitions.
QString uid() const
Get the name of the field with unique identifiers.
void setQuery(const QString &query)
Set the SQL query.
void setGeometryField(const QString &geometryField)
Set the name of the geometry field.
void setGeometryWkbType(QgsWKBTypes::Type t)
Set the type of the geometry.
const SourceLayers & sourceLayers() const
Get access to the source layers.
bool hasDefinedGeometry() const
Convenient method to test if the geometry is defined (not NoGeometry and not Unknown) ...
QString provider() const
Provider key.
QString name() const
Name of the layer.
SourceLayer(const QString &name, const QString &ref)
Constructor variant to build a live layer reference.
void setUid(const QString &uid)
Set the name of the field with unique identifiers.
QgsWKBTypes::Type geometryWkbType() const
Get the type of the geometry QgsWKBTypes::NoGeometry to hide any geometry QgsWKBTypes::Unknown for un...
void setGeometrySrid(long srid)
Set the SRID of the geometry.
QList< SourceLayer > SourceLayers
List of source layers.
bool isReferenced() const
Is it a live layer or not ?
long geometrySrid() const
Get the SRID of the geometry.
QString reference() const
The reference (id) of the live layer.
QString filePath() const
Get the file path. May be empty.
QString encoding() const
Optional encoding for the provider.
A SourceLayer is either a reference to a live layer in the registry or all the parameters needed to l...
Class to manipulate the definition of a virtual layer.