QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
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 };
61
64 {
66 };
67
73 static QString sourceTypeToString( SourceType type )
74 {
75 switch ( type )
76 {
78 return QStringLiteral( "TypeMapLayer" );
80 return QStringLiteral( "TypeVectorAnyGeometry" );
82 return QStringLiteral( "TypeVectorPoint" );
84 return QStringLiteral( "TypeVectorLine" );
86 return QStringLiteral( "TypeVectorPolygon" );
88 return QStringLiteral( "TypeRaster" );
90 return QStringLiteral( "TypeFile" );
92 return QStringLiteral( "TypeVector" );
94 return QStringLiteral( "TypeMesh" );
96 return QStringLiteral( "TypePlugin" );
98 return QStringLiteral( "TypePointCloud" );
100 return QStringLiteral( "TypeAnnotation" );
101 }
102 return QString();
103 }
104
110 static const QString TEMPORARY_OUTPUT;
111
112#ifndef SIP_RUN
113 static inline QgsSettingsTreeNode *sTreeConfiguration = QgsSettingsTree::sTreeQgis->createChildNode( QStringLiteral( "configuration" ) );
114
123#endif
124};
125
126#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:64
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
Definition: qgsprocessing.h:65
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
@ TypeVectorPoint
Vector point layers.
Definition: qgsprocessing.h:50
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Definition: qgsprocessing.h:49
static QString sourceTypeToString(SourceType type)
Converts a source type to a string representation.
Definition: qgsprocessing.h:73
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