QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Classes | Public Member Functions | List of all members
QgsProviderSublayerDetails Class Reference

Contains details about a sub layer available from a dataset. More...

#include <qgsprovidersublayerdetails.h>

Classes

struct  LayerOptions
 Setting options for loading layers. More...
 

Public Member Functions

QString description () const
 Returns the layer's description. More...
 
QString driverName () const
 Returns the layer's driver name. More...
 
long long featureCount () const
 Returns the layer's feature count. More...
 
Qgis::SublayerFlags flags () const
 Returns the layer's flags, which indicate properties of the layer. More...
 
QString geometryColumnName () const
 Returns the layer's geometry column name, or an empty string if not applicable. More...
 
int layerNumber () const
 Returns the associated layer number, for providers which order sublayers. More...
 
QString name () const
 Returns the layer's name. More...
 
bool operator!= (const QgsProviderSublayerDetails &other) const
 
bool operator== (const QgsProviderSublayerDetails &other) const
 
QStringList path () const
 Returns the path to the sublayer. More...
 
QString providerKey () const
 Returns the associated data provider key. More...
 
void setDescription (const QString &description)
 Sets the layer's description. More...
 
void setDriverName (const QString &driver)
 Sets the layer's driver name. More...
 
void setFeatureCount (long long count)
 Sets the layer's feature count. More...
 
void setFlags (Qgis::SublayerFlags newFlags)
 Sets the layer's flags, which indicate properties of the layer. More...
 
void setGeometryColumnName (const QString &name)
 Sets the layer's geometry column name. More...
 
void setLayerNumber (int number)
 Sets the associated layer number, for providers which order sublayers. More...
 
void setName (const QString &name)
 Sets the layer's name. More...
 
void setPath (const QStringList &path)
 Sets the path to the sublayer. More...
 
void setProviderKey (const QString &key)
 Sets the associated data provider key. More...
 
void setSkippedContainerScan (bool skipped)
 Set to true if the layer is a potential dataset container and an in-depth scan of its contents was skipped. More...
 
void setType (Qgis::LayerType type)
 Sets the layer type. More...
 
void setUri (const QString &uri)
 Sets the layer's uri. More...
 
void setWkbType (Qgis::WkbType type)
 Set the layer's WKB type. More...
 
bool skippedContainerScan () const
 Returns true if the layer is a potential dataset container and an in-depth scan of its contents was skipped. More...
 
QgsMapLayertoLayer (const LayerOptions &options) const
 Creates a new QgsMapLayer object associated with the sublayer. More...
 
QgsMimeDataUtils::Uri toMimeUri () const
 Converts the sublayer details to a QgsMimeDataUtils::Uri representing the sublayer. More...
 
Qgis::LayerType type () const
 Returns the layer type. More...
 
QString uri () const
 Returns the layer's URI. More...
 
Qgis::WkbType wkbType () const
 Returns the layer's WKB type, or QgsWkbTypes::Unknown if the WKB type is not application or unknown. More...
 

Detailed Description

Contains details about a sub layer available from a dataset.

This class encapsulates the properties of a single sublayer available from a dataset, according to a specific data provider.

Note
It is possible that multiple data providers may be able to utilize the same underlying sub layer in a single dataset, yet will interpret this layer differently. For instance, a layer in a GeoPDF document can be interpreted as either a vector layer by the OGR data provider or a raster layer by the GDAL provider. The providerKey() property can be used to determine the data provider associated with a QgsProviderSubLayerDetails instance.
Since
QGIS 3.22

Definition at line 45 of file qgsprovidersublayerdetails.h.

Member Function Documentation

◆ description()

QString QgsProviderSublayerDetails::description ( ) const
inline

Returns the layer's description.

See also
setDescription()

Definition at line 151 of file qgsprovidersublayerdetails.h.

◆ driverName()

QString QgsProviderSublayerDetails::driverName ( ) const
inline

Returns the layer's driver name.

This is supported only for providers which handle multiple drivers.

See also
setDriverName()

Definition at line 181 of file qgsprovidersublayerdetails.h.

◆ featureCount()

long long QgsProviderSublayerDetails::featureCount ( ) const
inline

Returns the layer's feature count.

Will return Qgis::FeatureCountState::UnknownCount or Qgis::FeatureCountState::Uncounted if no feature count is applicable or available.

See also
setFeatureCount()

Definition at line 217 of file qgsprovidersublayerdetails.h.

◆ flags()

Qgis::SublayerFlags QgsProviderSublayerDetails::flags ( ) const
inline

Returns the layer's flags, which indicate properties of the layer.

See also
setFlags()

Definition at line 165 of file qgsprovidersublayerdetails.h.

◆ geometryColumnName()

QString QgsProviderSublayerDetails::geometryColumnName ( ) const
inline

Returns the layer's geometry column name, or an empty string if not applicable.

See also
setGeometryColumnName()

Definition at line 249 of file qgsprovidersublayerdetails.h.

◆ layerNumber()

int QgsProviderSublayerDetails::layerNumber ( ) const
inline

Returns the associated layer number, for providers which order sublayers.

See also
setLayerNumber()

Definition at line 273 of file qgsprovidersublayerdetails.h.

◆ name()

QString QgsProviderSublayerDetails::name ( ) const
inline

Returns the layer's name.

See also
setName()

Definition at line 137 of file qgsprovidersublayerdetails.h.

◆ operator!=()

bool QgsProviderSublayerDetails::operator!= ( const QgsProviderSublayerDetails other) const

Definition at line 85 of file qgsprovidersublayerdetails.cpp.

◆ operator==()

bool QgsProviderSublayerDetails::operator== ( const QgsProviderSublayerDetails other) const

