QGIS API Documentation  3.24.2-Tisler (13c1a02865)
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"
22 #include "qgssettingsentry.h"
23 #include <QString>
24 
25 //
26 // Output definitions
27 //
28 
39 class CORE_EXPORT QgsProcessing
40 {
41 
42  public:
43 
46  {
47  TypeMapLayer = -2,
48  TypeVectorAnyGeometry = -1,
49  TypeVectorPoint = 0,
50  TypeVectorLine = 1,
51  TypeVectorPolygon = 2,
52  TypeRaster = 3,
53  TypeFile = 4,
54  TypeVector = 5,
55  TypeMesh = 6,
56  TypePlugin = 7,
57  TypePointCloud = 8,
58  TypeAnnotation = 9
59  };
60 
63  {
65  };
66 
72  static QString sourceTypeToString( SourceType type )
73  {
74  switch ( type )
75  {
77  return QStringLiteral( "TypeMapLayer" );
79  return QStringLiteral( "TypeVectorAnyGeometry" );
81  return QStringLiteral( "TypeVectorPoint" );
83  return QStringLiteral( "TypeVectorLine" );
85  return QStringLiteral( "TypeVectorPolygon" );
87  return QStringLiteral( "TypeRaster" );
89  return QStringLiteral( "TypeFile" );
91  return QStringLiteral( "TypeVector" );
93  return QStringLiteral( "TypeMesh" );
95  return QStringLiteral( "TypePlugin" );
97  return QStringLiteral( "TypePointCloud" );
99  return QStringLiteral( "TypeAnnotation" );
100  }
101  return QString();
102  }
103 
109  static const QString TEMPORARY_OUTPUT;
110 
111 #ifndef SIP_RUN
113  static const inline QgsSettingsEntryBool settingsPreferFilenameAsLayerName = QgsSettingsEntryBool( QStringLiteral( "Processing/Configuration/PREFER_FILENAME_AS_LAYER_NAME" ), QgsSettings::NoSection, true, QObject::tr( "Prefer filename as layer name" ) );
115  static const inline QgsSettingsEntryString settingsTempPath = QgsSettingsEntryString( QStringLiteral( "Processing/Configuration/TEMP_PATH2" ), QgsSettings::NoSection, QString() );
117  static const inline QgsSettingsEntryInteger settingsDefaultOutputVectorLayerExt = QgsSettingsEntryInteger( QStringLiteral( "Processing/Configuration/DefaultOutputVectorLayerExt" ), QgsSettings::NoSection, -1 );
119  static const inline QgsSettingsEntryInteger settingsDefaultOutputRasterLayerExt = QgsSettingsEntryInteger( QStringLiteral( "Processing/Configuration/DefaultOutputRasterLayerExt" ), QgsSettings::NoSection, -1 );
120 #endif
121 };
122 
123 #endif // QGSPROCESSING_H
Contains enumerations and other constants for use in processing algorithms and parameters.
Definition: qgsprocessing.h:40
static const QString TEMPORARY_OUTPUT
Constant used to indicate that a Processing algorithm output should be a temporary layer/file.
PythonOutputType
Available Python output types.
Definition: qgsprocessing.h:63
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
Definition: qgsprocessing.h:64
SourceType
Data source types enum.
Definition: qgsprocessing.h:46
@ TypePlugin
Plugin layers.
Definition: qgsprocessing.h:56
@ TypeVectorLine
Vector line layers.
Definition: qgsprocessing.h:50
@ TypeMapLayer
Any map layer type (raster, vector, mesh, point cloud, annotation or plugin layer)
Definition: qgsprocessing.h:47
@ TypeVectorPolygon
Vector polygon layers.
Definition: qgsprocessing.h:51
@ TypeFile
Files (i.e. non map layer sources, such as text files)
Definition: qgsprocessing.h:53
@ TypeAnnotation
Annotation layers.
Definition: qgsprocessing.h:58
@ TypePointCloud
Point cloud layers.
Definition: qgsprocessing.h:57
@ TypeMesh
Mesh layers.
Definition: qgsprocessing.h:55
@ TypeVector
Tables (i.e. vector layers with or without geometry). When used for a sink this indicates the sink ha...
Definition: qgsprocessing.h:54
@ TypeRaster
Raster layers.
Definition: qgsprocessing.h:52
@ TypeVectorPoint
Vector point layers.
Definition: qgsprocessing.h:49
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Definition: qgsprocessing.h:48
static QString sourceTypeToString(SourceType type)
Converts a source type to a string representation.
Definition: qgsprocessing.h:72
A boolean settings entry.
An integer settings entry.
A string settings entry.