QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
src
core
providers
qgsprovidersublayerdetails.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprovidersublayerdetails.cpp
3
----------------------------
4
begin : May 2021
5
copyright : (C) 2021 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
/***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
17
#include "
qgsprovidersublayerdetails.h
"
18
#include "
qgsmaplayerfactory.h
"
19
20
21
22
QgsMapLayer
*
QgsProviderSublayerDetails::toLayer
(
const
LayerOptions
&options )
const
23
{
24
QgsMapLayerFactory::LayerOptions
layerOptions( options.
transformContext
);
25
layerOptions.
loadDefaultStyle
= options.
loadDefaultStyle
;
26
return
QgsMapLayerFactory::createLayer
( mUri, mName, mType, layerOptions, mProviderKey );
27
}
28
29
bool
QgsProviderSublayerDetails::operator==
(
const
QgsProviderSublayerDetails
&other )
const
30
{
31
return
mProviderKey == other.mProviderKey
32
&& mType == other.mType
33
&& mFlags == other.mFlags
34
&& mUri == other.mUri
35
&& mLayerNumber == other.mLayerNumber
36
&& mName == other.mName
37
&& mDescription == other.mDescription
38
&& mFeatureCount == other.mFeatureCount
39
&& mGeometryColumnName == other.mGeometryColumnName
40
&& mPath == other.mPath
41
&& mWkbType == other.mWkbType
42
&& mSkippedContainerScan == other.mSkippedContainerScan
43
&& mDriverName == other.mDriverName;
44
}
45
46
bool
QgsProviderSublayerDetails::operator!=
(
const
QgsProviderSublayerDetails
&other )
const
47
{
48
return
!( *
this
== other );
49
}
QgsProviderSublayerDetails::operator==
bool operator==(const QgsProviderSublayerDetails &other) const
Definition:
qgsprovidersublayerdetails.cpp:29
QgsMapLayerFactory::LayerOptions::loadDefaultStyle
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
Definition:
qgsmaplayerfactory.h:88
QgsMapLayerFactory::createLayer
static QgsMapLayer * createLayer(const QString &uri, const QString &name, QgsMapLayerType type, const LayerOptions &options, const QString &provider=QString())
Creates a map layer, given a uri, name, layer type and provider name.
Definition:
qgsmaplayerfactory.cpp:75
qgsmaplayerfactory.h
QgsProviderSublayerDetails::LayerOptions::loadDefaultStyle
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
Definition:
qgsprovidersublayerdetails.h:107
QgsProviderSublayerDetails
Contains details about a sub layer available from a dataset.
Definition:
qgsprovidersublayerdetails.h:44
QgsProviderSublayerDetails::operator!=
bool operator!=(const QgsProviderSublayerDetails &other) const
Definition:
qgsprovidersublayerdetails.cpp:46
QgsMapLayerFactory::LayerOptions
Setting options for loading layers.
Definition:
qgsmaplayerfactory.h:74
QgsProviderSublayerDetails::LayerOptions
Setting options for loading layers.
Definition:
qgsprovidersublayerdetails.h:93
QgsProviderSublayerDetails::toLayer
QgsMapLayer * toLayer(const LayerOptions &options) const
Creates a new QgsMapLayer object associated with the sublayer.
Definition:
qgsprovidersublayerdetails.cpp:22
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition:
qgsmaplayer.h:72
QgsProviderSublayerDetails::LayerOptions::transformContext
QgsCoordinateTransformContext transformContext
Coordinate transform context.
Definition:
qgsprovidersublayerdetails.h:104
qgsprovidersublayerdetails.h
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17