Definition at line 68 of file qgsprovidersublayerdetails.cpp.

◆ path()

QStringList QgsProviderSublayerDetails::path ( ) const
inline

Returns the path to the sublayer.

This is an internal path, relative to the dataset itself. It can be used to encapsulate the hierarchy of a dataset which organises layers in schemas or in an internal folder structure.

See also
setPath()

Definition at line 198 of file qgsprovidersublayerdetails.h.

◆ providerKey()

QString QgsProviderSublayerDetails::providerKey ( ) const
inline

Returns the associated data provider key.

See also
setProviderKey()

Definition at line 54 of file qgsprovidersublayerdetails.h.

◆ setDescription()

void QgsProviderSublayerDetails::setDescription ( const QString &  description)
inline

Sets the layer's description.

See also
description()

Definition at line 158 of file qgsprovidersublayerdetails.h.

◆ setDriverName()

void QgsProviderSublayerDetails::setDriverName ( const QString &  driver)
inline

Sets the layer's driver name.

See also
driverName()

Definition at line 188 of file qgsprovidersublayerdetails.h.

◆ setFeatureCount()

void QgsProviderSublayerDetails::setFeatureCount ( long long  count)
inline

Sets the layer's feature count.

Set to Qgis::FeatureCountState::UnknownCount or Qgis::FeatureCountState::Uncounted if no feature count is applicable or available.

See also
featureCount()

Definition at line 226 of file qgsprovidersublayerdetails.h.

◆ setFlags()

void QgsProviderSublayerDetails::setFlags ( Qgis::SublayerFlags  newFlags)
inline

Sets the layer's flags, which indicate properties of the layer.

See also
flags()

Definition at line 172 of file qgsprovidersublayerdetails.h.

◆ setGeometryColumnName()

void QgsProviderSublayerDetails::setGeometryColumnName ( const QString &  name)
inline

Sets the layer's geometry column name.

Set to an empty string if not applicable.

See also
geometryColumnName()

Definition at line 258 of file qgsprovidersublayerdetails.h.

◆ setLayerNumber()

void QgsProviderSublayerDetails::setLayerNumber ( int  number)
inline

Sets the associated layer number, for providers which order sublayers.

See also
layerNumber()

Definition at line 280 of file qgsprovidersublayerdetails.h.

◆ setName()

void QgsProviderSublayerDetails::setName ( const QString &  name)
inline

Sets the layer's name.

See also
name()

Definition at line 144 of file qgsprovidersublayerdetails.h.

◆ setPath()

void QgsProviderSublayerDetails::setPath ( const QStringList &  path)
inline

Sets the path to the sublayer.

This is an internal path, relative to the dataset itself. It can be used to encapsulate the hierarchy of a dataset which organises layers in schemas or in an internal folder structure.

See also
path()

Definition at line 208 of file qgsprovidersublayerdetails.h.

◆ setProviderKey()

void QgsProviderSublayerDetails::setProviderKey ( const QString &  key)
inline

Sets the associated data provider key.

See also
providerKey()

Definition at line 61 of file qgsprovidersublayerdetails.h.

◆ setSkippedContainerScan()

void QgsProviderSublayerDetails::setSkippedContainerScan ( bool  skipped)
inline

Set to true if the layer is a potential dataset container and an in-depth scan of its contents was skipped.

See also
skippedContainerScan();

Definition at line 288 of file qgsprovidersublayerdetails.h.

◆ setType()

void QgsProviderSublayerDetails::setType ( Qgis::LayerType  type)
inline

Sets the layer type.

See also
type()

Definition at line 75 of file qgsprovidersublayerdetails.h.

◆ setUri()

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

Sets the layer's uri.

See also
uri()

Definition at line 89 of file qgsprovidersublayerdetails.h.

◆ setWkbType()

void QgsProviderSublayerDetails::setWkbType ( Qgis::WkbType  type)
inline

Set the layer's WKB type.

Set to QgsWkbTypes::Unknown if the WKB type is not application or unknown.

See also
wkbType()

Definition at line 242 of file qgsprovidersublayerdetails.h.

◆ skippedContainerScan()

bool QgsProviderSublayerDetails::skippedContainerScan ( ) const
inline

Returns true if the layer is a potential dataset container and an in-depth scan of its contents was skipped.

See also
setSkippedContainerScan();

Definition at line 296 of file qgsprovidersublayerdetails.h.

◆ toLayer()

QgsMapLayer * QgsProviderSublayerDetails::toLayer ( const LayerOptions options) const

Creates a new QgsMapLayer object associated with the sublayer.

Caller takes ownership of the returned layer.

Definition at line 22 of file qgsprovidersublayerdetails.cpp.

◆ toMimeUri()

QgsMimeDataUtils::Uri QgsProviderSublayerDetails::toMimeUri ( ) const

Converts the sublayer details to a QgsMimeDataUtils::Uri representing the sublayer.

Since
QGIS 3.28

Definition at line 30 of file qgsprovidersublayerdetails.cpp.

◆ type()

Qgis::LayerType QgsProviderSublayerDetails::type ( ) const
inline

Returns the layer type.

See also
setType()

Definition at line 68 of file qgsprovidersublayerdetails.h.

◆ uri()

QString QgsProviderSublayerDetails::uri ( ) const
inline

Returns the layer's URI.

See also
setUri()

Definition at line 82 of file qgsprovidersublayerdetails.h.

◆ wkbType()

Qgis::WkbType QgsProviderSublayerDetails::wkbType ( ) const
inline

Returns the layer's WKB type, or QgsWkbTypes::Unknown if the WKB type is not application or unknown.

See also
setWkbType()

Definition at line 233 of file qgsprovidersublayerdetails.h.


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