QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Member Functions | Public Attributes | List of all members
QgsProcessingOutputLayerDefinition Class Reference

Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm. More...

#include <qgsprocessingparameters.h>

Public Member Functions

 QgsProcessingOutputLayerDefinition (const QString &sink=QString(), QgsProject *destinationProject=nullptr)
 Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string. More...
 
 QgsProcessingOutputLayerDefinition (const QgsProperty &sink, QgsProject *destinationProject=nullptr)
 Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer. More...
 
bool loadVariant (const QVariantMap &map)
 Loads this output layer definition from a QVariantMap, wrapped in a QVariant. More...
 
 operator QVariant () const
 Allows direct construction of QVariants. More...
 
QVariant toVariant () const
 Saves this output layer definition to a QVariantMap, wrapped in a QVariant. More...
 

Public Attributes

QVariantMap createOptions
 Map of optional sink/layer creation options, which are passed to the underlying provider when creating new layers. More...
 
QString destinationName
 Name to use for sink if it's to be loaded into a destination project. More...
 
QgsProjectdestinationProject = nullptr
 Destination project. More...
 
QgsProperty sink
 Sink/layer definition. More...
 

Detailed Description

Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm.

Since
QGIS 3.0

Definition at line 108 of file qgsprocessingparameters.h.

Constructor & Destructor Documentation

QgsProcessingOutputLayerDefinition::QgsProcessingOutputLayerDefinition ( const QString &  sink = QString(),
QgsProject destinationProject = nullptr 
)
inline

Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string.

The destinationProject parameter can be set to a QgsProject instance in which to automatically load the resulting sink/layer after completing processing.

Definition at line 117 of file qgsprocessingparameters.h.

QgsProcessingOutputLayerDefinition::QgsProcessingOutputLayerDefinition ( const QgsProperty sink,
QgsProject destinationProject = nullptr 
)
inline

Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer.

The destinationProject parameter can be set to a QgsProject instance in which to automatically load the resulting sink/layer after completing processing.

Definition at line 127 of file qgsprocessingparameters.h.

Member Function Documentation

bool QgsProcessingOutputLayerDefinition::loadVariant ( const QVariantMap &  map)

Loads this output layer definition from a QVariantMap, wrapped in a QVariant.

You can use QgsXmlUtils::readVariant to load it from an XML document.

See also
toVariant()
Since
QGIS 3.2

Definition at line 44 of file qgsprocessingparameters.cpp.

QgsProcessingOutputLayerDefinition::operator QVariant ( ) const
inline

Allows direct construction of QVariants.

Definition at line 174 of file qgsprocessingparameters.h.

QVariant QgsProcessingOutputLayerDefinition::toVariant ( ) const

Saves this output layer definition to a QVariantMap, wrapped in a QVariant.

You can use QgsXmlUtils::writeVariant to save it to an XML document.

See also
loadVariant()
Since
QGIS 3.2

Definition at line 36 of file qgsprocessingparameters.cpp.

Member Data Documentation

QVariantMap QgsProcessingOutputLayerDefinition::createOptions

Map of optional sink/layer creation options, which are passed to the underlying provider when creating new layers.

Known options also include 'fileEncoding', which is used to specify a file encoding to use for created files.

Definition at line 155 of file qgsprocessingparameters.h.

QString QgsProcessingOutputLayerDefinition::destinationName

Name to use for sink if it's to be loaded into a destination project.

Definition at line 147 of file qgsprocessingparameters.h.

QgsProject* QgsProcessingOutputLayerDefinition::destinationProject = nullptr

Destination project.

Can be set to a QgsProject instance in which to automatically load the resulting sink/layer after completing processing. The default behavior is not to load the result into any project (nullptr).

Definition at line 142 of file qgsprocessingparameters.h.

QgsProperty QgsProcessingOutputLayerDefinition::sink

Sink/layer definition.

Usually a static property set to the destination file name for the sink's layer.

Definition at line 135 of file qgsprocessingparameters.h.


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