QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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
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.
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.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
SourceType
Data source types enum.
@ TypePlugin
Plugin layers.
@ TypeVectorLine
Vector line layers.
@ TypeMapLayer
Any map layer type (raster, vector, mesh, point cloud, annotation or plugin layer)
@ TypeVectorPolygon
Vector polygon layers.
@ TypeFile
Files (i.e. non map layer sources, such as text files)
@ TypeAnnotation
Annotation layers.
@ TypePointCloud
Point cloud layers.
@ TypeMesh
Mesh layers.
@ TypeVector
Tables (i.e. vector layers with or without geometry). When used for a sink this indicates the sink ha...
@ TypeRaster
Raster layers.
@ TypeVectorTile
Vector tile layers.
@ TypeVectorPoint
Vector point layers.
@ TypeVectorAnyGeometry
Any vector layer with geometry.
LayerOptionsFlag
Layer options flags.
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)
Creates a normal tree node It will return the existing child node if it exists at the given key.
static QgsSettingsTreeNode * sTreeQgis