QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
Details for layers to load into projects. More...
#include <qgsprocessingcontext.h>
Public Member Functions | |
LayerDetails ()=default | |
Default constructor. More... | |
LayerDetails (const QString &name, QgsProject *project, const QString &outputName=QString(), QgsProcessingUtils::LayerHint layerTypeHint=QgsProcessingUtils::LayerHint::UnknownType) | |
Constructor for LayerDetails. More... | |
QgsProcessingLayerPostProcessorInterface * | postProcessor () 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 | |
bool | forceName = false |
Set to true if LayerDetails::name should always be used as the loaded layer name, regardless of the user's local Processing settings. More... | |
QString | groupName |
Optional name for a layer tree group under which to place the layer when loading it into a project. More... | |
int | layerSortKey = 0 |
Optional sorting key for sorting output layers when loading them into a project. More... | |
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... | |
QgsProject * | project = nullptr |
Destination project. More... | |
Details for layers to load into projects.
Definition at line 264 of file qgsprocessingcontext.h.
|
inline |
Constructor for LayerDetails.
Definition at line 271 of file qgsprocessingcontext.h.
|
default |
Default constructor.
QgsProcessingLayerPostProcessorInterface * QgsProcessingContext::LayerDetails::postProcessor | ( | ) | const |
Layer post-processor.
May be nullptr
if no post-processing is required.
Definition at line 259 of file qgsprocessingcontext.cpp.
void QgsProcessingContext::LayerDetails::setOutputLayerName | ( | QgsMapLayer * | layer | ) | const |
Sets a layer name to match this output, respecting any local user settings which affect this name.
Definition at line 272 of file qgsprocessingcontext.cpp.
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.
Definition at line 264 of file qgsprocessingcontext.cpp.
bool QgsProcessingContext::LayerDetails::forceName = false |
Set to true
if LayerDetails::name should always be used as the loaded layer name, regardless of the user's local Processing settings.
Definition at line 294 of file qgsprocessingcontext.h.
QString QgsProcessingContext::LayerDetails::groupName |
Optional name for a layer tree group under which to place the layer when loading it into a project.
Definition at line 306 of file qgsprocessingcontext.h.
int QgsProcessingContext::LayerDetails::layerSortKey = 0 |
Optional sorting key for sorting output layers when loading them into a project.
Layers with a greater sort key will be placed over layers with a lesser sort key.
Definition at line 315 of file qgsprocessingcontext.h.
QgsProcessingUtils::LayerHint QgsProcessingContext::LayerDetails::layerTypeHint = QgsProcessingUtils::LayerHint::UnknownType |
QString QgsProcessingContext::LayerDetails::name |
Friendly name for layer, possibly for use when loading layer into project.
Definition at line 287 of file qgsprocessingcontext.h.
QString QgsProcessingContext::LayerDetails::outputName |
Associated output name from algorithm which generated the layer.
Definition at line 299 of file qgsprocessingcontext.h.
QgsProject* QgsProcessingContext::LayerDetails::project = nullptr |
Destination project.
Definition at line 349 of file qgsprocessingcontext.h.