23 if (
string.compare( QLatin1String(
"vector" ), Qt::CaseInsensitive ) == 0 )
25 else if (
string.compare( QLatin1String(
"raster" ), Qt::CaseInsensitive ) == 0 )
27 else if (
string.compare( QLatin1String(
"mesh" ), Qt::CaseInsensitive ) == 0 )
29 else if (
string.compare( QLatin1String(
"vector-tile" ), Qt::CaseInsensitive ) == 0 )
31 else if (
string.compare( QLatin1String(
"point-cloud" ), Qt::CaseInsensitive ) == 0 )
33 else if (
string.compare( QLatin1String(
"plugin" ), Qt::CaseInsensitive ) == 0 )
35 else if (
string.compare( QLatin1String(
"annotation" ), Qt::CaseInsensitive ) == 0 )
47 return QStringLiteral(
"vector" );
49 return QStringLiteral(
"raster" );
51 return QStringLiteral(
"plugin" );
53 return QStringLiteral(
"mesh" );
55 return QStringLiteral(
"vector-tile" );
57 return QStringLiteral(
"annotation" );
59 return QStringLiteral(
"point-cloud" );
static QgsMapLayerType typeFromString(const QString &string, bool &ok)
Returns the map layer type corresponding a string value.
static QString typeToString(QgsMapLayerType type)
Converts a map layer type to a string value.
QgsMapLayerType
Types of layers that can be added to a map.
@ PointCloudLayer
Added in 3.18.
@ VectorTileLayer
Added in 3.14.
@ AnnotationLayer
Contains freeform, georeferenced annotations. Added in QGIS 3.16.