QGIS API Documentation 4.3.0-Master (bf28115e945)
Loading...
Searching...
No Matches
QgsEmptyLayerCreationResult Class Reference

Encapsulates the details of a newly created empty layer. More...

#include <qgsprovidermetadata.h>

Public Member Functions

 QgsEmptyLayerCreationResult ()=default
 QgsEmptyLayerCreationResult (Qgis::VectorExportResult result, const QString &createdLayerUri, const QString &errorMessage, const QMap< int, int > &createdAttributeIndexMap)
 Constructor for QgsEmptyLayerCreationResult.
QMap< int, int > createdAttributeIndexMap () const
 Returns a map of the original requested field index to the actual created field index.
QString createdLayerUri () const
 Returns the created layer URI.
QString errorMessage () const
 Returns any user-friendly error messages obtained if the creation fails.
Qgis::VectorExportResult result () const
 Returns the result code of the layer creation.

Detailed Description

Encapsulates the details of a newly created empty layer.

Since
QGIS 4.2

Definition at line 162 of file qgsprovidermetadata.h.

Constructor & Destructor Documentation

◆ QgsEmptyLayerCreationResult() [1/2]

QgsEmptyLayerCreationResult::QgsEmptyLayerCreationResult ( )
default

◆ QgsEmptyLayerCreationResult() [2/2]

QgsEmptyLayerCreationResult::QgsEmptyLayerCreationResult ( Qgis::VectorExportResult result,
const QString & createdLayerUri,
const QString & errorMessage,
const QMap< int, int > & createdAttributeIndexMap )
inline

Constructor for QgsEmptyLayerCreationResult.

Definition at line 171 of file qgsprovidermetadata.h.

Member Function Documentation

◆ createdAttributeIndexMap()

QMap< int, int > QgsEmptyLayerCreationResult::createdAttributeIndexMap ( ) const
inline

Returns a map of the original requested field index to the actual created field index.

In some cases the provider may re-arrange fields from their original requested order. It's not always possible to directly determine this mapping from the output layer alone, as the provider may have changed requested fields as part of the layer creation process (eg when the provider has had to automatically launder them).

Definition at line 207 of file qgsprovidermetadata.h.

◆ createdLayerUri()

QString QgsEmptyLayerCreationResult::createdLayerUri ( ) const
inline

Returns the created layer URI.

This will be set to the actual URI of the layer created.

In some circumstances this may differ from the original requested uri, eg when the provider has had to automatically launder a layer name.

Definition at line 192 of file qgsprovidermetadata.h.

◆ errorMessage()

QString QgsEmptyLayerCreationResult::errorMessage ( ) const
inline

Returns any user-friendly error messages obtained if the creation fails.

Definition at line 197 of file qgsprovidermetadata.h.

◆ result()

Qgis::VectorExportResult QgsEmptyLayerCreationResult::result ( ) const
inline

Returns the result code of the layer creation.

Definition at line 182 of file qgsprovidermetadata.h.


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