QGIS API Documentation  3.37.0-Master (a5b4d9743e8)
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 "qgis.h"
23 #include "qgssettingsentryimpl.h"
24 #include "qgssettingstree.h"
25 #include <QString>
26 
27 //
28 // Output definitions
29 //
30 
40 class CORE_EXPORT QgsProcessing
41 {
42  Q_GADGET
43 
44  public:
45 
48  {
49  PythonQgsProcessingAlgorithmSubclass,
50  };
51  Q_ENUM( PythonOutputType )
52 
53 
58  enum class LayerOptionsFlag : int SIP_ENUM_BASETYPE( IntFlag )
59  {
60  SkipIndexGeneration = 1 << 0,
61  };
62  Q_ENUM( LayerOptionsFlag )
63  Q_DECLARE_FLAGS( LayerOptionsFlags, LayerOptionsFlag )
64  Q_FLAG( LayerOptionsFlags )
65 
71  static QString sourceTypeToString( Qgis::ProcessingSourceType type )
72  {
73  switch ( type )
74  {
76  return QStringLiteral( "TypeMapLayer" );
78  return QStringLiteral( "TypeVectorAnyGeometry" );
80  return QStringLiteral( "TypeVectorPoint" );
82  return QStringLiteral( "TypeVectorLine" );
84  return QStringLiteral( "TypeVectorPolygon" );
86  return QStringLiteral( "TypeRaster" );
88  return QStringLiteral( "TypeFile" );
90  return QStringLiteral( "TypeVector" );
92  return QStringLiteral( "TypeMesh" );
94  return QStringLiteral( "TypePlugin" );
96  return QStringLiteral( "TypePointCloud" );
98  return QStringLiteral( "TypeAnnotation" );
100  return QStringLiteral( "TypeVectorTile" );
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
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:54
@ File
Files (i.e. non map layer sources, such as text files)
@ Annotation
Annotation layers.
@ Vector
Tables (i.e. vector layers with or without geometry). When used for a sink this indicates the sink ha...
@ VectorTile
Vector tile layers.
@ MapLayer
Any map layer type (raster, vector, mesh, point cloud, annotation or plugin layer)
@ VectorAnyGeometry
Any vector layer with geometry.
@ VectorPoint
Vector point layers.
@ VectorPolygon
Vector polygon layers.
@ VectorLine
Vector line layers.
@ PointCloud
Point cloud layers.
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.
QFlags< LayerOptionsFlag > LayerOptionsFlags
Definition: qgsprocessing.h:63
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:48
LayerOptionsFlag
Layer options flags.
Definition: qgsprocessing.h:59
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
#define SIP_ENUM_BASETYPE(type)
Definition: qgis_sip.h:278
#define SIP_MONKEYPATCH_SCOPEENUM
Definition: qgis_sip.h:270