18#ifndef QGSPROCESSINGPARAMETERS_H
19#define QGSPROCESSINGPARAMETERS_H
78 , selectedFeaturesOnly( selectedFeaturesOnly )
79 , featureLimit( featureLimit )
80 , filterExpression( filterExpression )
82 , geometryCheck( geometryCheck )
104 , selectedFeaturesOnly( selectedFeaturesOnly )
105 , featureLimit( featureLimit )
106 , filterExpression( filterExpression )
108 , geometryCheck( geometryCheck )
127 long long featureLimit = -1;
141 Qgis::ProcessingFeatureSourceDefinitionFlags
flags;
159 QVariant toVariant()
const;
167 bool loadVariant(
const QVariantMap &map );
172 return source == other.
source
176 && flags == other.
flags
182 return !( *
this == other );
186 operator QVariant()
const
188 return QVariant::fromValue( *
this );
214 , destinationProject( destinationProject )
224 , destinationProject( destinationProject )
287 QVariant toVariant()
const;
295 bool loadVariant(
const QVariantMap &map );
298 operator QVariant()
const
300 return QVariant::fromValue( *
this );
309 bool mUseRemapping =
false;
348 sipType = sipType_QgsProcessingParameterBoolean;
350 sipType = sipType_QgsProcessingParameterCrs;
352 sipType = sipType_QgsProcessingParameterMapLayer;
354 sipType = sipType_QgsProcessingParameterExtent;
356 sipType = sipType_QgsProcessingParameterPoint;
358 sipType = sipType_QgsProcessingParameterGeometry;
360 sipType = sipType_QgsProcessingParameterFile;
362 sipType = sipType_QgsProcessingParameterMatrix;
364 sipType = sipType_QgsProcessingParameterMultipleLayers;
366 sipType = sipType_QgsProcessingParameterNumber;
368 sipType = sipType_QgsProcessingParameterDistance;
370 sipType = sipType_QgsProcessingParameterDuration;
372 sipType = sipType_QgsProcessingParameterScale;
374 sipType = sipType_QgsProcessingParameterRange;
376 sipType = sipType_QgsProcessingParameterRasterLayer;
378 sipType = sipType_QgsProcessingParameterMeshLayer;
380 sipType = sipType_QgsProcessingParameterEnum;
382 sipType = sipType_QgsProcessingParameterString;
384 sipType = sipType_QgsProcessingParameterExpression;
386 sipType = sipType_QgsProcessingParameterAuthConfig;
388 sipType = sipType_QgsProcessingParameterVectorLayer;
390 sipType = sipType_QgsProcessingParameterField;
392 sipType = sipType_QgsProcessingParameterFeatureSource;
394 sipType = sipType_QgsProcessingParameterFeatureSink;
396 sipType = sipType_QgsProcessingParameterVectorDestination;
398 sipType = sipType_QgsProcessingParameterRasterDestination;
400 sipType = sipType_QgsProcessingParameterPointCloudDestination;
402 sipType = sipType_QgsProcessingParameterFileDestination;
404 sipType = sipType_QgsProcessingParameterFolderDestination;
406 sipType = sipType_QgsProcessingParameterBand;
408 sipType = sipType_QgsProcessingParameterLayout;
410 sipType = sipType_QgsProcessingParameterLayoutItem;
412 sipType = sipType_QgsProcessingParameterColor;
414 sipType = sipType_QgsProcessingParameterCoordinateOperation;
416 sipType = sipType_QgsProcessingParameterMapTheme;
418 sipType = sipType_QgsProcessingParameterDateTime;
420 sipType = sipType_QgsProcessingParameterProviderConnection;
422 sipType = sipType_QgsProcessingParameterDatabaseSchema;
424 sipType = sipType_QgsProcessingParameterDatabaseTable;
426 sipType = sipType_QgsProcessingParameterFieldMapping;
428 sipType = sipType_QgsProcessingParameterTinInputLayers;
430 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
432 sipType = sipType_QgsProcessingParameterDxfLayers;
434 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
436 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
438 sipType = sipType_QgsProcessingParameterPointCloudLayer;
440 sipType = sipType_QgsProcessingParameterAnnotationLayer;
442 sipType = sipType_QgsProcessingParameterPointCloudAttribute;
444 sipType = sipType_QgsProcessingParameterVectorTileDestination;
456 bool optional =
false,
const QString &help = QString() );
468 virtual QString
type()
const = 0;
482 QString
name()
const {
return mName; }
489 void setName(
const QString &name ) { mName = name; }
503 void setDescription(
const QString &description ) { mDescription = description; }
514 QString
help()
const {
return mHelp; }
525 void setHelp(
const QString &help ) { mHelp = help; }
555 QVariant guiDefaultValueOverride()
const;
582 QVariant defaultValueForGui()
const;
588 Qgis::ProcessingParameterFlags
flags()
const {
return mFlags; }
594 void setFlags( Qgis::ProcessingParameterFlags flags ) { mFlags = flags; }
603 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
612 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
625 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
662 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
668 virtual QString asScriptCode()
const;
686 virtual QVariantMap toVariantMap()
const;
693 virtual bool fromVariantMap(
const QVariantMap &map );
715 void setMetadata(
const QVariantMap &metadata ) { mMetadata = metadata; }
741 virtual QString toolTip()
const;
848 AllowMapLayerValues = 1 << 0,
850 Q_DECLARE_FLAGS( ValueAsStringFlags, ValueAsStringFlag )
863 QString valueAsStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool &ok, ValueAsStringFlags flags )
const;
871 QVariant valueAsJsonObjectPrivate(
const QVariant &value,
QgsProcessingContext &context, ValueAsStringFlags flags )
const;
880 QVariant defaultGuiValueFromSetting()
const;
907 bool mIsDynamic =
false;
956 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1163 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_FACTORY;
1186 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_THROW(
QgsProcessingException )
SIP_FACTORY;
1747 static QString descriptionFromName(
const QString &name );
1758 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1776 bool optional =
false );
1781 static QString
typeName() {
return QStringLiteral(
"boolean" ); }
1784 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1785 QString asScriptCode()
const override;
1805 QgsProcessingParameterCrs(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1806 bool optional =
false );
1811 static QString
typeName() {
return QStringLiteral(
"crs" ); }
1814 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1815 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1817 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1839 bool optional =
false );
1844 static QString
typeName() {
return QStringLiteral(
"extent" ); }
1847 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1848 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1850 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1872 QgsProcessingParameterPoint(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1873 bool optional =
false );
1878 static QString
typeName() {
return QStringLiteral(
"point" ); }
1881 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1882 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1908 QgsProcessingParameterGeometry(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
bool optional =
false,
const QList< int > &geometryTypes = QList< int >(),
bool allowMultipart =
true );
1913 static QString
typeName() {
return QStringLiteral(
"geometry" ); }
1916 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1917 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1918 QString asScriptCode()
const override;
1920 QVariantMap toVariantMap()
const override;
1921 bool fromVariantMap(
const QVariantMap &map )
override;
1956 QList<int> mGeomTypes;
1957 bool mAllowMultipart;
1978 bool optional =
false,
const QString &fileFilter = QString() );
1983 static QString
typeName() {
return QStringLiteral(
"file" ); }
1986 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1987 QString asScriptCode()
const override;
1989 QString createFileFilter()
const override;
2021 void setExtension(
const QString &extension );
2029 QString fileFilter()
const;
2040 void setFileFilter(
const QString &filter );
2042 QVariantMap toVariantMap()
const override;
2043 bool fromVariantMap(
const QVariantMap &map )
override;
2054 QString mFileFilter;
2070 bool hasFixedNumberRows =
false,
const QStringList &headers = QStringList(),
2071 const QVariant &defaultValue = QVariant(),
2072 bool optional =
false );
2077 static QString
typeName() {
return QStringLiteral(
"matrix" ); }
2080 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2081 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2088 QStringList headers()
const;
2094 void setHeaders(
const QStringList &headers );
2102 int numberRows()
const;
2110 void setNumberRows(
int rows );
2117 bool hasFixedNumberRows()
const;
2124 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2126 QVariantMap toVariantMap()
const override;
2127 bool fromVariantMap(
const QVariantMap &map )
override;
2136 QStringList mHeaders;
2137 int mNumberRows = 3;
2138 bool mFixedNumberRows =
false;
2155 const QVariant &defaultValue = QVariant(),
2156 bool optional =
false );
2161 static QString
typeName() {
return QStringLiteral(
"multilayer" ); }
2164 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2165 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2167 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2168 QString asScriptCode()
const override;
2170 QString createFileFilter()
const override;
2189 int minimumNumberInputs()
const;
2196 void setMinimumNumberInputs(
int minimum );
2198 QVariantMap toVariantMap()
const override;
2199 bool fromVariantMap(
const QVariantMap &map )
override;
2209 int mMinimumNumberInputs = 0;
2239 const QVariant &defaultValue = QVariant(),
2240 bool optional =
false,
2241 double minValue = std::numeric_limits<double>::lowest() + 1,
2242 double maxValue = std::numeric_limits<double>::max()
2248 static QString
typeName() {
return QStringLiteral(
"number" ); }
2251 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2252 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2253 QString toolTip()
const override;
2260 double minimum()
const;
2266 void setMinimum(
double minimum );
2272 double maximum()
const;
2278 void setMaximum(
double maximum );
2292 QVariantMap toVariantMap()
const override;
2293 bool fromVariantMap(
const QVariantMap &map )
override;
2302 double mMin = std::numeric_limits<double>::lowest() + 1;
2303 double mMax = std::numeric_limits<double>::max();
2334 const QVariant &defaultValue = QVariant(),
2335 const QString &parentParameterName = QString(),
2336 bool optional =
false,
2337 double minValue = std::numeric_limits<double>::lowest() + 1,
2338 double maxValue = std::numeric_limits<double>::max() );
2343 static QString
typeName() {
return QStringLiteral(
"distance" ); }
2347 QString type() const override;
2348 QStringList dependsOnOtherParameters() const override;
2349 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2355 QString parentParameterName() const;
2361 void setParentParameterName( const QString &parentParameterName );
2369 Qgis::DistanceUnit defaultUnit()
const {
return mDefaultUnit; }
2379 QVariantMap toVariantMap()
const override;
2380 bool fromVariantMap(
const QVariantMap &map )
override;
2384 QString mParentParameterName;
2404 const QVariant &defaultValue = QVariant(),
2405 bool optional =
false,
2406 double minValue = std::numeric_limits<double>::lowest() + 1,
2407 double maxValue = std::numeric_limits<double>::max() );
2412 static QString
typeName() {
return QStringLiteral(
"duration" ); }
2416 QString type() const override;
2417 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2424 Qgis::TemporalUnit defaultUnit()
const {
return mDefaultUnit; }
2433 QVariantMap toVariantMap()
const override;
2434 bool fromVariantMap(
const QVariantMap &map )
override;
2460 const QVariant &defaultValue = QVariant(),
2461 bool optional =
false );
2466 static QString
typeName() {
return QStringLiteral(
"scale" ); }
2470 QString type() const override;
2471 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2494 const QVariant &defaultValue = QVariant(),
2495 bool optional =
false );
2500 static QString
typeName() {
return QStringLiteral(
"range" ); }
2503 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2504 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2519 QVariantMap toVariantMap()
const override;
2520 bool fromVariantMap(
const QVariantMap &map )
override;
2545 bool optional =
false );
2550 static QString
typeName() {
return QStringLiteral(
"raster" ); }
2553 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2554 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2556 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2557 QString createFileFilter()
const override;
2590 QgsProcessingParameterEnum(
const QString &name,
const QString &description = QString(),
const QStringList &options = QStringList(),
2591 bool allowMultiple =
false,
2592 const QVariant &defaultValue = QVariant(),
2593 bool optional =
false,
2594 bool usesStaticStrings =
false );
2599 static QString
typeName() {
return QStringLiteral(
"enum" ); }
2602 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2603 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2604 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
2605 QString asScriptCode()
const override;
2612 QStringList options()
const;
2618 void setOptions(
const QStringList &options );
2624 bool allowMultiple()
const;
2630 void setAllowMultiple(
bool allowMultiple );
2638 bool usesStaticStrings()
const;
2646 void setUsesStaticStrings(
bool usesStaticStrings );
2648 QVariantMap toVariantMap()
const override;
2649 bool fromVariantMap(
const QVariantMap &map )
override;
2658 QStringList mOptions;
2659 bool mAllowMultiple =
false;
2660 bool mUsesStaticStrings =
false;
2697 bool multiLine =
false,
2698 bool optional =
false );
2703 static QString
typeName() {
return QStringLiteral(
"string" ); }
2706 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2707 QString asScriptCode()
const override;
2714 bool multiLine()
const;
2720 void setMultiLine(
bool multiLine );
2722 QVariantMap toVariantMap()
const override;
2723 bool fromVariantMap(
const QVariantMap &map )
override;
2732 bool mMultiLine =
false;
2757 bool optional =
false );
2762 static QString
typeName() {
return QStringLiteral(
"authcfg" ); }
2765 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2766 QString asScriptCode()
const override;
2788 const QString &parentLayerParameterName = QString(),
2794 static QString
typeName() {
return QStringLiteral(
"expression" ); }
2797 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2798 QStringList dependsOnOtherParameters()
const override;
2805 QString parentLayerParameterName()
const;
2811 void setParentLayerParameterName(
const QString &parentLayerParameterName );
2829 QVariantMap toVariantMap()
const override;
2830 bool fromVariantMap(
const QVariantMap &map )
override;
2839 QString mParentLayerParameterName;
2862 QList< int > dataTypes()
const;
2868 void setDataTypes(
const QList< int > &types );
2890 const QString &description = QString(),
2891 const QList< int > &types = QList< int >(),
2892 const QVariant &defaultValue = QVariant(),
2893 bool optional =
false );
2898 static QString
typeName() {
return QStringLiteral(
"vector" ); }
2901 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2902 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2904 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2906 QString createFileFilter()
const override;
2908 QVariantMap toVariantMap()
const override;
2909 bool fromVariantMap(
const QVariantMap &map )
override;
2932 const QString &description = QString(),
2933 const QVariant &defaultValue = QVariant(),
2934 bool optional =
false );
2939 static QString
typeName() {
return QStringLiteral(
"mesh" ); }
2942 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2943 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2945 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2946 QString createFileFilter()
const override;
2967 bool optional =
false,
2968 const QList< int > &types = QList< int >() );
2973 static QString
typeName() {
return QStringLiteral(
"layer" ); }
2976 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2977 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2979 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2980 QString asScriptCode()
const override;
2982 QString createFileFilter()
const override;
2984 QVariantMap toVariantMap()
const override;
2985 bool fromVariantMap(
const QVariantMap &map )
override;
3006 QgsProcessingParameterField(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3007 const QString &parentLayerParameterName = QString(),
3009 bool allowMultiple =
false,
3010 bool optional =
false,
3011 bool defaultToAllFields =
false );
3016 static QString
typeName() {
return QStringLiteral(
"field" ); }
3019 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3020 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3021 QString asScriptCode()
const override;
3023 QStringList dependsOnOtherParameters()
const override;
3029 QString parentLayerParameterName()
const;
3035 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3053 bool allowMultiple()
const;
3059 void setAllowMultiple(
bool allowMultiple );
3070 bool defaultToAllFields()
const;
3081 void setDefaultToAllFields(
bool enabled );
3083 QVariantMap toVariantMap()
const override;
3084 bool fromVariantMap(
const QVariantMap &map )
override;
3093 QString mParentLayerParameterName;
3095 bool mAllowMultiple =
false;
3096 bool mDefaultToAllFields =
false;
3114 const QList< int > &types = QList< int >(),
3115 const QVariant &defaultValue = QVariant(),
bool optional =
false );
3120 static QString
typeName() {
return QStringLiteral(
"source" ); }
3123 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3124 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3126 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3127 QString asScriptCode()
const override;
3129 QString createFileFilter()
const override;
3131 QVariantMap toVariantMap()
const override;
3132 bool fromVariantMap(
const QVariantMap &map )
override;
3158 bool optional =
false,
bool createByDefault =
true );
3161 QVariantMap toVariantMap()
const override;
3162 bool fromVariantMap(
const QVariantMap &map )
override;
3164 QString createFileFilter()
const override;
3197 virtual QString generateTemporaryDestination(
const QgsProcessingContext *context =
nullptr )
const;
3220 bool createByDefault()
const;
3227 void setCreateByDefault(
bool createByDefault );
3252 bool mSupportsNonFileBasedOutputs =
true;
3253 bool mCreateByDefault =
true;
3255 friend class QgsProcessingModelAlgorithm;
3256 friend class TestQgsProcessing;
3257 friend class TestQgsProcessingModelAlgorithm;
3279 bool optional =
false,
bool createByDefault =
true,
bool supportsAppend =
false );
3284 static QString
typeName() {
return QStringLiteral(
"sink" ); }
3287 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3288 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3289 QString asScriptCode()
const override;
3291 QString defaultFileExtension() const override;
3292 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3293 QString createFileFilter() const override;
3300 virtual QStringList supportedOutputVectorLayerExtensions() const;
3306 Qgis::ProcessingSourceType dataType() const;
3312 bool hasGeometry() const;
3318 void setDataType(
Qgis::ProcessingSourceType type );
3328 bool supportsAppend() const;
3338 void setSupportsAppend(
bool supportsAppend );
3340 QVariantMap toVariantMap() const override;
3341 bool fromVariantMap( const QVariantMap &map ) override;
3342 QString generateTemporaryDestination( const
QgsProcessingContext *context =
nullptr ) const override;
3351 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3352 bool mSupportsAppend = false;
3376 bool optional =
false,
bool createByDefault =
true );
3381 static QString
typeName() {
return QStringLiteral(
"vectorDestination" ); }
3384 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3385 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3386 QString asScriptCode()
const override;
3388 QString defaultFileExtension() const override;
3389 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3390 QString createFileFilter() const override;
3397 virtual QStringList supportedOutputVectorLayerExtensions() const;
3403 Qgis::ProcessingSourceType dataType() const;
3409 bool hasGeometry() const;
3415 void setDataType(
Qgis::ProcessingSourceType type );
3417 QVariantMap toVariantMap() const override;
3418 bool fromVariantMap( const QVariantMap &map ) override;
3428 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3448 const QVariant &defaultValue = QVariant(),
3449 bool optional =
false,
3450 bool createByDefault =
true );
3455 static QString
typeName() {
return QStringLiteral(
"rasterDestination" ); }
3458 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3459 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3461 QString defaultFileExtension() const override;
3462 QString createFileFilter() const override;
3469 virtual QStringList supportedOutputRasterLayerExtensions() const;
3508 const QString &fileFilter = QString(),
3509 const QVariant &defaultValue = QVariant(),
3510 bool optional =
false,
3511 bool createByDefault =
true );
3516 static QString
typeName() {
return QStringLiteral(
"fileDestination" ); }
3519 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3520 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3522 QString defaultFileExtension() const override;
3523 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3524 QString createFileFilter() const override;
3530 QString fileFilter() const;
3536 void setFileFilter( const QString &filter );
3538 QVariantMap toVariantMap() const override;
3539 bool fromVariantMap( const QVariantMap &map ) override;
3549 QString mFileFilter;
3566 const QVariant &defaultValue = QVariant(),
3567 bool optional =
false,
3568 bool createByDefault =
true );
3573 static QString
typeName() {
return QStringLiteral(
"folderDestination" ); }
3576 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3578 QString defaultFileExtension() const override;
3599 QgsProcessingParameterBand(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3600 const QString &parentLayerParameterName = QString(),
3601 bool optional =
false,
3602 bool allowMultiple =
false );
3607 static QString
typeName() {
return QStringLiteral(
"band" ); }
3610 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3611 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3612 QString asScriptCode()
const override;
3613 QStringList dependsOnOtherParameters()
const override;
3620 QString parentLayerParameterName()
const;
3626 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3628 QVariantMap toVariantMap()
const override;
3629 bool fromVariantMap(
const QVariantMap &map )
override;
3641 bool allowMultiple()
const;
3648 void setAllowMultiple(
bool allowMultiple );
3652 QString mParentLayerParameterName;
3653 bool mAllowMultiple =
false;
3675 bool optional =
false );
3680 static QString
typeName() {
return QStringLiteral(
"layout" ); }
3683 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3684 QString asScriptCode()
const override;
3713 const QString &parentLayoutParameterName = QString(),
3715 bool optional =
false );
3720 static QString
typeName() {
return QStringLiteral(
"layoutitem" ); }
3723 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3724 QString asScriptCode()
const override;
3726 QVariantMap toVariantMap()
const override;
3727 bool fromVariantMap(
const QVariantMap &map )
override;
3728 QStringList dependsOnOtherParameters()
const override;
3739 QString parentLayoutParameterName()
const;
3745 void setParentLayoutParameterName(
const QString &name );
3754 int itemType()
const;
3763 void setItemType(
int type );
3766 QString mParentLayoutParameterName;
3788 QgsProcessingParameterColor(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3789 bool opacityEnabled =
true,
3790 bool optional =
false );
3795 static QString
typeName() {
return QStringLiteral(
"color" ); }
3798 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3799 QString asScriptCode()
const override;
3801 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3802 QVariantMap toVariantMap()
const override;
3803 bool fromVariantMap(
const QVariantMap &map )
override;
3811 bool opacityEnabled()
const;
3820 void setOpacityEnabled(
bool enabled );
3829 bool mAllowOpacity =
true;
3851 const QString &sourceCrsParameterName = QString(),
const QString &destinationCrsParameterName = QString(),
3852 const QVariant &staticSourceCrs = QVariant(),
const QVariant &staticDestinationCrs = QVariant(),
3853 bool optional =
false );
3858 static QString
typeName() {
return QStringLiteral(
"coordinateoperation" ); }
3861 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3862 QString asScriptCode()
const override;
3864 QStringList dependsOnOtherParameters()
const override;
3866 QVariantMap toVariantMap()
const override;
3867 bool fromVariantMap(
const QVariantMap &map )
override;
3932 QString mSourceParameterName;
3933 QString mDestParameterName;
3934 QVariant mSourceCrs;
3957 bool optional =
false );
3962 static QString
typeName() {
return QStringLiteral(
"maptheme" ); }
3965 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3966 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3967 QString asScriptCode()
const override;
3969 QVariantMap toVariantMap()
const override;
3970 bool fromVariantMap(
const QVariantMap &map )
override;
4001 const QVariant &defaultValue = QVariant(),
4002 bool optional =
false,
4003 const QDateTime &minValue = QDateTime(),
4004 const QDateTime &maxValue = QDateTime()
4010 static QString
typeName() {
return QStringLiteral(
"datetime" ); }
4013 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4014 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4015 QString toolTip()
const override;
4025 QDateTime minimum()
const;
4038 void setMinimum(
const QDateTime &minimum );
4047 QDateTime maximum()
const;
4060 void setMaximum(
const QDateTime &maximum );
4074 QVariantMap toVariantMap()
const override;
4075 bool fromVariantMap(
const QVariantMap &map )
override;
4111 bool optional =
false );
4116 static QString
typeName() {
return QStringLiteral(
"providerconnection" ); }
4119 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4120 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4121 QString asScriptCode()
const override;
4123 QVariantMap toVariantMap()
const override;
4124 bool fromVariantMap(
const QVariantMap &map )
override;
4145 QString mProviderId;
4171 QgsProcessingParameterDatabaseSchema(
const QString &name,
const QString &description,
const QString &connectionParameterName = QString(),
const QVariant &defaultValue = QVariant(),
4172 bool optional =
false );
4177 static QString
typeName() {
return QStringLiteral(
"databaseschema" ); }
4180 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4181 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4182 QString asScriptCode()
const override;
4184 QVariantMap toVariantMap()
const override;
4185 bool fromVariantMap(
const QVariantMap &map )
override;
4186 QStringList dependsOnOtherParameters()
const override;
4192 QString parentConnectionParameterName()
const;
4198 void setParentConnectionParameterName(
const QString &name );
4207 QString mParentConnectionParameterName;
4235 const QString &connectionParameterName = QString(),
4236 const QString &schemaParameterName = QString(),
4237 const QVariant &defaultValue = QVariant(),
4238 bool optional =
false,
4239 bool allowNewTableNames =
false );
4244 static QString
typeName() {
return QStringLiteral(
"databasetable" ); }
4247 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4248 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4249 QString asScriptCode()
const override;
4251 QVariantMap toVariantMap()
const override;
4252 bool fromVariantMap(
const QVariantMap &map )
override;
4253 QStringList dependsOnOtherParameters()
const override;
4259 QString parentConnectionParameterName()
const;
4265 void setParentConnectionParameterName(
const QString &name );
4271 QString parentSchemaParameterName()
const;
4277 void setParentSchemaParameterName(
const QString &name );
4290 bool allowNewTableNames()
const;
4298 void setAllowNewTableNames(
bool allowed );
4302 QString mParentConnectionParameterName;
4303 QString mParentSchemaParameterName;
4304 bool mAllowNewTableNames =
false;
4322 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4327 static QString
typeName() {
return QStringLiteral(
"pointcloud" ); }
4330 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4331 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4333 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4334 QString createFileFilter()
const override;
4357 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4362 static QString
typeName() {
return QStringLiteral(
"annotation" ); }
4365 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4366 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4368 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4394 const QVariant &defaultValue = QVariant(),
4395 bool optional =
false,
4396 bool createByDefault =
true );
4401 static QString
typeName() {
return QStringLiteral(
"pointCloudDestination" ); }
4404 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4405 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4407 QString defaultFileExtension() const override;
4408 QString createFileFilter() const override;
4414 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
4436 const QString &parentLayerParameterName = QString(),
4437 bool allowMultiple =
false,
4438 bool optional =
false,
4439 bool defaultToAllAttributes =
false );
4444 static QString
typeName() {
return QStringLiteral(
"attribute" ); }
4447 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4448 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4449 QString asScriptCode()
const override;
4451 QStringList dependsOnOtherParameters()
const override;
4457 QString parentLayerParameterName()
const;
4463 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4469 bool allowMultiple()
const;
4475 void setAllowMultiple(
bool allowMultiple );
4485 bool defaultToAllAttributes()
const;
4495 void setDefaultToAllAttributes(
bool enabled );
4497 QVariantMap toVariantMap()
const override;
4498 bool fromVariantMap(
const QVariantMap &map )
override;
4507 QString mParentLayerParameterName;
4508 bool mAllowMultiple =
false;
4509 bool mDefaultToAllAttributes =
false;
4530 const QVariant &defaultValue = QVariant(),
4531 bool optional =
false,
4532 bool createByDefault =
true );
4537 static QString
typeName() {
return QStringLiteral(
"vectorTileDestination" ); }
4540 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4541 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4543 QString defaultFileExtension() const override;
4544 QString createFileFilter() const override;
4550 virtual QStringList supportedOutputVectorTileLayerExtensions() const;
The Qgis class provides global constants for use throughout the application.
ProcessingSourceType
Processing data source types.
@ VectorAnyGeometry
Any vector layer with geometry.
ProcessingFileParameterBehavior
Flags which dictate the behavior of QgsProcessingParameterFile.
@ File
Parameter is a single file.
ExpressionType
Expression types.
@ Qgis
Native QGIS expression.
DistanceUnit
Units of distance.
@ Unknown
Unknown distance unit.
ProcessingFieldParameterDataType
Processing field parameter data types.
TemporalUnit
Temporal units.
@ Milliseconds
Milliseconds.
InvalidGeometryCheck
Methods for handling of features with invalid geometries.
@ AbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
WkbType
The WKB type describes the number of dimensions a geometry has.
ProcessingDateTimeParameterDataType
Processing date time parameter data types.
@ DateTime
Datetime values.
ProcessingNumberParameterType
Processing numeric parameter data types.
Represents a map layer containing a set of georeferenced annotations, e.g.
This class represents a coordinate reference system (CRS).
An interface for objects which accept features via addFeature(s) methods.
Container of fields for a vector layer.
Abstract interface for classes which generate a file filter string.
A geometry is the spatial representation of a feature.
Base class for graphical items within a QgsLayout.
Base class for all map layer types.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Represents a map layer supporting display of point clouds.
A class to represent a 2D point.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Abstract base class for processing algorithms.
Contains information about the context in which a processing algorithm is executed.
Base class for all parameter definitions which represent file or layer destinations,...
virtual QString defaultFileExtension() const =0
Returns the default file extension for destination file paths associated with this parameter.
bool supportsNonFileBasedOutput() const
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or ...
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
virtual QgsProcessingOutputDefinition * toOutputDefinition() const =0
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parame...
QgsProcessingProvider * originalProvider() const
Original (source) provider which this parameter has been derived from.
void setSupportsNonFileBasedOutput(bool supportsNonFileBasedOutput)
Sets whether the destination parameter supports non filed-based outputs, such as memory layers or dir...
Custom exception class for processing related exceptions.
Encapsulates settings relating to a feature source input to a processing algorithm.
bool operator!=(const QgsProcessingFeatureSourceDefinition &other) const
bool selectedFeaturesOnly
true if only selected features in the source should be used by algorithms.
bool operator==(const QgsProcessingFeatureSourceDefinition &other) const
QgsProperty source
Source definition.
Qgis::InvalidGeometryCheck geometryCheck
Geometry check method to apply to this source.
QgsProcessingFeatureSourceDefinition(const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, Qgis::ProcessingFeatureSourceDefinitionFlags flags=Qgis::ProcessingFeatureSourceDefinitionFlags(), Qgis::InvalidGeometryCheck geometryCheck=Qgis::InvalidGeometryCheck::AbortOnInvalid, const QString &filterExpression=QString())
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.
QgsProcessingFeatureSourceDefinition(const QString &source=QString(), bool selectedFeaturesOnly=false, long long featureLimit=-1, Qgis::ProcessingFeatureSourceDefinitionFlags flags=Qgis::ProcessingFeatureSourceDefinitionFlags(), Qgis::InvalidGeometryCheck geometryCheck=Qgis::InvalidGeometryCheck::AbortOnInvalid, const QString &filterExpression=QString())
Constructor for QgsProcessingFeatureSourceDefinition, accepting a static string source.
Qgis::ProcessingFeatureSourceDefinitionFlags flags
Flags which dictate source behavior.
long long featureLimit
If set to a value > 0, places a limit on the maximum number of features which will be read from the s...
QString filterExpression
Optional expression filter to use for filtering features which will be read from the source.
QgsFeatureSource subclass which proxies methods to an underlying QgsFeatureSource,...
Base class for providing feedback from a processing algorithm.
Base class for the definition of processing outputs.
Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm.
QgsProcessingOutputLayerDefinition(const QgsProperty &sink, QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer.
QgsProperty sink
Sink/layer definition.
bool useRemapping() const
Returns true if the output uses a remapping definition.
QgsProcessingOutputLayerDefinition(const QString &sink=QString(), QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string.
QgsRemappingSinkDefinition remappingDefinition() const
Returns the output remapping definition, if useRemapping() is true.
QString destinationName
Name to use for sink if it's to be loaded into a destination project.
QVariantMap createOptions
Map of optional sink/layer creation options, which are passed to the underlying provider when creatin...
An annotation layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for authentication configuration ID values.
static QString typeName()
Returns the type name for the parameter class.
A raster band parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A boolean parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A color parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A coordinate operation parameter for processing algorithms, for selection between available coordinat...
static QString typeName()
Returns the type name for the parameter class.
QVariant sourceCrs() const
Returns the static source CRS, or an invalid value if this is not set.
QString destinationCrsParameterName() const
Returns the name of the destination CRS parameter, or an empty string if this is not set.
void setDestinationCrsParameterName(const QString &name)
Sets the name of the destination CRS parameter.
void setSourceCrs(const QVariant &crs)
Sets the static source crs.
QVariant destinationCrs() const
Returns the static destination CRS, or an invalid value if this is not set.
void setDestinationCrs(const QVariant &crs)
Sets the static destination crs.
void setSourceCrsParameterName(const QString &name)
Sets the name of the source CRS parameter.
QString sourceCrsParameterName() const
Returns the name of the source CRS parameter, or an empty string if this is not set.
A coordinate reference system parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A database schema parameter for processing algorithms, allowing users to select from existing schemas...
static QString typeName()
Returns the type name for the parameter class.
A database table name parameter for processing algorithms, allowing users to select from existing dat...
static QString typeName()
Returns the type name for the parameter class.
A datetime (or pure date or time) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
Base class for the definition of processing parameters.
QString mHelp
Parameter help.
QVariant defaultValue() const
Returns the default value for the parameter.
void setDefaultValue(const QVariant &value)
Sets the default value for the parameter.
QStringList additionalExpressionContextVariables() const
Returns a list of additional expression context variables which are available for use when evaluating...
QStringList mAdditionalExpressionVariables
Additional expression context variables exposed for use by this parameter.
QString help() const
Returns the help for the parameter.
Qgis::ProcessingParameterFlags mFlags
Parameter flags.
void setMetadata(const QVariantMap &metadata)
Sets the parameter's freeform metadata.
void setFlags(Qgis::ProcessingParameterFlags flags)
Sets the flags associated with the parameter.
ValueAsStringFlag
Flags for passing to the valueAsStringPrivate() method.
QString mName
Parameter name.
void setGuiDefaultValueOverride(const QVariant &value)
Sets the default value to use for the parameter in GUI widgets.
QVariantMap metadata() const
Returns the parameter's freeform metadata.
QString description() const
Returns the description for the parameter.
QString mDynamicLayerParameterName
Linked vector layer parameter name for dynamic properties.
virtual bool isDestination() const
Returns true if this parameter represents a file or layer destination, e.g.
void setDescription(const QString &description)
Sets the description for the parameter.
void setDynamicLayerParameterName(const QString &name)
Sets the name for the parameter for a layer linked to a dynamic parameter, or an empty string if this...
QString dynamicLayerParameterName() const
Returns the name of the parameter for a layer linked to a dynamic parameter, or an empty string if th...
void setAdditionalExpressionContextVariables(const QStringList &variables)
Sets a list of additional expression context variables which are available for use when evaluating th...
QVariantMap mMetadata
Freeform metadata for parameter. Mostly used by widget wrappers to customize their appearance and beh...
void setName(const QString &name)
Sets the name of the parameter.
QString mDescription
Parameter description.
virtual QgsProcessingParameterDefinition * clone() const =0
Creates a clone of the parameter definition.
virtual QString type() const =0
Unique parameter type name.
void setDynamicPropertyDefinition(const QgsPropertyDefinition &definition)
Sets the property definition for dynamic properties.
void setHelp(const QString &help)
Sets the help for the parameter.
QString name() const
Returns the name of the parameter.
QVariant mDefault
Default value for parameter.
virtual QStringList dependsOnOtherParameters() const
Returns a list of other parameter names on which this parameter is dependent (e.g.
void setIsDynamic(bool dynamic)
Sets whether the parameter is dynamic, and can support data-defined values (i.e.
Qgis::ProcessingParameterFlags flags() const
Returns any flags associated with the parameter.
QVariant mGuiDefault
Default value for parameter in GUI.
QgsPropertyDefinition mPropertyDefinition
Data defined property definition.
bool isDynamic() const
Returns true if the parameter supports is dynamic, and can support data-defined values (i....
virtual ~QgsProcessingParameterDefinition()=default
QVariantMap & metadata()
Returns the parameter's freeform metadata.
QgsPropertyDefinition dynamicPropertyDefinition() const
Returns the property definition for dynamic properties.
A double numeric parameter for distance values.
static QString typeName()
Returns the type name for the parameter class.
void setDefaultUnit(Qgis::DistanceUnit unit)
Sets the default distance unit for the parameter.
A double numeric parameter for duration values.
void setDefaultUnit(Qgis::TemporalUnit unit)
Sets the default duration unit for the parameter.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
static QString typeName()
Returns the type name for the parameter class.
An expression parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A rectangular map extent parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A feature sink output for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
An input feature source (such as vector layers) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A vector layer or feature source field parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
static QString typeName()
Returns the type name for the parameter class.
An input file or folder parameter for processing algorithms.
QString extension() const
Returns any specified file extension for the parameter.
static QString typeName()
Returns the type name for the parameter class.
void setBehavior(Qgis::ProcessingFileParameterBehavior behavior)
Sets the parameter behavior (e.g.
Qgis::ProcessingFileParameterBehavior behavior() const
Returns the parameter behavior (e.g.
A folder destination parameter, for specifying the destination path for a folder created by the algor...
static QString typeName()
Returns the type name for the parameter class.
A geometry parameter for processing algorithms.
void setGeometryTypes(const QList< int > &geometryTypes)
Sets the allowed geometryTypes, as a list of Qgis::GeometryType values.
bool allowMultipart() const
Returns the parameter allow multipart geometries.
QList< int > geometryTypes() const
Returns the parameter allowed geometries, as a list of Qgis::GeometryType values.
void setAllowMultipart(bool allowMultipart)
Sets the allow multipart geometries.
static QString typeName()
Returns the type name for the parameter class.
A print layout item parameter, allowing users to select a particular item from a print layout.
static QString typeName()
Returns the type name for the parameter class.
A print layout parameter, allowing users to select a print layout.
static QString typeName()
Returns the type name for the parameter class.
Can be inherited by parameters which require limits to their acceptable data types.
QList< int > mDataTypes
List of acceptable data types for the parameter.
A map layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A map theme parameter for processing algorithms, allowing users to select an existing map theme from ...
static QString typeName()
Returns the type name for the parameter class.
A table (matrix) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A mesh layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A parameter for processing algorithms which accepts multiple map layers.
static QString typeName()
Returns the type name for the parameter class.
A numeric parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer attribute parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer destination parameter, for specifying the destination path for a point cloud laye...
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A data provider connection parameter for processing algorithms, allowing users to select from availab...
static QString typeName()
Returns the type name for the parameter class.
void setProviderId(const QString &provider)
Sets the ID of the provider associated with the connections.
QString providerId() const
Returns the ID of the provider associated with the connections.
A numeric range parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
static QString typeName()
Returns the type name for the parameter class.
A raster layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for map scale values.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector layer destination parameter, for specifying the destination path for a vector layer created ...
static QString typeName()
Returns the type name for the parameter class.
A vector layer (with or without geometry) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector tile layer destination parameter, for specifying the destination path for a vector tile laye...
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A collection of utilities for working with parameters when running a processing algorithm.
Abstract base class for processing providers.
LayerHint
Layer type hints.
@ UnknownType
Unknown layer type.
Contains enumerations and other constants for use in processing algorithms and parameters.
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition for a property.
A store for object properties.
Represents a raster layer.
A rectangle specified with double values.
Defines the parameters used to remap features when creating a QgsRemappingProxyFeatureSink.
Represents a vector layer which manages a vector based data sets.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
#define SIP_THROW(name,...)
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)
const QgsCoordinateReferenceSystem & crs