QGIS API Documentation 4.1.0-Master (60fea48833c)
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.h"
22#include "qgis_core.h"
24#include "qgssettingstree.h"
25
26#include <QString>
27
28using namespace Qt::StringLiterals;
29
30//
31// Output definitions
32//
33
42
43class CORE_EXPORT QgsProcessing
44{
45 Q_GADGET
46
47 public:
50 {
51 PythonQgsProcessingAlgorithmSubclass,
52 };
53 Q_ENUM( PythonOutputType )
54
55
60 enum class LayerOptionsFlag : int SIP_ENUM_BASETYPE( IntFlag )
61 {
62 SkipIndexGeneration = 1 << 0,
63 };
64 Q_ENUM( LayerOptionsFlag )
66 Q_FLAG( LayerOptionsFlags )
67
73 static QString sourceTypeToString( Qgis::ProcessingSourceType type )
74 {
75 switch ( type )
76 {
78 return u"TypeMapLayer"_s;
80 return u"TypeVectorAnyGeometry"_s;
82 return u"TypeVectorPoint"_s;
84 return u"TypeVectorLine"_s;
86 return u"TypeVectorPolygon"_s;
88 return u"TypeRaster"_s;
90 return u"TypeFile"_s;
92 return u"TypeVector"_s;
94 return u"TypeMesh"_s;
96 return u"TypePlugin"_s;
98 return u"TypePointCloud"_s;
100 return u"TypeAnnotation"_s;
102 return u"TypeVectorTile"_s;
104 return u"TiledScene"_s;
105 }
106 return QString();
107 }
108
114 static QString documentationFlagToString( Qgis::ProcessingAlgorithmDocumentationFlag flag );
115
121 static const QString TEMPORARY_OUTPUT;
122
123#ifndef SIP_RUN
124 static inline QgsSettingsTreeNode *sTreeConfiguration = QgsSettingsTree::sTreeQgis->createChildNode( u"configuration"_s );
125
134#endif
135};
136
137#endif // QGSPROCESSING_H
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:62
@ File
Files (i.e. non map layer sources, such as text files).
Definition qgis.h:3652
@ Plugin
Plugin layers.
Definition qgis.h:3655
@ TiledScene
Tiled scene layers.
Definition qgis.h:3659
@ Annotation
Annotation layers.
Definition qgis.h:3657
@ Vector
Tables (i.e. vector layers with or without geometry). When used for a sink this indicates the sink ha...
Definition qgis.h:3653
@ VectorTile
Vector tile layers.
Definition qgis.h:3658
@ MapLayer
Any map layer type (raster, vector, mesh, point cloud, annotation or plugin layer).
Definition qgis.h:3646
@ Mesh
Mesh layers.
Definition qgis.h:3654
@ Raster
Raster layers.
Definition qgis.h:3651
@ VectorAnyGeometry
Any vector layer with geometry.
Definition qgis.h:3647
@ VectorPoint
Vector point layers.
Definition qgis.h:3648
@ VectorPolygon
Vector polygon layers.
Definition qgis.h:3650
@ VectorLine
Vector line layers.
Definition qgis.h:3649
@ PointCloud
Point cloud layers.
Definition qgis.h:3656
ProcessingAlgorithmDocumentationFlag
Flags describing algorithm behavior for documentation purposes.
Definition qgis.h:3733
Contains enumerations and other constants for use in processing algorithms and parameters.
static const QgsSettingsEntryString * settingsDefaultOutputRasterLayerFormat
Settings entry default output raster layer format.
QFlags< LayerOptionsFlag > LayerOptionsFlags
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.
static QgsSettingsTreeNode * sTreeConfiguration
PythonOutputType
Available Python output types.
static const QgsSettingsEntryString * settingsDefaultOutputVectorLayerExt
Settings entry default output vector layer ext.
static QString sourceTypeToString(Qgis::ProcessingSourceType type)
Converts a source type to a string representation.
LayerOptionsFlag
Layer options flags.
A boolean settings entry.
A string settings entry.
A tree node for the settings tree to help organizing and introspecting the tree.
static QgsSettingsTreeNode * sTreeQgis
#define SIP_ENUM_BASETYPE(type)
Definition qgis_sip.h:274
#define SIP_MONKEYPATCH_SCOPEENUM
Definition qgis_sip.h:266