QGIS API Documentation  3.11.0-Master (68611307d7)
Public Member Functions | Public Attributes | List of all members
QgsProcessingContext::LayerDetails Class Reference

Details for layers to load into projects. More...

#include <qgsprocessingcontext.h>

Public Member Functions

 LayerDetails (const QString &name, QgsProject *project, const QString &outputName=QString(), QgsProcessingUtils::LayerHint layerTypeHint=QgsProcessingUtils::LayerHint::UnknownType)
 Constructor for LayerDetails. More...
 
 LayerDetails ()=default
 Default constructor. More...
 
QgsProcessingLayerPostProcessorInterfacepostProcessor () const
 Layer post-processor. More...
 
void setOutputLayerName (QgsMapLayer *layer) const
 Sets a layer name to match this output, respecting any local user settings which affect this name. More...
 
void setPostProcessor (QgsProcessingLayerPostProcessorInterface *processor)
 Sets the layer post-processor. More...
 

Public Attributes

QgsProcessingUtils::LayerHint layerTypeHint = QgsProcessingUtils::LayerHint::UnknownType
 Layer type hint. More...
 
QString name
 Friendly name for layer, possibly for use when loading layer into project. More...
 
QString outputName
 Associated output name from algorithm which generated the layer. More...
 
QgsProjectproject = nullptr
 Destination project. More...
 

Detailed Description

Details for layers to load into projects.

Since
QGIS 3.0

Definition at line 158 of file qgsprocessingcontext.h.

Constructor & Destructor Documentation

◆ LayerDetails() [1/2]

QgsProcessingContext::LayerDetails::LayerDetails ( const QString &  name,
QgsProject project,
const QString &  outputName = QString(),
QgsProcessingUtils::LayerHint  layerTypeHint = QgsProcessingUtils::LayerHint::UnknownType 
)
inline

Constructor for LayerDetails.

Definition at line 165 of file qgsprocessingcontext.h.

◆ LayerDetails() [2/2]

QgsProcessingContext::LayerDetails::LayerDetails ( )
default

Default constructor.

Member Function Documentation

◆ postProcessor()

QgsProcessingLayerPostProcessorInterface * QgsProcessingContext::LayerDetails::postProcessor ( ) const

Layer post-processor.

May be nullptr if no post-processing is required.

See also
setPostProcessor()
Since
QGIS 3.2

Definition at line 112 of file qgsprocessingcontext.cpp.

◆ setOutputLayerName()

void QgsProcessingContext::LayerDetails::setOutputLayerName ( QgsMapLayer layer) const

Sets a layer name to match this output, respecting any local user settings which affect this name.

Since
QGIS 3.10.1

Definition at line 125 of file qgsprocessingcontext.cpp.

◆ setPostProcessor()

void QgsProcessingContext::LayerDetails::setPostProcessor ( QgsProcessingLayerPostProcessorInterface processor)

Sets the layer post-processor.

May be nullptr if no post-processing is required.

Ownership of processor is transferred.

See also
postProcessor()
Since
QGIS 3.2

Definition at line 117 of file qgsprocessingcontext.cpp.

Member Data Documentation

◆ layerTypeHint

QgsProcessingUtils::LayerHint QgsProcessingContext::LayerDetails::layerTypeHint = QgsProcessingUtils::LayerHint::UnknownType

Layer type hint.

Since
QGIS 3.4

Definition at line 193 of file qgsprocessingcontext.h.

◆ name

QString QgsProcessingContext::LayerDetails::name

Friendly name for layer, possibly for use when loading layer into project.

Warning
Instead of directly using this value, prefer to call setOutputLayerName() to generate a layer name which respects the user's local Processing settings.

Definition at line 181 of file qgsprocessingcontext.h.

◆ outputName

QString QgsProcessingContext::LayerDetails::outputName

Associated output name from algorithm which generated the layer.

Definition at line 186 of file qgsprocessingcontext.h.

◆ project

QgsProject* QgsProcessingContext::LayerDetails::project = nullptr

Destination project.

Definition at line 220 of file qgsprocessingcontext.h.


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