18#ifndef QGSPROCESSINGPARAMETERS_H
19#define QGSPROCESSINGPARAMETERS_H
36using namespace Qt::StringLiterals;
81 const QString &
source = QString(),
199 operator QVariant()
const {
return QVariant::fromValue( *
this ); }
280 operator QVariant()
const {
return QVariant::fromValue( *
this ); }
376 QString
format()
const {
return mFormat; }
393 QVariant toVariant()
const;
401 bool loadVariant(
const QVariantMap &map );
404 operator QVariant()
const {
return QVariant::fromValue( *
this ); }
411 bool mUseRemapping =
false;
450 sipType = sipType_QgsProcessingParameterBoolean;
452 sipType = sipType_QgsProcessingParameterCrs;
454 sipType = sipType_QgsProcessingParameterMapLayer;
456 sipType = sipType_QgsProcessingParameterExtent;
458 sipType = sipType_QgsProcessingParameterPoint;
460 sipType = sipType_QgsProcessingParameterGeometry;
462 sipType = sipType_QgsProcessingParameterFile;
464 sipType = sipType_QgsProcessingParameterMatrix;
466 sipType = sipType_QgsProcessingParameterMultipleLayers;
468 sipType = sipType_QgsProcessingParameterNumber;
470 sipType = sipType_QgsProcessingParameterDistance;
472 sipType = sipType_QgsProcessingParameterArea;
474 sipType = sipType_QgsProcessingParameterVolume;
476 sipType = sipType_QgsProcessingParameterDuration;
478 sipType = sipType_QgsProcessingParameterScale;
480 sipType = sipType_QgsProcessingParameterRange;
482 sipType = sipType_QgsProcessingParameterRasterLayer;
484 sipType = sipType_QgsProcessingParameterMeshLayer;
486 sipType = sipType_QgsProcessingParameterEnum;
488 sipType = sipType_QgsProcessingParameterString;
490 sipType = sipType_QgsProcessingParameterExpression;
492 sipType = sipType_QgsProcessingParameterAuthConfig;
494 sipType = sipType_QgsProcessingParameterVectorLayer;
496 sipType = sipType_QgsProcessingParameterField;
498 sipType = sipType_QgsProcessingParameterFeatureSource;
500 sipType = sipType_QgsProcessingParameterFeatureSink;
502 sipType = sipType_QgsProcessingParameterVectorDestination;
504 sipType = sipType_QgsProcessingParameterRasterDestination;
506 sipType = sipType_QgsProcessingParameterPointCloudDestination;
508 sipType = sipType_QgsProcessingParameterFileDestination;
510 sipType = sipType_QgsProcessingParameterFolderDestination;
512 sipType = sipType_QgsProcessingParameterBand;
514 sipType = sipType_QgsProcessingParameterLayout;
516 sipType = sipType_QgsProcessingParameterLayoutItem;
518 sipType = sipType_QgsProcessingParameterColor;
520 sipType = sipType_QgsProcessingParameterCoordinateOperation;
522 sipType = sipType_QgsProcessingParameterMapTheme;
524 sipType = sipType_QgsProcessingParameterDateTime;
526 sipType = sipType_QgsProcessingParameterProviderConnection;
528 sipType = sipType_QgsProcessingParameterDatabaseSchema;
530 sipType = sipType_QgsProcessingParameterDatabaseTable;
532 sipType = sipType_QgsProcessingParameterFieldMapping;
534 sipType = sipType_QgsProcessingParameterTinInputLayers;
536 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
538 sipType = sipType_QgsProcessingParameterDxfLayers;
540 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
542 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
544 sipType = sipType_QgsProcessingParameterPointCloudLayer;
546 sipType = sipType_QgsProcessingParameterAnnotationLayer;
548 sipType = sipType_QgsProcessingParameterPointCloudAttribute;
550 sipType = sipType_QgsProcessingParameterVectorTileDestination;
552 sipType = sipType_QgsProcessingParameterInterpolationPixelSize;
554 sipType = sipType_QgsProcessingParameterTileExtentMaxZoomList;
595 virtual QString
type()
const = 0;
682 QVariant guiDefaultValueOverride()
const;
709 QVariant defaultValueForGui()
const;
730 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
739 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
752 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
789 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
795 virtual QString asScriptCode()
const;
813 virtual QVariantMap toVariantMap()
const;
820 virtual bool fromVariantMap(
const QVariantMap &map );
868 virtual QString toolTip()
const;
975 AllowMapLayerValues = 1 << 0,
1079 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1286 const QVariantMap ¶meters,
1291 QString &destinationIdentifier
SIP_OUT,
1293 const QVariantMap &createOptions = QVariantMap(),
1294 const QStringList &datasourceOptions = QStringList(),
1295 const QStringList &layerOptions = QStringList()
1319 const QVariant &value,
1324 QString &destinationIdentifier
SIP_OUT,
1326 const QVariantMap &createOptions = QVariantMap(),
1327 const QStringList &datasourceOptions = QStringList(),
1328 const QStringList &layerOptions = QStringList()
1370 const QVariantMap ¶meters,
1372 const QStringList &compatibleFormats,
1373 const QString &preferredFormat = QString(
"shp" ),
1408 const QVariantMap ¶meters,
1410 const QStringList &compatibleFormats,
1411 const QString &preferredFormat = QString(
"shp" ),
1413 QString *layerName
SIP_OUT =
nullptr
1425 const QVariantMap ¶meters,
1442 const QVariant &value,
1955 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1978 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1979 QString asScriptCode()
const override;
2008 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2009 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2011 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2038 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2039 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2041 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2054 static bool variantIsValidStringForExtent(
const QVariant &value );
2077 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2078 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2112 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2113 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2114 QString asScriptCode()
const override;
2116 QVariantMap toVariantMap()
const override;
2117 bool fromVariantMap(
const QVariantMap &map )
override;
2143 QString userFriendlyString(
const QVariant &value )
const override;
2151 QList<int> mGeomTypes;
2152 bool mAllowMultipart;
2171 const QString &
name,
2176 bool optional =
false,
2186 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2187 QString asScriptCode()
const override;
2189 QString createFileFilter()
const override;
2221 void setExtension(
const QString &extension );
2229 QString fileFilter()
const;
2240 void setFileFilter(
const QString &filter );
2242 QVariantMap toVariantMap()
const override;
2243 bool fromVariantMap(
const QVariantMap &map )
override;
2255 QString mFileFilter;
2270 const QString &
name,
2274 const QStringList &
headers = QStringList(),
2276 bool optional =
false
2286 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2287 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2294 QStringList headers()
const;
2300 void setHeaders(
const QStringList &headers );
2308 int numberRows()
const;
2316 void setNumberRows(
int rows );
2323 bool hasFixedNumberRows()
const;
2330 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2332 QVariantMap toVariantMap()
const override;
2333 bool fromVariantMap(
const QVariantMap &map )
override;
2341 QStringList mHeaders;
2342 int mNumberRows = 3;
2343 bool mFixedNumberRows =
false;
2358 const QString &
name,
2362 bool optional =
false
2371 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2372 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2374 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2375 QString asScriptCode()
const override;
2377 QString createFileFilter()
const override;
2396 int minimumNumberInputs()
const;
2403 void setMinimumNumberInputs(
int minimum );
2405 QVariantMap toVariantMap()
const override;
2406 bool fromVariantMap(
const QVariantMap &map )
override;
2415 int mMinimumNumberInputs = 0;
2442 const QString &
name,
2446 bool optional =
false,
2447 double minValue = std::numeric_limits<double>::lowest() + 1,
2448 double maxValue = std::numeric_limits<double>::max()
2458 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2459 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2460 QString toolTip()
const override;
2467 double minimum()
const;
2473 void setMinimum(
double minimum );
2479 double maximum()
const;
2485 void setMaximum(
double maximum );
2499 QVariantMap toVariantMap()
const override;
2500 bool fromVariantMap(
const QVariantMap &map )
override;
2508 double mMin = std::numeric_limits<double>::lowest() + 1;
2509 double mMax = std::numeric_limits<double>::max();
2541 const QString &
name,
2545 bool optional =
false,
2546 double minValue = std::numeric_limits<double>::lowest() + 1,
2547 double maxValue = std::numeric_limits<double>::max()
2555 QString userFriendlyString(
const QVariant &value )
const override;
2559 QString type() const override;
2560 QStringList dependsOnOtherParameters() const override;
2561 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2567 QString parentParameterName() const;
2573 void setParentParameterName( const QString &parentParameterName );
2591 QVariantMap toVariantMap()
const override;
2592 bool fromVariantMap(
const QVariantMap &map )
override;
2595 QString mParentParameterName;
2628 const QString &
name,
2632 bool optional =
false,
2633 double minValue = 0,
2634 double maxValue = std::numeric_limits<double>::max()
2644 QString type() const override;
2645 QStringList dependsOnOtherParameters() const override;
2646 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2652 QString parentParameterName() const;
2658 void setParentParameterName( const QString &parentParameterName );
2674 QVariantMap toVariantMap()
const override;
2675 bool fromVariantMap(
const QVariantMap &map )
override;
2676 QString userFriendlyString(
const QVariant &value )
const override;
2679 QString mParentParameterName;
2712 const QString &
name,
2716 bool optional =
false,
2717 double minValue = 0,
2718 double maxValue = std::numeric_limits<double>::max()
2728 QString type() const override;
2729 QStringList dependsOnOtherParameters() const override;
2730 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2736 QString parentParameterName() const;
2742 void setParentParameterName( const QString &parentParameterName );
2758 QVariantMap toVariantMap()
const override;
2759 bool fromVariantMap(
const QVariantMap &map )
override;
2760 QString userFriendlyString(
const QVariant &value )
const override;
2763 QString mParentParameterName;
2783 const QString &
name,
2786 bool optional =
false,
2787 double minValue = std::numeric_limits<double>::lowest() + 1,
2788 double maxValue = std::numeric_limits<double>::max()
2798 QString type() const override;
2799 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2815 QVariantMap toVariantMap()
const override;
2816 bool fromVariantMap(
const QVariantMap &map )
override;
2817 QString userFriendlyString(
const QVariant &value )
const override;
2848 QString type() const override;
2849 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2869 const QString &
name,
2873 bool optional =
false
2883 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2884 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2899 QVariantMap toVariantMap()
const override;
2900 bool fromVariantMap(
const QVariantMap &map )
override;
2930 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2931 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2933 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2934 QString createFileFilter()
const override;
2983 const QString &
name,
2985 const QStringList &
options = QStringList(),
2988 bool optional =
false,
3000 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3001 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3002 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
3003 QString asScriptCode()
const override;
3010 QStringList options()
const;
3016 void setOptions(
const QStringList &options );
3022 bool allowMultiple()
const;
3028 void setAllowMultiple(
bool allowMultiple );
3036 bool usesStaticStrings()
const;
3044 void setUsesStaticStrings(
bool usesStaticStrings );
3046 QVariantMap toVariantMap()
const override;
3047 bool fromVariantMap(
const QVariantMap &map )
override;
3055 QStringList mOptions;
3056 bool mAllowMultiple =
false;
3057 bool mUsesStaticStrings =
false;
3100 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3101 QString asScriptCode()
const override;
3108 bool multiLine()
const;
3114 void setMultiLine(
bool multiLine );
3116 QVariantMap toVariantMap()
const override;
3117 bool fromVariantMap(
const QVariantMap &map )
override;
3125 bool mMultiLine =
false;
3155 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3156 QString asScriptCode()
const override;
3176 const QString &
name,
3180 bool optional =
false,
3190 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3191 QStringList dependsOnOtherParameters()
const override;
3198 QString parentLayerParameterName()
const;
3204 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3222 QVariantMap toVariantMap()
const override;
3223 bool fromVariantMap(
const QVariantMap &map )
override;
3231 QString mParentLayerParameterName;
3280 const QString &
name,
const QString &
description = QString(),
const QList< int > &types = QList< int >(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
3289 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3290 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3292 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3294 QString createFileFilter()
const override;
3296 QVariantMap toVariantMap()
const override;
3297 bool fromVariantMap(
const QVariantMap &map )
override;
3325 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3326 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3328 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3329 QString createFileFilter()
const override;
3349 const QString &
name,
const QString &
description = QString(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false,
const QList< int > &types = QList< int >()
3358 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3359 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3361 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3362 QString asScriptCode()
const override;
3364 QString createFileFilter()
const override;
3366 QVariantMap toVariantMap()
const override;
3367 bool fromVariantMap(
const QVariantMap &map )
override;
3387 const QString &
name,
3393 bool optional =
false,
3403 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3404 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3405 QString asScriptCode()
const override;
3407 QStringList dependsOnOtherParameters()
const override;
3413 QString parentLayerParameterName()
const;
3419 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3437 bool allowMultiple()
const;
3443 void setAllowMultiple(
bool allowMultiple );
3454 bool defaultToAllFields()
const;
3465 void setDefaultToAllFields(
bool enabled );
3467 QVariantMap toVariantMap()
const override;
3468 bool fromVariantMap(
const QVariantMap &map )
override;
3476 QString mParentLayerParameterName;
3478 bool mAllowMultiple =
false;
3479 bool mDefaultToAllFields =
false;
3495 const QString &
name,
const QString &
description = QString(),
const QList< int > &types = QList< int >(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
3504 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3505 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3507 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3508 QString asScriptCode()
const override;
3510 QString createFileFilter()
const override;
3512 QVariantMap toVariantMap()
const override;
3513 bool fromVariantMap(
const QVariantMap &map )
override;
3539 QVariantMap toVariantMap()
const override;
3540 bool fromVariantMap(
const QVariantMap &map )
override;
3542 QString createFileFilter()
const override;
3628 bool mSupportsNonFileBasedOutputs =
true;
3629 bool mCreateByDefault =
true;
3654 const QString &
name,
3658 bool optional =
false,
3669 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3670 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3671 QString asScriptCode()
const override;
3673 QString defaultFileExtension() const override;
3674 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3675 QString createFileFilter() const override;
3682 virtual QStringList supportedOutputVectorLayerExtensions() const;
3688 Qgis::ProcessingSourceType dataType() const;
3694 bool hasGeometry() const;
3700 void setDataType(
Qgis::ProcessingSourceType type );
3710 bool supportsAppend() const;
3720 void setSupportsAppend(
bool supportsAppend );
3722 QVariantMap toVariantMap() const override;
3723 bool fromVariantMap( const QVariantMap &map ) override;
3724 QString generateTemporaryDestination( const
QgsProcessingContext *context =
nullptr ) const override;
3732 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3733 bool mSupportsAppend = false;
3756 const QString &
name,
3760 bool optional =
false,
3767 static QString
typeName() {
return u
"vectorDestination"_s; }
3770 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3771 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3772 QString asScriptCode()
const override;
3774 QString defaultFileExtension() const override;
3775 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3776 QString createFileFilter() const override;
3783 virtual QStringList supportedOutputVectorLayerExtensions() const;
3789 Qgis::ProcessingSourceType dataType() const;
3795 bool hasGeometry() const;
3801 void setDataType(
Qgis::ProcessingSourceType type );
3803 QVariantMap toVariantMap() const override;
3804 bool fromVariantMap( const QVariantMap &map ) override;
3813 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3836 static QString
typeName() {
return u
"rasterDestination"_s; }
3839 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3840 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3842 QString defaultFileExtension() const override;
3850 QString defaultFileFormat() const;
3852 QString createFileFilter() const override;
3860 Q_DECL_DEPRECATED virtual QStringList supportedOutputRasterLayerExtensions() const
SIP_DEPRECATED;
3867 virtual QList<QPair<QString, QString>> supportedOutputRasterLayerFormatAndExtensions() const;
3911 static QString
typeName() {
return u
"fileDestination"_s; }
3914 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3915 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3917 QString defaultFileExtension() const override;
3918 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3919 QString createFileFilter() const override;
3925 QString fileFilter() const;
3931 void setFileFilter( const QString &filter );
3933 QVariantMap toVariantMap() const override;
3934 bool fromVariantMap( const QVariantMap &map ) override;
3943 QString mFileFilter;
3963 static QString
typeName() {
return u
"folderDestination"_s; }
3966 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3968 QString defaultFileExtension() const override;
3997 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3998 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3999 QString asScriptCode()
const override;
4000 QStringList dependsOnOtherParameters()
const override;
4007 QString parentLayerParameterName()
const;
4013 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4015 QVariantMap toVariantMap()
const override;
4016 bool fromVariantMap(
const QVariantMap &map )
override;
4028 bool allowMultiple()
const;
4035 void setAllowMultiple(
bool allowMultiple );
4038 QString mParentLayerParameterName;
4039 bool mAllowMultiple =
false;
4067 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4068 QString asScriptCode()
const override;
4104 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4105 QString asScriptCode()
const override;
4107 QVariantMap toVariantMap()
const override;
4108 bool fromVariantMap(
const QVariantMap &map )
override;
4109 QStringList dependsOnOtherParameters()
const override;
4120 QString parentLayoutParameterName()
const;
4126 void setParentLayoutParameterName(
const QString &name );
4135 int itemType()
const;
4144 void setItemType(
int type );
4147 QString mParentLayoutParameterName;
4177 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4178 QString asScriptCode()
const override;
4180 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4181 QVariantMap toVariantMap()
const override;
4182 bool fromVariantMap(
const QVariantMap &map )
override;
4190 bool opacityEnabled()
const;
4199 void setOpacityEnabled(
bool enabled );
4207 bool mAllowOpacity =
true;
4229 const QString &
name,
4234 const QVariant &staticSourceCrs = QVariant(),
4235 const QVariant &staticDestinationCrs = QVariant(),
4236 bool optional =
false
4242 static QString
typeName() {
return u
"coordinateoperation"_s; }
4245 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4246 QString asScriptCode()
const override;
4248 QStringList dependsOnOtherParameters()
const override;
4250 QVariantMap toVariantMap()
const override;
4251 bool fromVariantMap(
const QVariantMap &map )
override;
4315 QString valueAsPythonStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool allowNonStringValues )
const;
4317 QString mSourceParameterName;
4318 QString mDestParameterName;
4319 QVariant mSourceCrs;
4347 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4348 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4349 QString asScriptCode()
const override;
4351 QVariantMap toVariantMap()
const override;
4352 bool fromVariantMap(
const QVariantMap &map )
override;
4380 const QString &
name,
4384 bool optional =
false,
4385 const QDateTime &minValue = QDateTime(),
4386 const QDateTime &maxValue = QDateTime()
4395 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4396 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4397 QString toolTip()
const override;
4407 QDateTime minimum()
const;
4420 void setMinimum(
const QDateTime &minimum );
4429 QDateTime maximum()
const;
4442 void setMaximum(
const QDateTime &maximum );
4456 QVariantMap toVariantMap()
const override;
4457 bool fromVariantMap(
const QVariantMap &map )
override;
4458 QString userFriendlyString(
const QVariant &value )
const override;
4496 static QString
typeName() {
return u
"providerconnection"_s; }
4499 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4500 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4501 QString asScriptCode()
const override;
4503 QVariantMap toVariantMap()
const override;
4504 bool fromVariantMap(
const QVariantMap &map )
override;
4524 QString mProviderId;
4550 const QString &
name,
const QString &
description,
const QString &connectionParameterName = QString(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
4556 static QString
typeName() {
return u
"databaseschema"_s; }
4559 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4560 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4561 QString asScriptCode()
const override;
4563 QVariantMap toVariantMap()
const override;
4564 bool fromVariantMap(
const QVariantMap &map )
override;
4565 QStringList dependsOnOtherParameters()
const override;
4571 QString parentConnectionParameterName()
const;
4577 void setParentConnectionParameterName(
const QString &name );
4585 QString mParentConnectionParameterName;
4614 const QString &
name,
4616 const QString &connectionParameterName = QString(),
4617 const QString &schemaParameterName = QString(),
4619 bool optional =
false,
4626 static QString
typeName() {
return u
"databasetable"_s; }
4629 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4630 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4631 QString asScriptCode()
const override;
4633 QVariantMap toVariantMap()
const override;
4634 bool fromVariantMap(
const QVariantMap &map )
override;
4635 QStringList dependsOnOtherParameters()
const override;
4641 QString parentConnectionParameterName()
const;
4647 void setParentConnectionParameterName(
const QString &name );
4653 QString parentSchemaParameterName()
const;
4659 void setParentSchemaParameterName(
const QString &name );
4672 bool allowNewTableNames()
const;
4680 void setAllowNewTableNames(
bool allowed );
4683 QString mParentConnectionParameterName;
4684 QString mParentSchemaParameterName;
4685 bool mAllowNewTableNames =
false;
4709 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4710 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4712 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4713 QString createFileFilter()
const override;
4742 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4743 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4745 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4774 static QString
typeName() {
return u
"pointCloudDestination"_s; }
4777 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4778 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4780 QString defaultFileExtension() const override;
4781 QString createFileFilter() const override;
4787 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
4808 const QString &
name,
4813 bool optional =
false,
4823 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4824 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4825 QString asScriptCode()
const override;
4827 QStringList dependsOnOtherParameters()
const override;
4833 QString parentLayerParameterName()
const;
4839 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4845 bool allowMultiple()
const;
4851 void setAllowMultiple(
bool allowMultiple );
4861 bool defaultToAllAttributes()
const;
4871 void setDefaultToAllAttributes(
bool enabled );
4873 QVariantMap toVariantMap()
const override;
4874 bool fromVariantMap(
const QVariantMap &map )
override;
4882 QString mParentLayerParameterName;
4883 bool mAllowMultiple =
false;
4884 bool mDefaultToAllAttributes =
false;
4908 static QString
typeName() {
return u
"vectorTileDestination"_s; }
4911 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4912 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4914 QString defaultFileExtension() const override;
4915 QString createFileFilter() const override;
4921 virtual QStringList supportedOutputVectorTileLayerExtensions() const;
Provides global constants and enumerations 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.
QFlags< RasterProcessingParameterCapability > RasterProcessingParameterCapabilities
Raster layer processing parameter capabilities.
ProcessingFieldParameterDataType
Processing field parameter data types.
@ Unknown
Unknown areal unit.
TemporalUnit
Temporal units.
@ Milliseconds
Milliseconds.
QFlags< ProcessingParameterFlag > ProcessingParameterFlags
Flags which dictate the behavior of Processing parameters.
VolumeUnit
Units of volume.
@ Unknown
Unknown volume unit.
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...
QFlags< ProcessingFeatureSourceDefinitionFlag > ProcessingFeatureSourceDefinitionFlags
Flags which control behavior for a Processing feature source.
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.
Represents a coordinate reference system (CRS).
An interface for objects which accept features via addFeature(s) methods.
QFlags< SinkFlag > SinkFlags
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.
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.
friend class TestQgsProcessing
virtual QString defaultFileExtension() const =0
Returns the default file extension for destination file paths associated with this parameter.
void setCreateByDefault(bool createByDefault)
Sets whether the destination should be created by default.
friend class TestQgsProcessingModelAlgorithm
bool supportsNonFileBasedOutput() const
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or ...
friend class QgsProcessingModelAlgorithm
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
bool createByDefault() const
Returns true if the destination should be created by default.
virtual bool isSupportedOutputValue(const QVariant &value, QgsProcessingContext &context, QString &error) const
Tests whether a value is a supported value for this parameter.
virtual QString generateTemporaryDestination(const QgsProcessingContext *context=nullptr) const
Generates a temporary destination value for this parameter.
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...
QgsProcessingDestinationParameter(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingDestinationParameter.
Custom exception class for processing related exceptions.
Encapsulates settings relating to a feature source input to a processing algorithm.
bool loadVariant(const QVariantMap &map)
Loads this source definition from a QVariantMap, wrapped in a QVariant.
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...
QVariant toVariant() const
Saves this source definition to a QVariantMap, wrapped in a QVariant.
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.
QString format() const
Returns the format (if set).
QgsProject * destinationProject
Destination project.
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.
void setFormat(const QString &format)
Sets the format of the output dataset.
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.
QgsProcessingParameterAnnotationLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterAnnotationLayer.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for area values.
void setDefaultUnit(Qgis::AreaUnit unit)
Sets the default area unit for the parameter.
QString parentParameterName() const
Returns the name of the parent parameter, or an empty string if this is not set.
Qgis::AreaUnit defaultUnit() const
Returns the default area unit for the parameter.
QgsProcessingParameterArea(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentParameterName=QString(), bool optional=false, double minValue=0, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterArea.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for authentication configuration ID values.
QString type() const override
Unique parameter type name.
QgsProcessingParameterAuthConfig(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterAuthConfig.
static QString typeName()
Returns the type name for the parameter class.
A raster band parameter for Processing algorithms.
QString type() const override
Unique parameter type name.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
QgsProcessingParameterBand(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), bool optional=false, bool allowMultiple=false)
Constructor for QgsProcessingParameterBand.
static QString typeName()
Returns the type name for the parameter class.
bool allowMultiple() const
Returns whether multiple band selections are permitted.
A boolean parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterBoolean(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterBoolean.
A color parameter for processing algorithms.
bool opacityEnabled() const
Returns true if the parameter allows opacity control.
QgsProcessingParameterColor(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool opacityEnabled=true, bool optional=false)
Constructor for QgsProcessingParameterColor.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
A coordinate operation parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
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.
QgsProcessingParameterCoordinateOperation(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &sourceCrsParameterName=QString(), const QString &destinationCrsParameterName=QString(), const QVariant &staticSourceCrs=QVariant(), const QVariant &staticDestinationCrs=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterCoordinateOperation.
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.
QgsProcessingParameterCrs(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterCrs.
QString userFriendlyString(const QVariant &value) const override
Returns a user-friendly string representation of the provided parameter value.
QString type() const override
Unique parameter type name.
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...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterDatabaseSchema(const QString &name, const QString &description, const QString &connectionParameterName=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterDatabaseSchema.
A database table name parameter for processing algorithms.
QgsProcessingParameterDatabaseTable(const QString &name, const QString &description, const QString &connectionParameterName=QString(), const QString &schemaParameterName=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool allowNewTableNames=false)
Constructor for QgsProcessingParameterDatabaseTable.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
bool allowNewTableNames() const
Returns true if the parameter allows users to enter names for a new (non-existing) tables.
A datetime (or pure date or time) parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterDateTime(const QString &name, const QString &description=QString(), Qgis::ProcessingDateTimeParameterDataType type=Qgis::ProcessingDateTimeParameterDataType::DateTime, const QVariant &defaultValue=QVariant(), bool optional=false, const QDateTime &minValue=QDateTime(), const QDateTime &maxValue=QDateTime())
Constructor for QgsProcessingParameterDateTime.
Base class for the definition of processing parameters.
QgsProcessingAlgorithm * mAlgorithm
Pointer to algorithm which owns this parameter.
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.
QString valueAsStringPrivate(const QVariant &value, QgsProcessingContext &context, bool &ok, ValueAsStringFlags flags) const
Internal method for evaluating values as string.
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.
virtual QString userFriendlyString(const QVariant &value) const
Returns a user-friendly string representation of the provided parameter value.
QFlags< ValueAsStringFlag > ValueAsStringFlags
void setMetadata(const QVariantMap &metadata)
Sets the parameter's freeform metadata.
void setFlags(Qgis::ProcessingParameterFlags flags)
Sets the flags associated with the parameter.
QgsProcessingProvider * provider() const
Returns a pointer to the provider for the algorithm which owns this 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.
bool mIsDynamic
True for dynamic parameters, which can have data-defined (QgsProperty) based values.
QVariantMap metadata() const
Returns the parameter's freeform metadata.
QString description() const
Returns the description for the parameter.
QgsProcessingParameterDefinition(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QString &help=QString())
Constructor for QgsProcessingParameterDefinition.
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...
friend class QgsProcessingAlgorithm
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.
QVariant defaultGuiValueFromSetting() const
Default gui value for an algorithm parameter from settings.
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.
QVariant valueAsJsonObjectPrivate(const QVariant &value, QgsProcessingContext &context, ValueAsStringFlags flags) const
Internal method for evaluating values as JSON objects.
virtual QColor modelColor() const
Returns the color to use for the parameter in model designer windows.
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.
QString parentParameterName() const
Returns the name of the parent parameter, or an empty string if this is not set.
Qgis::DistanceUnit defaultUnit() const
Returns the default distance unit for the parameter.
QgsProcessingParameterDistance(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentParameterName=QString(), bool optional=false, double minValue=std::numeric_limits< double >::lowest()+1, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterDistance.
A double numeric parameter for duration values.
void setDefaultUnit(Qgis::TemporalUnit unit)
Sets the default duration unit for the parameter.
Qgis::TemporalUnit defaultUnit() const
Returns the default duration unit for the parameter.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterDuration(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, double minValue=std::numeric_limits< double >::lowest()+1, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterDuration.
static QString typeName()
Returns the type name for the parameter class.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
QString userFriendlyString(const QVariant &value) const override
Returns a user-friendly string representation of the provided parameter value.
bool allowMultiple() const
Returns true if the parameter allows multiple selected values.
QStringList options() const
Returns the list of acceptable options for the parameter.
QgsProcessingParameterEnum(const QString &name, const QString &description=QString(), const QStringList &options=QStringList(), bool allowMultiple=false, const QVariant &defaultValue=QVariant(), bool optional=false, bool usesStaticStrings=false)
Constructor for QgsProcessingParameterEnum.
QString type() const override
Unique parameter type name.
bool usesStaticStrings() const
Returns true if the parameter uses static (non-translated) string values for its enumeration choice l...
static QString typeName()
Returns the type name for the parameter class.
An expression parameter for processing algorithms.
QgsProcessingParameterExpression(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), bool optional=false, Qgis::ExpressionType type=Qgis::ExpressionType::Qgis)
Constructor for QgsProcessingParameterExpression.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A rectangular map extent parameter for processing algorithms.
QgsProcessingParameterExtent(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterExtent.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
A feature sink output for processing algorithms.
QgsProcessingParameterFeatureSink(const QString &name, const QString &description=QString(), Qgis::ProcessingSourceType type=Qgis::ProcessingSourceType::VectorAnyGeometry, const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true, bool supportsAppend=false)
Constructor for QgsProcessingParameterFeatureSink.
QString type() const override
Unique parameter type name.
bool supportsAppend() const
Returns true if the sink supports appending features to an existing table.
static QString typeName()
Returns the type name for the parameter class.
An input feature source (such as vector layers) parameter for processing algorithms.
QgsProcessingParameterFeatureSource(const QString &name, const QString &description=QString(), const QList< int > &types=QList< int >(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterFeatureSource.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A vector layer or feature source field parameter for processing algorithms.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
bool allowMultiple() const
Returns whether multiple field selections are permitted.
QString type() const override
Unique parameter type name.
bool defaultToAllFields() const
Returns whether a parameter which allows multiple selections (see allowMultiple()) should automatical...
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterField(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), Qgis::ProcessingFieldParameterDataType type=Qgis::ProcessingFieldParameterDataType::Any, bool allowMultiple=false, bool optional=false, bool defaultToAllFields=false)
Constructor for QgsProcessingParameterField.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
QgsProcessingParameterFileDestination(const QString &name, const QString &description=QString(), const QString &fileFilter=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterFileDestination.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QString fileFilter() const
Returns the file filter string for file destinations compatible with this parameter.
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.
QgsProcessingParameterFile(const QString &name, const QString &description=QString(), Qgis::ProcessingFileParameterBehavior behavior=Qgis::ProcessingFileParameterBehavior::File, const QString &extension=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QString &fileFilter=QString())
Constructor for QgsProcessingParameterFile.
void setBehavior(Qgis::ProcessingFileParameterBehavior behavior)
Sets the parameter behavior (e.g.
QString type() const override
Unique parameter type name.
QString fileFilter() const
Returns the file filter string for file destinations compatible with this parameter.
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...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterFolderDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterFolderDestination.
A geometry parameter for processing algorithms.
void setGeometryTypes(const QList< int > &geometryTypes)
Sets the allowed geometryTypes, as a list of Qgis::GeometryType values.
QString type() const override
Unique parameter type name.
bool allowMultipart() const
Returns the parameter allow multipart geometries.
QgsProcessingParameterGeometry(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QList< int > &geometryTypes=QList< int >(), bool allowMultipart=true)
Constructor for QgsProcessingParameterGeometry.
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.
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.
QString type() const override
Unique parameter type name.
QgsProcessingParameterLayoutItem(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayoutParameterName=QString(), int itemType=-1, bool optional=false)
Constructor for QgsProcessingParameterLayoutItem.
QString parentLayoutParameterName() const
Returns the name of the parent layout parameter, or an empty string if this is not set.
static QString typeName()
Returns the type name for the parameter class.
int itemType() const
Returns the acceptable item type, or -1 if any item type is allowed.
A print layout parameter, allowing users to select a print layout.
QgsProcessingParameterLayout(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterLayout.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
void setDataTypes(const QList< int > &types)
Sets the geometry types for sources acceptable by the parameter.
QgsProcessingParameterLimitedDataTypes(const QList< int > &types=QList< int >())
Constructor for QgsProcessingParameterLimitedDataTypes, with a list of acceptable data types.
QList< int > mDataTypes
List of acceptable data types for the parameter.
QList< int > dataTypes() const
Returns the geometry types for sources acceptable by the parameter.
A map layer parameter for processing algorithms.
QString type() const override
Unique parameter type name.
QgsProcessingParameterMapLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QList< int > &types=QList< int >())
Constructor for QgsProcessingParameterMapLayer.
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 ...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterMapTheme(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMapTheme.
A table (matrix) parameter for processing algorithms.
QStringList headers() const
Returns a list of column headers (if set).
int numberRows() const
Returns the fixed number of rows in the table.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterMatrix(const QString &name, const QString &description=QString(), int numberRows=3, bool hasFixedNumberRows=false, const QStringList &headers=QStringList(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMatrix.
QString type() const override
Unique parameter type name.
bool hasFixedNumberRows() const
Returns whether the table has a fixed number of rows.
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.
QgsProcessingParameterMeshLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMeshLayer.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A parameter for processing algorithms which accepts multiple map layers.
Qgis::ProcessingSourceType layerType() const
Returns the layer type for layers acceptable by the parameter.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterMultipleLayers(const QString &name, const QString &description=QString(), Qgis::ProcessingSourceType layerType=Qgis::ProcessingSourceType::VectorAnyGeometry, const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMultipleLayers.
QString type() const override
Unique parameter type name.
A numeric parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterNumber(const QString &name, const QString &description=QString(), Qgis::ProcessingNumberParameterType type=Qgis::ProcessingNumberParameterType::Integer, const QVariant &defaultValue=QVariant(), bool optional=false, double minValue=std::numeric_limits< double >::lowest()+1, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterNumber.
A point cloud layer attribute parameter for Processing algorithms.
QgsProcessingParameterPointCloudAttribute(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), bool allowMultiple=false, bool optional=false, bool defaultToAllAttributes=false)
Constructor for QgsProcessingParameterField.
QString type() const override
Unique parameter type name.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
static QString typeName()
Returns the type name for the parameter class.
bool allowMultiple() const
Returns whether multiple field selections are permitted.
bool defaultToAllAttributes() const
Returns whether a parameter which allows multiple selections (see allowMultiple()) should automatical...
A point cloud layer destination parameter, for specifying the destination path for a point cloud laye...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterPointCloudDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterPointCloudDestination.
A point cloud layer parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterPointCloudLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterPointCloudLayer.
A point parameter for processing algorithms.
QString type() const override
Unique parameter type name.
QgsProcessingParameterPoint(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterPoint.
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...
QString type() const override
Unique parameter type name.
QgsProcessingParameterProviderConnection(const QString &name, const QString &description, const QString &provider, const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterProviderConnection, for the specified provider type.
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.
QgsProcessingParameterRange(const QString &name, const QString &description=QString(), Qgis::ProcessingNumberParameterType type=Qgis::ProcessingNumberParameterType::Integer, const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterRange.
QString type() const override
Unique parameter type name.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
QString type() const override
Unique parameter type name.
QgsProcessingParameterRasterDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterRasterDestination.
static QString typeName()
Returns the type name for the parameter class.
A raster layer parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterRasterLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterRasterLayer.
A double numeric parameter for map scale values.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterScale(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterScale.
A string parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
bool multiLine() const
Returns true if the parameter allows multiline strings.
QgsProcessingParameterString(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool multiLine=false, bool optional=false)
Constructor for QgsProcessingParameterString.
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 ...
QgsProcessingParameterVectorDestination(const QString &name, const QString &description=QString(), Qgis::ProcessingSourceType type=Qgis::ProcessingSourceType::VectorAnyGeometry, const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterVectorDestination.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A vector layer (with or without geometry) parameter for processing algorithms.
QString type() const override
Unique parameter type name.
QgsProcessingParameterVectorLayer(const QString &name, const QString &description=QString(), const QList< int > &types=QList< int >(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterVectorLayer.
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...
QgsProcessingParameterVectorTileDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterVectorTileDestination.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for volume values.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterVolume(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentParameterName=QString(), bool optional=false, double minValue=0, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterVolume.
Qgis::VolumeUnit defaultUnit() const
Returns the default volume unit for the parameter.
void setDefaultUnit(Qgis::VolumeUnit unit)
Sets the default volume unit for the parameter.
QString parentParameterName() const
Returns the name of the parent parameter, or an empty string if this is not set.
A collection of utilities for working with parameters when running a processing algorithm.
static QString descriptionFromName(const QString &name)
Creates an autogenerated parameter description from a parameter name.
static int parameterAsEnum(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a enum value.
static double parameterAsDouble(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static double value.
static QgsPointXY parameterAsPoint(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a point.
static QString parameterAsOutputLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a output layer destination.
static QgsFeatureSink * parameterAsSink(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsFields &fields, Qgis::WkbType geometryType, const QgsCoordinateReferenceSystem &crs, QgsProcessingContext &context, QString &destinationIdentifier, QgsFeatureSink::SinkFlags sinkFlags=QgsFeatureSink::SinkFlags(), const QVariantMap &createOptions=QVariantMap(), const QStringList &datasourceOptions=QStringList(), const QStringList &layerOptions=QStringList())
Evaluates the parameter with matching definition to a feature sink.
static QgsPrintLayout * parameterAsLayout(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a print layout.
static QList< QgsMapLayer * > parameterAsLayerList(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessing::LayerOptionsFlags flags=QgsProcessing::LayerOptionsFlags())
Evaluates the parameter with matching definition to a list of map layers.
static QTime parameterAsTime(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static time value.
static QgsProcessingParameterDefinition * parameterFromVariantMap(const QVariantMap &map)
Creates a new QgsProcessingParameterDefinition using the configuration from a supplied variant map.
static QgsRectangle parameterAsExtent(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a rectangular extent.
static QgsCoordinateReferenceSystem parameterAsGeometryCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the coordinate reference system associated with a geometry parameter value.
static QgsAnnotationLayer * parameterAsAnnotationLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to an annotation layer.
static QString parameterAsEnumString(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static enum string.
static QList< double > parameterAsRange(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a range of values.
static QStringList parameterAsStrings(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of strings (e.g.
static QList< int > parameterAsInts(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of integer values.
static QString parameterAsConnectionName(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a connection name string.
static QgsProcessingFeatureSource * parameterAsSource(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a feature source.
static QString parameterAsFileOutput(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a file based output destination.
static bool parameterAsBoolean(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static boolean value.
static QgsPointCloudLayer * parameterAsPointCloudLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessing::LayerOptionsFlags flags=QgsProcessing::LayerOptionsFlags())
Evaluates the parameter with matching definition to a point cloud layer.
static QgsCoordinateReferenceSystem parameterAsPointCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the coordinate reference system associated with an point parameter value.
static QgsLayoutItem * parameterAsLayoutItem(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsPrintLayout *layout)
Evaluates the parameter with matching definition to a print layout item, taken from the specified lay...
static bool parameterAsBool(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static boolean value.
static QString parameterAsCompatibleSourceLayerPathAndLayerName(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat=QString("shp"), QgsProcessingFeedback *feedback=nullptr, QString *layerName=nullptr)
Evaluates the parameter with matching definition to a source vector layer file path and layer name of...
static QgsMeshLayer * parameterAsMeshLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition and value to a mesh layer.
static QString parameterAsCompatibleSourceLayerPath(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat=QString("shp"), QgsProcessingFeedback *feedback=nullptr)
Evaluates the parameter with matching definition to a source vector layer file path of compatible for...
static QgsProcessingParameterDefinition * parameterFromScriptCode(const QString &code)
Creates a new QgsProcessingParameterDefinition using the configuration from a supplied script code st...
static QColor parameterAsColor(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the color associated with an point parameter value, or an invalid color if the parameter was ...
static QgsVectorLayer * parameterAsVectorLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a vector layer.
static QString parameterAsOutputFormat(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a output format.
static int parameterAsInt(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static integer value.
static QString parameterAsDatabaseTableName(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a database table name.
static QString parameterAsSchema(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a database schema name.
static QgsGeometry parameterAsGeometry(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a geometry.
static QgsMapLayer * parameterAsLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingUtils::LayerHint layerHint=QgsProcessingUtils::LayerHint::UnknownType, QgsProcessing::LayerOptionsFlags flags=QgsProcessing::LayerOptionsFlags())
Evaluates the parameter with matching definition to a map layer.
static QString parameterAsExpression(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to an expression.
static QString parameterAsString(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static string value.
static QgsRasterLayer * parameterAsRasterLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a raster layer.
static QList< int > parameterAsEnums(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to list of enum values.
static QStringList parameterAsEnumStrings(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to list of static enum strings.
static QgsGeometry parameterAsExtentGeometry(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a rectangular extent, and returns a geometry cove...
static QStringList parameterAsFileList(const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of files (for QgsProcessingParameterMultip...
static bool isDynamic(const QVariantMap ¶meters, const QString &name)
Returns true if the parameter with matching name is a dynamic parameter, and must be evaluated once f...
static Q_DECL_DEPRECATED QStringList parameterAsFields(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of fields.
static QgsCoordinateReferenceSystem parameterAsExtentCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the coordinate reference system associated with an extent parameter value.
static QDateTime parameterAsDateTime(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static datetime value.
static QString parameterAsFile(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a file/folder name.
static QDate parameterAsDate(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static date value.
static QVariantList parameterAsMatrix(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a matrix/table of values.
static QgsCoordinateReferenceSystem parameterAsCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a coordinate reference system.
Abstract base class for processing providers.
Encapsulates settings relating to a raster layer input to a processing algorithm.
double referenceScale
If set to a value > 0, sets a scale at which a raster (e.g., a WMS) should be requested or rendered.
int dpi
Indicates the resolution of the raster source (e.g., a WMS server).
bool operator==(const QgsProcessingRasterLayerDefinition &other) const
QgsProperty source
Source definition.
bool loadVariant(const QVariantMap &map)
Loads this raster layer definition from a QVariantMap, wrapped in a QVariant.
QgsProcessingRasterLayerDefinition(const QString &source=QString(), const double referenceScale=0, const int dpi=96)
Constructor for QgsProcessingRasterLayerDefinition, accepting a static string source.
QVariant toVariant() const
Saves this raster layer definition to a QVariantMap, wrapped in a QVariant.
QgsProcessingRasterLayerDefinition(const QgsProperty &source, const double referenceScale=0, const int dpi=96)
Constructor for QgsProcessingRasterLayerDefinition, accepting a QgsProperty source.
bool operator!=(const QgsProcessingRasterLayerDefinition &other) const
LayerHint
Layer type hints.
@ UnknownType
Unknown layer type.
Contains enumerations and other constants for use in processing algorithms and parameters.
QFlags< LayerOptionsFlag > LayerOptionsFlags
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 dataset.
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.