|
QGIS API Documentation 4.3.0-Master (3b7b3208a79)
|
Handles results output by Processing algorithms. More...
#include <qgsprocessingpostprocessor.h>
Classes | |
| struct | ResultDetails |
| Stores results of running the handleAlgorithmResultsProtected method. More... | |
| class | ResultLayerDetails |
| Contains details of a layer result from running an algorithm. More... | |
Public Member Functions | |
| QgsProcessingResultsHandler ()=default | |
| virtual | ~QgsProcessingResultsHandler () |
| bool | handleAlgorithmResults (const QgsProcessingAlgorithm *algorithm, QgsProcessingContext &context, const QVariantMap ¶meters, QgsProcessingFeedback *feedback=nullptr) |
| Handles the results from running an algorithm. | |
Static Public Member Functions | |
| static QgsMapLayer * | addResultLayers (const QVector< QgsProcessingResultsHandler::ResultLayerDetails > &layers, const QgsProcessingContext &context, QgsLayerTreeNode *currentSelectedNode) |
| Responsible for adding layers created by an algorithm to a project and the project's layer tree in the correct location. | |
| static void | configureResultLayerTreeLayer (QgsLayerTreeLayer *layerTreeLayer) |
| Applies post-processing steps to the QgsLayerTreeLayer created for an algorithm's output. | |
| static QString | determineOutputName (const QString &destinationId, const QgsProcessingContext::LayerDetails &details, const QgsProcessingAlgorithm *algorithm, QgsProcessingContext &context, const QVariantMap ¶meters) |
| Determines the desired layer name for a map layer output. | |
| static QgsLayerTreeGroup * | layerTreeResultsGroup (const QgsProcessingContext::LayerDetails &layerDetails, const QgsProcessingContext &context) |
Returns the destination layer tree group to store results in, or nullptr if there is no specific destination tree group associated with the layer. | |
Protected Member Functions | |
| virtual QgsMapLayer * | handleAddResultLayers (const QgsProcessingResultsHandler::ResultDetails &details, const QgsProcessingContext &context) |
| Calls addResultLayers(), allowing for extra logic to be injected in subclasses. | |
| virtual QgsProcessingResultsHandler::ResultDetails | handleAlgorithmResultsProtected (const QgsProcessingAlgorithm *algorithm, QgsProcessingContext &context, const QVariantMap ¶meters, QgsProcessingFeedback *feedback) |
| Handles the results from running an algorithm. | |
| virtual void | setNewActiveLayer (QgsMapLayer *layer) |
| Handles setting the new project active layer after processing the results. | |
Handles results output by Processing algorithms.
Definition at line 64 of file qgsprocessingpostprocessor.h.
|
default |
|
virtualdefault |
|
static |
Responsible for adding layers created by an algorithm to a project and the project's layer tree in the correct location.
Returns the map layer which should be set as the project's active layer after adding all the results.
Definition at line 328 of file qgsprocessingpostprocessor.cpp.
|
static |
Applies post-processing steps to the QgsLayerTreeLayer created for an algorithm's output.
Definition at line 187 of file qgsprocessingpostprocessor.cpp.
|
static |
Determines the desired layer name for a map layer output.
Definition at line 104 of file qgsprocessingpostprocessor.cpp.
|
protectedvirtual |
Calls addResultLayers(), allowing for extra logic to be injected in subclasses.
Definition at line 320 of file qgsprocessingpostprocessor.cpp.
| bool QgsProcessingResultsHandler::handleAlgorithmResults | ( | const QgsProcessingAlgorithm * | algorithm, |
| QgsProcessingContext & | context, | ||
| const QVariantMap & | parameters, | ||
| QgsProcessingFeedback * | feedback = nullptr ) |
Handles the results from running an algorithm.
Returns true if all results could be successfully loaded.
Definition at line 201 of file qgsprocessingpostprocessor.cpp.
|
protectedvirtual |
Handles the results from running an algorithm.
Definition at line 213 of file qgsprocessingpostprocessor.cpp.
|
static |
Returns the destination layer tree group to store results in, or nullptr if there is no specific destination tree group associated with the layer.
Definition at line 139 of file qgsprocessingpostprocessor.cpp.
|
protectedvirtual |
Handles setting the new project active layer after processing the results.
The base class version does nothing.
Definition at line 325 of file qgsprocessingpostprocessor.cpp.