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;
158 QVariant toVariant()
const;
166 bool loadVariant(
const QVariantMap &map );
171 return source == other.
source
175 && flags == other.
flags
181 return !( *
this == other );
185 operator QVariant()
const
187 return QVariant::fromValue( *
this );
213 , destinationProject( destinationProject )
223 , destinationProject( destinationProject )
286 QVariant toVariant()
const;
294 bool loadVariant(
const QVariantMap &map );
297 operator QVariant()
const
299 return QVariant::fromValue( *
this );
308 bool mUseRemapping =
false;
347 sipType = sipType_QgsProcessingParameterBoolean;
349 sipType = sipType_QgsProcessingParameterCrs;
351 sipType = sipType_QgsProcessingParameterMapLayer;
353 sipType = sipType_QgsProcessingParameterExtent;
355 sipType = sipType_QgsProcessingParameterPoint;
357 sipType = sipType_QgsProcessingParameterGeometry;
359 sipType = sipType_QgsProcessingParameterFile;
361 sipType = sipType_QgsProcessingParameterMatrix;
363 sipType = sipType_QgsProcessingParameterMultipleLayers;
365 sipType = sipType_QgsProcessingParameterNumber;
367 sipType = sipType_QgsProcessingParameterDistance;
369 sipType = sipType_QgsProcessingParameterArea;
371 sipType = sipType_QgsProcessingParameterVolume;
373 sipType = sipType_QgsProcessingParameterDuration;
375 sipType = sipType_QgsProcessingParameterScale;
377 sipType = sipType_QgsProcessingParameterRange;
379 sipType = sipType_QgsProcessingParameterRasterLayer;
381 sipType = sipType_QgsProcessingParameterMeshLayer;
383 sipType = sipType_QgsProcessingParameterEnum;
385 sipType = sipType_QgsProcessingParameterString;
387 sipType = sipType_QgsProcessingParameterExpression;
389 sipType = sipType_QgsProcessingParameterAuthConfig;
391 sipType = sipType_QgsProcessingParameterVectorLayer;
393 sipType = sipType_QgsProcessingParameterField;
395 sipType = sipType_QgsProcessingParameterFeatureSource;
397 sipType = sipType_QgsProcessingParameterFeatureSink;
399 sipType = sipType_QgsProcessingParameterVectorDestination;
401 sipType = sipType_QgsProcessingParameterRasterDestination;
403 sipType = sipType_QgsProcessingParameterPointCloudDestination;
405 sipType = sipType_QgsProcessingParameterFileDestination;
407 sipType = sipType_QgsProcessingParameterFolderDestination;
409 sipType = sipType_QgsProcessingParameterBand;
411 sipType = sipType_QgsProcessingParameterLayout;
413 sipType = sipType_QgsProcessingParameterLayoutItem;
415 sipType = sipType_QgsProcessingParameterColor;
417 sipType = sipType_QgsProcessingParameterCoordinateOperation;
419 sipType = sipType_QgsProcessingParameterMapTheme;
421 sipType = sipType_QgsProcessingParameterDateTime;
423 sipType = sipType_QgsProcessingParameterProviderConnection;
425 sipType = sipType_QgsProcessingParameterDatabaseSchema;
427 sipType = sipType_QgsProcessingParameterDatabaseTable;
429 sipType = sipType_QgsProcessingParameterFieldMapping;
431 sipType = sipType_QgsProcessingParameterTinInputLayers;
433 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
435 sipType = sipType_QgsProcessingParameterDxfLayers;
437 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
439 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
441 sipType = sipType_QgsProcessingParameterPointCloudLayer;
443 sipType = sipType_QgsProcessingParameterAnnotationLayer;
445 sipType = sipType_QgsProcessingParameterPointCloudAttribute;
447 sipType = sipType_QgsProcessingParameterVectorTileDestination;
459 bool optional =
false,
const QString &help = QString() );
471 virtual QString
type()
const = 0;
485 QString
name()
const {
return mName; }
492 void setName(
const QString &name ) { mName = name; }
506 void setDescription(
const QString &description ) { mDescription = description; }
517 QString
help()
const {
return mHelp; }
528 void setHelp(
const QString &help ) { mHelp = help; }
558 QVariant guiDefaultValueOverride()
const;
585 QVariant defaultValueForGui()
const;
606 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
615 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
628 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
665 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
671 virtual QString asScriptCode()
const;
689 virtual QVariantMap toVariantMap()
const;
696 virtual bool fromVariantMap(
const QVariantMap &map );
718 void setMetadata(
const QVariantMap &metadata ) { mMetadata = metadata; }
744 virtual QString toolTip()
const;
851 AllowMapLayerValues = 1 << 0,
883 QVariant defaultGuiValueFromSetting()
const;
910 bool mIsDynamic =
false;
959 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1754 static QString descriptionFromName(
const QString &name );
1765 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1783 bool optional =
false );
1788 static QString
typeName() {
return QStringLiteral(
"boolean" ); }
1791 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1792 QString asScriptCode()
const override;
1812 QgsProcessingParameterCrs(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1813 bool optional =
false );
1818 static QString
typeName() {
return QStringLiteral(
"crs" ); }
1821 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1822 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1824 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1846 bool optional =
false );
1851 static QString
typeName() {
return QStringLiteral(
"extent" ); }
1854 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1855 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1857 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1871 static bool variantIsValidStringForExtent(
const QVariant &value );
1888 QgsProcessingParameterPoint(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1889 bool optional =
false );
1894 static QString
typeName() {
return QStringLiteral(
"point" ); }
1897 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1898 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1924 QgsProcessingParameterGeometry(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
bool optional =
false,
const QList< int > &geometryTypes = QList< int >(),
bool allowMultipart =
true );
1929 static QString
typeName() {
return QStringLiteral(
"geometry" ); }
1932 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1933 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1934 QString asScriptCode()
const override;
1936 QVariantMap toVariantMap()
const override;
1937 bool fromVariantMap(
const QVariantMap &map )
override;
1972 QList<int> mGeomTypes;
1973 bool mAllowMultipart;
1994 bool optional =
false,
const QString &fileFilter = QString() );
1999 static QString
typeName() {
return QStringLiteral(
"file" ); }
2002 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2003 QString asScriptCode()
const override;
2005 QString createFileFilter()
const override;
2037 void setExtension(
const QString &extension );
2045 QString fileFilter()
const;
2056 void setFileFilter(
const QString &filter );
2058 QVariantMap toVariantMap()
const override;
2059 bool fromVariantMap(
const QVariantMap &map )
override;
2070 QString mFileFilter;
2086 bool hasFixedNumberRows =
false,
const QStringList &headers = QStringList(),
2087 const QVariant &defaultValue = QVariant(),
2088 bool optional =
false );
2093 static QString
typeName() {
return QStringLiteral(
"matrix" ); }
2096 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2097 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2104 QStringList headers()
const;
2110 void setHeaders(
const QStringList &headers );
2118 int numberRows()
const;
2126 void setNumberRows(
int rows );
2133 bool hasFixedNumberRows()
const;
2140 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2142 QVariantMap toVariantMap()
const override;
2143 bool fromVariantMap(
const QVariantMap &map )
override;
2152 QStringList mHeaders;
2153 int mNumberRows = 3;
2154 bool mFixedNumberRows =
false;
2171 const QVariant &defaultValue = QVariant(),
2172 bool optional =
false );
2177 static QString
typeName() {
return QStringLiteral(
"multilayer" ); }
2180 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2181 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2183 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2184 QString asScriptCode()
const override;
2186 QString createFileFilter()
const override;
2205 int minimumNumberInputs()
const;
2212 void setMinimumNumberInputs(
int minimum );
2214 QVariantMap toVariantMap()
const override;
2215 bool fromVariantMap(
const QVariantMap &map )
override;
2225 int mMinimumNumberInputs = 0;
2255 const QVariant &defaultValue = QVariant(),
2256 bool optional =
false,
2257 double minValue = std::numeric_limits<double>::lowest() + 1,
2258 double maxValue = std::numeric_limits<double>::max()
2264 static QString
typeName() {
return QStringLiteral(
"number" ); }
2267 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2268 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2269 QString toolTip()
const override;
2276 double minimum()
const;
2282 void setMinimum(
double minimum );
2288 double maximum()
const;
2294 void setMaximum(
double maximum );
2308 QVariantMap toVariantMap()
const override;
2309 bool fromVariantMap(
const QVariantMap &map )
override;
2318 double mMin = std::numeric_limits<double>::lowest() + 1;
2319 double mMax = std::numeric_limits<double>::max();
2350 const QVariant &defaultValue = QVariant(),
2351 const QString &parentParameterName = QString(),
2352 bool optional =
false,
2353 double minValue = std::numeric_limits<double>::lowest() + 1,
2354 double maxValue = std::numeric_limits<double>::max() );
2359 static QString
typeName() {
return QStringLiteral(
"distance" ); }
2363 QString type() const override;
2364 QStringList dependsOnOtherParameters() const override;
2365 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2371 QString parentParameterName() const;
2377 void setParentParameterName( const QString &parentParameterName );
2385 Qgis::DistanceUnit defaultUnit()
const {
return mDefaultUnit; }
2395 QVariantMap toVariantMap()
const override;
2396 bool fromVariantMap(
const QVariantMap &map )
override;
2400 QString mParentParameterName;
2433 const QVariant &defaultValue = QVariant(),
2434 const QString &parentParameterName = QString(),
2435 bool optional =
false,
2436 double minValue = 0,
2437 double maxValue = std::numeric_limits<double>::max() );
2442 static QString
typeName() {
return QStringLiteral(
"area" ); }
2446 QString type() const override;
2447 QStringList dependsOnOtherParameters() const override;
2448 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2454 QString parentParameterName() const;
2460 void setParentParameterName( const QString &parentParameterName );
2467 Qgis::AreaUnit defaultUnit()
const {
return mDefaultUnit; }
2476 QVariantMap toVariantMap()
const override;
2477 bool fromVariantMap(
const QVariantMap &map )
override;
2481 QString mParentParameterName;
2514 const QVariant &defaultValue = QVariant(),
2515 const QString &parentParameterName = QString(),
2516 bool optional =
false,
2517 double minValue = 0,
2518 double maxValue = std::numeric_limits<double>::max() );
2523 static QString
typeName() {
return QStringLiteral(
"volume" ); }
2527 QString type() const override;
2528 QStringList dependsOnOtherParameters() const override;
2529 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2535 QString parentParameterName() const;
2541 void setParentParameterName( const QString &parentParameterName );
2548 Qgis::VolumeUnit defaultUnit()
const {
return mDefaultUnit; }
2557 QVariantMap toVariantMap()
const override;
2558 bool fromVariantMap(
const QVariantMap &map )
override;
2562 QString mParentParameterName;
2583 const QVariant &defaultValue = QVariant(),
2584 bool optional =
false,
2585 double minValue = std::numeric_limits<double>::lowest() + 1,
2586 double maxValue = std::numeric_limits<double>::max() );
2591 static QString
typeName() {
return QStringLiteral(
"duration" ); }
2595 QString type() const override;
2596 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2603 Qgis::TemporalUnit defaultUnit()
const {
return mDefaultUnit; }
2612 QVariantMap toVariantMap()
const override;
2613 bool fromVariantMap(
const QVariantMap &map )
override;
2639 const QVariant &defaultValue = QVariant(),
2640 bool optional =
false );
2645 static QString
typeName() {
return QStringLiteral(
"scale" ); }
2649 QString type() const override;
2650 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2673 const QVariant &defaultValue = QVariant(),
2674 bool optional =
false );
2679 static QString
typeName() {
return QStringLiteral(
"range" ); }
2682 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2683 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2698 QVariantMap toVariantMap()
const override;
2699 bool fromVariantMap(
const QVariantMap &map )
override;
2724 bool optional =
false );
2729 static QString
typeName() {
return QStringLiteral(
"raster" ); }
2732 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2733 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2735 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2736 QString createFileFilter()
const override;
2769 QgsProcessingParameterEnum(
const QString &name,
const QString &description = QString(),
const QStringList &options = QStringList(),
2770 bool allowMultiple =
false,
2771 const QVariant &defaultValue = QVariant(),
2772 bool optional =
false,
2773 bool usesStaticStrings =
false );
2778 static QString
typeName() {
return QStringLiteral(
"enum" ); }
2781 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2782 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2783 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
2784 QString asScriptCode()
const override;
2791 QStringList options()
const;
2797 void setOptions(
const QStringList &options );
2803 bool allowMultiple()
const;
2809 void setAllowMultiple(
bool allowMultiple );
2817 bool usesStaticStrings()
const;
2825 void setUsesStaticStrings(
bool usesStaticStrings );
2827 QVariantMap toVariantMap()
const override;
2828 bool fromVariantMap(
const QVariantMap &map )
override;
2837 QStringList mOptions;
2838 bool mAllowMultiple =
false;
2839 bool mUsesStaticStrings =
false;
2876 bool multiLine =
false,
2877 bool optional =
false );
2882 static QString
typeName() {
return QStringLiteral(
"string" ); }
2885 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2886 QString asScriptCode()
const override;
2893 bool multiLine()
const;
2899 void setMultiLine(
bool multiLine );
2901 QVariantMap toVariantMap()
const override;
2902 bool fromVariantMap(
const QVariantMap &map )
override;
2911 bool mMultiLine =
false;
2936 bool optional =
false );
2941 static QString
typeName() {
return QStringLiteral(
"authcfg" ); }
2944 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2945 QString asScriptCode()
const override;
2967 const QString &parentLayerParameterName = QString(),
2973 static QString
typeName() {
return QStringLiteral(
"expression" ); }
2976 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2977 QStringList dependsOnOtherParameters()
const override;
2984 QString parentLayerParameterName()
const;
2990 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3008 QVariantMap toVariantMap()
const override;
3009 bool fromVariantMap(
const QVariantMap &map )
override;
3018 QString mParentLayerParameterName;
3041 QList< int > dataTypes()
const;
3047 void setDataTypes(
const QList< int > &types );
3069 const QString &description = QString(),
3070 const QList< int > &types = QList< int >(),
3071 const QVariant &defaultValue = QVariant(),
3072 bool optional =
false );
3077 static QString
typeName() {
return QStringLiteral(
"vector" ); }
3080 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3081 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3083 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3085 QString createFileFilter()
const override;
3087 QVariantMap toVariantMap()
const override;
3088 bool fromVariantMap(
const QVariantMap &map )
override;
3111 const QString &description = QString(),
3112 const QVariant &defaultValue = QVariant(),
3113 bool optional =
false );
3118 static QString
typeName() {
return QStringLiteral(
"mesh" ); }
3121 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3122 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3124 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3125 QString createFileFilter()
const override;
3146 bool optional =
false,
3147 const QList< int > &types = QList< int >() );
3152 static QString
typeName() {
return QStringLiteral(
"layer" ); }
3155 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3156 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3158 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3159 QString asScriptCode()
const override;
3161 QString createFileFilter()
const override;
3163 QVariantMap toVariantMap()
const override;
3164 bool fromVariantMap(
const QVariantMap &map )
override;
3185 QgsProcessingParameterField(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3186 const QString &parentLayerParameterName = QString(),
3188 bool allowMultiple =
false,
3189 bool optional =
false,
3190 bool defaultToAllFields =
false );
3195 static QString
typeName() {
return QStringLiteral(
"field" ); }
3198 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3199 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3200 QString asScriptCode()
const override;
3202 QStringList dependsOnOtherParameters()
const override;
3208 QString parentLayerParameterName()
const;
3214 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3232 bool allowMultiple()
const;
3238 void setAllowMultiple(
bool allowMultiple );
3249 bool defaultToAllFields()
const;
3260 void setDefaultToAllFields(
bool enabled );
3262 QVariantMap toVariantMap()
const override;
3263 bool fromVariantMap(
const QVariantMap &map )
override;
3272 QString mParentLayerParameterName;
3274 bool mAllowMultiple =
false;
3275 bool mDefaultToAllFields =
false;
3293 const QList< int > &types = QList< int >(),
3294 const QVariant &defaultValue = QVariant(),
bool optional =
false );
3299 static QString
typeName() {
return QStringLiteral(
"source" ); }
3302 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3303 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3305 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3306 QString asScriptCode()
const override;
3308 QString createFileFilter()
const override;
3310 QVariantMap toVariantMap()
const override;
3311 bool fromVariantMap(
const QVariantMap &map )
override;
3337 bool optional =
false,
bool createByDefault =
true );
3340 QVariantMap toVariantMap()
const override;
3341 bool fromVariantMap(
const QVariantMap &map )
override;
3343 QString createFileFilter()
const override;
3376 virtual QString generateTemporaryDestination(
const QgsProcessingContext *context =
nullptr )
const;
3399 bool createByDefault()
const;
3406 void setCreateByDefault(
bool createByDefault );
3431 bool mSupportsNonFileBasedOutputs =
true;
3432 bool mCreateByDefault =
true;
3434 friend class QgsProcessingModelAlgorithm;
3435 friend class TestQgsProcessing;
3436 friend class TestQgsProcessingModelAlgorithm;
3458 bool optional =
false,
bool createByDefault =
true,
bool supportsAppend =
false );
3463 static QString
typeName() {
return QStringLiteral(
"sink" ); }
3466 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3467 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3468 QString asScriptCode()
const override;
3470 QString defaultFileExtension() const override;
3471 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3472 QString createFileFilter() const override;
3479 virtual QStringList supportedOutputVectorLayerExtensions() const;
3485 Qgis::ProcessingSourceType dataType() const;
3491 bool hasGeometry() const;
3497 void setDataType(
Qgis::ProcessingSourceType type );
3507 bool supportsAppend() const;
3517 void setSupportsAppend(
bool supportsAppend );
3519 QVariantMap toVariantMap() const override;
3520 bool fromVariantMap( const QVariantMap &map ) override;
3521 QString generateTemporaryDestination( const
QgsProcessingContext *context =
nullptr ) const override;
3530 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3531 bool mSupportsAppend = false;
3555 bool optional =
false,
bool createByDefault =
true );
3560 static QString
typeName() {
return QStringLiteral(
"vectorDestination" ); }
3563 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3564 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3565 QString asScriptCode()
const override;
3567 QString defaultFileExtension() const override;
3568 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3569 QString createFileFilter() const override;
3576 virtual QStringList supportedOutputVectorLayerExtensions() const;
3582 Qgis::ProcessingSourceType dataType() const;
3588 bool hasGeometry() const;
3594 void setDataType(
Qgis::ProcessingSourceType type );
3596 QVariantMap toVariantMap() const override;
3597 bool fromVariantMap( const QVariantMap &map ) override;
3607 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3627 const QVariant &defaultValue = QVariant(),
3628 bool optional =
false,
3629 bool createByDefault =
true );
3634 static QString
typeName() {
return QStringLiteral(
"rasterDestination" ); }
3637 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3638 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3640 QString defaultFileExtension() const override;
3641 QString createFileFilter() const override;
3648 virtual QStringList supportedOutputRasterLayerExtensions() const;
3687 const QString &fileFilter = QString(),
3688 const QVariant &defaultValue = QVariant(),
3689 bool optional =
false,
3690 bool createByDefault =
true );
3695 static QString
typeName() {
return QStringLiteral(
"fileDestination" ); }
3698 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3699 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3701 QString defaultFileExtension() const override;
3702 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3703 QString createFileFilter() const override;
3709 QString fileFilter() const;
3715 void setFileFilter( const QString &filter );
3717 QVariantMap toVariantMap() const override;
3718 bool fromVariantMap( const QVariantMap &map ) override;
3728 QString mFileFilter;
3745 const QVariant &defaultValue = QVariant(),
3746 bool optional =
false,
3747 bool createByDefault =
true );
3752 static QString
typeName() {
return QStringLiteral(
"folderDestination" ); }
3755 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3757 QString defaultFileExtension() const override;
3778 QgsProcessingParameterBand(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3779 const QString &parentLayerParameterName = QString(),
3780 bool optional =
false,
3781 bool allowMultiple =
false );
3786 static QString
typeName() {
return QStringLiteral(
"band" ); }
3789 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3790 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3791 QString asScriptCode()
const override;
3792 QStringList dependsOnOtherParameters()
const override;
3799 QString parentLayerParameterName()
const;
3805 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3807 QVariantMap toVariantMap()
const override;
3808 bool fromVariantMap(
const QVariantMap &map )
override;
3820 bool allowMultiple()
const;
3827 void setAllowMultiple(
bool allowMultiple );
3831 QString mParentLayerParameterName;
3832 bool mAllowMultiple =
false;
3854 bool optional =
false );
3859 static QString
typeName() {
return QStringLiteral(
"layout" ); }
3862 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3863 QString asScriptCode()
const override;
3892 const QString &parentLayoutParameterName = QString(),
3894 bool optional =
false );
3899 static QString
typeName() {
return QStringLiteral(
"layoutitem" ); }
3902 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3903 QString asScriptCode()
const override;
3905 QVariantMap toVariantMap()
const override;
3906 bool fromVariantMap(
const QVariantMap &map )
override;
3907 QStringList dependsOnOtherParameters()
const override;
3918 QString parentLayoutParameterName()
const;
3924 void setParentLayoutParameterName(
const QString &name );
3933 int itemType()
const;
3942 void setItemType(
int type );
3945 QString mParentLayoutParameterName;
3967 QgsProcessingParameterColor(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3968 bool opacityEnabled =
true,
3969 bool optional =
false );
3974 static QString
typeName() {
return QStringLiteral(
"color" ); }
3977 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3978 QString asScriptCode()
const override;
3980 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3981 QVariantMap toVariantMap()
const override;
3982 bool fromVariantMap(
const QVariantMap &map )
override;
3990 bool opacityEnabled()
const;
3999 void setOpacityEnabled(
bool enabled );
4008 bool mAllowOpacity =
true;
4030 const QString &sourceCrsParameterName = QString(),
const QString &destinationCrsParameterName = QString(),
4031 const QVariant &staticSourceCrs = QVariant(),
const QVariant &staticDestinationCrs = QVariant(),
4032 bool optional =
false );
4037 static QString
typeName() {
return QStringLiteral(
"coordinateoperation" ); }
4040 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4041 QString asScriptCode()
const override;
4043 QStringList dependsOnOtherParameters()
const override;
4045 QVariantMap toVariantMap()
const override;
4046 bool fromVariantMap(
const QVariantMap &map )
override;
4110 QString valueAsPythonStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool allowNonStringValues )
const ;
4112 QString mSourceParameterName;
4113 QString mDestParameterName;
4114 QVariant mSourceCrs;
4137 bool optional =
false );
4142 static QString
typeName() {
return QStringLiteral(
"maptheme" ); }
4145 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4146 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4147 QString asScriptCode()
const override;
4149 QVariantMap toVariantMap()
const override;
4150 bool fromVariantMap(
const QVariantMap &map )
override;
4181 const QVariant &defaultValue = QVariant(),
4182 bool optional =
false,
4183 const QDateTime &minValue = QDateTime(),
4184 const QDateTime &maxValue = QDateTime()
4190 static QString
typeName() {
return QStringLiteral(
"datetime" ); }
4193 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4194 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4195 QString toolTip()
const override;
4205 QDateTime minimum()
const;
4218 void setMinimum(
const QDateTime &minimum );
4227 QDateTime maximum()
const;
4240 void setMaximum(
const QDateTime &maximum );
4254 QVariantMap toVariantMap()
const override;
4255 bool fromVariantMap(
const QVariantMap &map )
override;
4291 bool optional =
false );
4296 static QString
typeName() {
return QStringLiteral(
"providerconnection" ); }
4299 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4300 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4301 QString asScriptCode()
const override;
4303 QVariantMap toVariantMap()
const override;
4304 bool fromVariantMap(
const QVariantMap &map )
override;
4325 QString mProviderId;
4351 QgsProcessingParameterDatabaseSchema(
const QString &name,
const QString &description,
const QString &connectionParameterName = QString(),
const QVariant &defaultValue = QVariant(),
4352 bool optional =
false );
4357 static QString
typeName() {
return QStringLiteral(
"databaseschema" ); }
4360 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4361 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4362 QString asScriptCode()
const override;
4364 QVariantMap toVariantMap()
const override;
4365 bool fromVariantMap(
const QVariantMap &map )
override;
4366 QStringList dependsOnOtherParameters()
const override;
4372 QString parentConnectionParameterName()
const;
4378 void setParentConnectionParameterName(
const QString &name );
4387 QString mParentConnectionParameterName;
4415 const QString &connectionParameterName = QString(),
4416 const QString &schemaParameterName = QString(),
4417 const QVariant &defaultValue = QVariant(),
4418 bool optional =
false,
4419 bool allowNewTableNames =
false );
4424 static QString
typeName() {
return QStringLiteral(
"databasetable" ); }
4427 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4428 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4429 QString asScriptCode()
const override;
4431 QVariantMap toVariantMap()
const override;
4432 bool fromVariantMap(
const QVariantMap &map )
override;
4433 QStringList dependsOnOtherParameters()
const override;
4439 QString parentConnectionParameterName()
const;
4445 void setParentConnectionParameterName(
const QString &name );
4451 QString parentSchemaParameterName()
const;
4457 void setParentSchemaParameterName(
const QString &name );
4470 bool allowNewTableNames()
const;
4478 void setAllowNewTableNames(
bool allowed );
4482 QString mParentConnectionParameterName;
4483 QString mParentSchemaParameterName;
4484 bool mAllowNewTableNames =
false;
4502 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4507 static QString
typeName() {
return QStringLiteral(
"pointcloud" ); }
4510 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4511 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4513 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4514 QString createFileFilter()
const override;
4537 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4542 static QString
typeName() {
return QStringLiteral(
"annotation" ); }
4545 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4546 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4548 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4574 const QVariant &defaultValue = QVariant(),
4575 bool optional =
false,
4576 bool createByDefault =
true );
4581 static QString
typeName() {
return QStringLiteral(
"pointCloudDestination" ); }
4584 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4585 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4587 QString defaultFileExtension() const override;
4588 QString createFileFilter() const override;
4594 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
4616 const QString &parentLayerParameterName = QString(),
4617 bool allowMultiple =
false,
4618 bool optional =
false,
4619 bool defaultToAllAttributes =
false );
4624 static QString
typeName() {
return QStringLiteral(
"attribute" ); }
4627 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4628 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4629 QString asScriptCode()
const override;
4631 QStringList dependsOnOtherParameters()
const override;
4637 QString parentLayerParameterName()
const;
4643 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4649 bool allowMultiple()
const;
4655 void setAllowMultiple(
bool allowMultiple );
4665 bool defaultToAllAttributes()
const;
4675 void setDefaultToAllAttributes(
bool enabled );
4677 QVariantMap toVariantMap()
const override;
4678 bool fromVariantMap(
const QVariantMap &map )
override;
4687 QString mParentLayerParameterName;
4688 bool mAllowMultiple =
false;
4689 bool mDefaultToAllAttributes =
false;
4710 const QVariant &defaultValue = QVariant(),
4711 bool optional =
false,
4712 bool createByDefault =
true );
4717 static QString
typeName() {
return QStringLiteral(
"vectorTileDestination" ); }
4720 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4721 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4723 QString defaultFileExtension() const override;
4724 QString createFileFilter() const override;
4730 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.
@ 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.
This class 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.
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 double numeric parameter for area values.
void setDefaultUnit(Qgis::AreaUnit unit)
Sets the default area unit for the parameter.
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.
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.
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 double numeric parameter for volume values.
static QString typeName()
Returns the type name for the parameter class.
void setDefaultUnit(Qgis::VolumeUnit unit)
Sets the default volume unit for the parameter.
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.
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 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