QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 "qgssettingsentryimpl.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
112  static const inline QgsSettingsEntryBool settingsPreferFilenameAsLayerName = QgsSettingsEntryBool( QStringLiteral( "PREFER_FILENAME_AS_LAYER_NAME" ), QgsSettings::Prefix::PROCESSING_CONFIGURATION, true, QObject::tr( "Prefer filename as layer name" ) );
115  static const inline QgsSettingsEntryString settingsTempPath = QgsSettingsEntryString( QStringLiteral( "TEMP_PATH2" ), QgsSettings::Prefix::PROCESSING_CONFIGURATION, QString() );
117  static const inline QgsSettingsEntryInteger settingsDefaultOutputVectorLayerExt = QgsSettingsEntryInteger( QStringLiteral( "DefaultOutputVectorLayerExt" ), QgsSettings::Prefix::PROCESSING_CONFIGURATION, -1 );
119  static const inline QgsSettingsEntryInteger settingsDefaultOutputRasterLayerExt = QgsSettingsEntryInteger( QStringLiteral( "DefaultOutputRasterLayerExt" ), QgsSettings::Prefix::PROCESSING_CONFIGURATION, -1 );
120 #endif
121 };
122 
123 #endif // QGSPROCESSING_H
QgsProcessing::TypePointCloud
@ TypePointCloud
Point cloud layers.
Definition: qgsprocessing.h:57
QgsProcessing::TypeVectorPolygon
@ TypeVectorPolygon
Vector polygon layers.
Definition: qgsprocessing.h:51
QgsSettingsEntryString
A string settings entry.
Definition: qgssettingsentryimpl.h:87
QgsProcessing::TypeVectorLine
@ TypeVectorLine
Vector line layers.
Definition: qgsprocessing.h:50
QgsProcessing::sourceTypeToString
static QString sourceTypeToString(SourceType type)
Converts a source type to a string representation.
Definition: qgsprocessing.h:72
QgsSettingsEntryInteger
An integer settings entry.
Definition: qgssettingsentryimpl.h:299
QgsProcessing::TypeVectorPoint
@ TypeVectorPoint
Vector point layers.
Definition: qgsprocessing.h:49
QgsProcessing::TypeAnnotation
@ TypeAnnotation
Annotation layers.
Definition: qgsprocessing.h:58
QgsProcessing::TypeMapLayer
@ TypeMapLayer
Any map layer type (raster, vector, mesh, point cloud, annotation or plugin layer)
Definition: qgsprocessing.h:47
QgsProcessing::PythonQgsProcessingAlgorithmSubclass
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
Definition: qgsprocessing.h:64
QgsProcessing::TypeVector
@ TypeVector
Tables (i.e. vector layers with or without geometry). When used for a sink this indicates the sink ha...
Definition: qgsprocessing.h:54
QgsProcessing::TypeMesh
@ TypeMesh
Mesh layers.
Definition: qgsprocessing.h:55
QgsProcessing::TypePlugin
@ TypePlugin
Plugin layers.
Definition: qgsprocessing.h:56
QgsProcessing::TypeRaster
@ TypeRaster
Raster layers.
Definition: qgsprocessing.h:52
QgsProcessing::TypeVectorAnyGeometry
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Definition: qgsprocessing.h:48
QgsProcessing
Contains enumerations and other constants for use in processing algorithms and parameters.
Definition: qgsprocessing.h:39
QgsProcessing::TEMPORARY_OUTPUT
static const QString TEMPORARY_OUTPUT
Constant used to indicate that a Processing algorithm output should be a temporary layer/file.
Definition: qgsprocessing.h:109
qgssettingsentryimpl.h
QgsSettings::Prefix::PROCESSING_CONFIGURATION
static const char * PROCESSING_CONFIGURATION
Definition: qgssettings.h:100
QgsProcessing::TypeFile
@ TypeFile
Files (i.e. non map layer sources, such as text files)
Definition: qgsprocessing.h:53
QgsProcessing::PythonOutputType
PythonOutputType
Available Python output types.
Definition: qgsprocessing.h:62
QgsProcessing::SourceType
SourceType
Data source types enum.
Definition: qgsprocessing.h:45
QgsSettingsEntryBool
A boolean settings entry.
Definition: qgssettingsentryimpl.h:241