QGIS API Documentation 3.43.0-Master (a93bf8b6462)
qgsprocessingguiutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingguiutils.h
3 ------------------------
4 Date : June 2025
5 Copyright : (C) 2025 Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSPROCESSINGGUIUTILS_H
17#define QGSPROCESSINGGUIUTILS_H
18
19#include "qgis.h"
20#include "qgis_gui.h"
22
25
36class GUI_EXPORT QgsProcessingGuiUtils
37{
38 public:
44 class GUI_EXPORT ResultLayerDetails
45 {
46 public:
53 : layer( layer )
54 {}
55
59 QgsMapLayer *layer = nullptr;
60
64 QgsLayerTreeGroup *targetLayerTreeGroup = nullptr;
65
69 int sortKey = 0;
70
74 QgsProject *destinationProject = nullptr;
75 };
76
80 static void configureResultLayerTreeLayer( QgsLayerTreeLayer *layerTreeLayer );
81
86 static QgsLayerTreeGroup *layerTreeResultsGroup( const QgsProcessingContext::LayerDetails &layerDetails, const QgsProcessingContext &context );
87
91 static void addResultLayers( const QVector< QgsProcessingGuiUtils::ResultLayerDetails > &layers, const QgsProcessingContext &context, QgsLayerTreeView *view = nullptr );
92};
93
94
95#endif // QGSPROCESSINGGUIUTILS_H
Layer tree group node serves as a container for layers and further groups.
Layer tree node points to a map layer.
Extends QTreeView and provides additional functionality when working with a layer tree.
Base class for all map layer types.
Definition qgsmaplayer.h:77
Details for layers to load into projects.
Contains information about the context in which a processing algorithm is executed.
Contains details of a layer result from running an algorithm.
ResultLayerDetails(QgsMapLayer *layer)
Constructor for ResultLayerDetails.
Contains utility functions relating to Processing GUI components.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:107
#define SIP_TRANSFER
Definition qgis_sip.h:36