QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
qgsprocessing.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessing.h
3 ---------------
4 begin : July 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPROCESSING_H
19#define QGSPROCESSING_H
20
21#include "qgis_core.h"
23#include "qgssettingstree.h"
24#include <QString>
25
26//
27// Output definitions
28//
29
40class CORE_EXPORT QgsProcessing
41{
42
43 public:
44
47 {
48 TypeMapLayer = -2,
49 TypeVectorAnyGeometry = -1,
50 TypeVectorPoint = 0,
51 TypeVectorLine = 1,
52 TypeVectorPolygon = 2,
53 TypeRaster = 3,
54 TypeFile = 4,
55 TypeVector = 5,
56 TypeMesh = 6,
57 TypePlugin = 7,
58 TypePointCloud = 8,
59 TypeAnnotation = 9,
60 TypeVectorTile = 10
61 };
62
65 {
67 };
68
74 enum class LayerOptionsFlag : int
75 {
76 SkipIndexGeneration = 1 << 0,
77 };
78 Q_DECLARE_FLAGS( LayerOptionsFlags, LayerOptionsFlag )
79
80
85 static QString sourceTypeToString( SourceType type )
86 {
87 switch ( type )
88 {
90 return QStringLiteral( "TypeMapLayer" );
92 return QStringLiteral( "TypeVectorAnyGeometry" );
94 return QStringLiteral( "TypeVectorPoint" );
96 return QStringLiteral( "TypeVectorLine" );
98 return QStringLiteral( "TypeVectorPolygon" );
100 return QStringLiteral( "TypeRaster" );
102 return QStringLiteral( "TypeFile" );
104 return QStringLiteral( "TypeVector" );
106 return QStringLiteral( "TypeMesh" );
108 return QStringLiteral( "TypePlugin" );
110 return QStringLiteral( "TypePointCloud" );
112 return QStringLiteral( "TypeAnnotation" );
114 return QStringLiteral( "TypeVectorTile" );
115 }
116 return QString();
117 }
118
124 static const QString TEMPORARY_OUTPUT;
125
126#ifndef SIP_RUN
127 static inline QgsSettingsTreeNode *sTreeConfiguration = QgsSettingsTree::sTreeQgis->createChildNode( QStringLiteral( "configuration" ) );
128
137#endif
138};
139
140#endif // QGSPROCESSING_H
Contains enumerations and other constants for use in processing algorithms and parameters.
Definition: qgsprocessing.h:41
static const QgsSettingsEntryInteger * settingsDefaultOutputRasterLayerExt
Settings entry default output raster layer ext.
static const QgsSettingsEntryInteger * settingsDefaultOutputVectorLayerExt
Settings entry default output vector layer ext.
static const QgsSettingsEntryString * settingsTempPath
Settings entry temp path.
static const QString TEMPORARY_OUTPUT
Constant used to indicate that a Processing algorithm output should be a temporary layer/file.
static const QgsSettingsEntryBool * settingsPreferFilenameAsLayerName
Settings entry prefer filename as layer name.
PythonOutputType
Available Python output types.
Definition: qgsprocessing.h:65
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
Definition: qgsprocessing.h:66
SourceType
Data source types enum.
Definition: qgsprocessing.h:47
@ TypePlugin
Plugin layers.
Definition: qgsprocessing.h:57
@ TypeVectorLine
Vector line layers.
Definition: qgsprocessing.h:51
@ TypeMapLayer
Any map layer type (raster, vector, mesh, point cloud, annotation or plugin layer)
Definition: qgsprocessing.h:48
@ TypeVectorPolygon
Vector polygon layers.
Definition: qgsprocessing.h:52
@ TypeFile
Files (i.e. non map layer sources, such as text files)
Definition: qgsprocessing.h:54
@ TypeAnnotation
Annotation layers.
Definition: qgsprocessing.h:59
@ TypePointCloud
Point cloud layers.
Definition: qgsprocessing.h:58
@ TypeMesh
Mesh layers.
Definition: qgsprocessing.h:56
@ TypeVector
Tables (i.e. vector layers with or without geometry). When used for a sink this indicates the sink ha...
Definition: qgsprocessing.h:55
@ TypeRaster
Raster layers.
Definition: qgsprocessing.h:53
@ TypeVectorTile
Vector tile layers.
Definition: qgsprocessing.h:60
@ TypeVectorPoint
Vector point layers.
Definition: qgsprocessing.h:50
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Definition: qgsprocessing.h:49
LayerOptionsFlag
Layer options flags.
Definition: qgsprocessing.h:75
A boolean settings entry.
An integer settings entry.
A string settings entry.
QgsSettingsTreeNode is a tree node for the settings tree to help organizing and introspecting the tre...
QgsSettingsTreeNode * createChildNode(const QString &key) SIP_THROW(QgsSettingsException)
Creates a normal tree node It will return the existing child node if it exists at the given key.
static QgsSettingsTreeNode * sTreeQgis