18#ifndef QGSPROCESSINGPARAMETERS_H
19#define QGSPROCESSINGPARAMETERS_H
66 FlagOverrideDefaultGeometryCheck = 1 << 0,
67 FlagCreateIndividualOutputPerInputFeature = 1 << 1,
69 Q_DECLARE_FLAGS( Flags, Flag )
90 , selectedFeaturesOnly( selectedFeaturesOnly )
91 , featureLimit( featureLimit )
92 , filterExpression( filterExpression )
94 , geometryCheck( geometryCheck )
116 , selectedFeaturesOnly( selectedFeaturesOnly )
117 , featureLimit( featureLimit )
118 , filterExpression( filterExpression )
120 , geometryCheck( geometryCheck )
139 long long featureLimit = -1;
153 Flags flags = Flags();
171 QVariant toVariant()
const;
179 bool loadVariant(
const QVariantMap &map );
184 return source == other.
source
188 && flags == other.
flags
194 return !( *
this == other );
198 operator QVariant()
const
200 return QVariant::fromValue( *
this );
228 , destinationProject( destinationProject )
238 , destinationProject( destinationProject )
301 QVariant toVariant()
const;
309 bool loadVariant(
const QVariantMap &map );
312 operator QVariant()
const
314 return QVariant::fromValue( *
this );
323 bool mUseRemapping =
false;
363 sipType = sipType_QgsProcessingParameterBoolean;
365 sipType = sipType_QgsProcessingParameterCrs;
367 sipType = sipType_QgsProcessingParameterMapLayer;
369 sipType = sipType_QgsProcessingParameterExtent;
371 sipType = sipType_QgsProcessingParameterPoint;
373 sipType = sipType_QgsProcessingParameterGeometry;
375 sipType = sipType_QgsProcessingParameterFile;
377 sipType = sipType_QgsProcessingParameterMatrix;
379 sipType = sipType_QgsProcessingParameterMultipleLayers;
381 sipType = sipType_QgsProcessingParameterNumber;
383 sipType = sipType_QgsProcessingParameterDistance;
385 sipType = sipType_QgsProcessingParameterDuration;
387 sipType = sipType_QgsProcessingParameterScale;
389 sipType = sipType_QgsProcessingParameterRange;
391 sipType = sipType_QgsProcessingParameterRasterLayer;
393 sipType = sipType_QgsProcessingParameterMeshLayer;
395 sipType = sipType_QgsProcessingParameterEnum;
397 sipType = sipType_QgsProcessingParameterString;
399 sipType = sipType_QgsProcessingParameterExpression;
401 sipType = sipType_QgsProcessingParameterAuthConfig;
403 sipType = sipType_QgsProcessingParameterVectorLayer;
405 sipType = sipType_QgsProcessingParameterField;
407 sipType = sipType_QgsProcessingParameterFeatureSource;
409 sipType = sipType_QgsProcessingParameterFeatureSink;
411 sipType = sipType_QgsProcessingParameterVectorDestination;
413 sipType = sipType_QgsProcessingParameterRasterDestination;
415 sipType = sipType_QgsProcessingParameterPointCloudDestination;
417 sipType = sipType_QgsProcessingParameterFileDestination;
419 sipType = sipType_QgsProcessingParameterFolderDestination;
421 sipType = sipType_QgsProcessingParameterBand;
423 sipType = sipType_QgsProcessingParameterLayout;
425 sipType = sipType_QgsProcessingParameterLayoutItem;
427 sipType = sipType_QgsProcessingParameterColor;
429 sipType = sipType_QgsProcessingParameterCoordinateOperation;
431 sipType = sipType_QgsProcessingParameterMapTheme;
433 sipType = sipType_QgsProcessingParameterDateTime;
435 sipType = sipType_QgsProcessingParameterProviderConnection;
437 sipType = sipType_QgsProcessingParameterDatabaseSchema;
439 sipType = sipType_QgsProcessingParameterDatabaseTable;
441 sipType = sipType_QgsProcessingParameterFieldMapping;
443 sipType = sipType_QgsProcessingParameterTinInputLayers;
445 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
447 sipType = sipType_QgsProcessingParameterDxfLayers;
449 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
451 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
453 sipType = sipType_QgsProcessingParameterPointCloudLayer;
455 sipType = sipType_QgsProcessingParameterAnnotationLayer;
457 sipType = sipType_QgsProcessingParameterPointCloudAttribute;
459 sipType = sipType_QgsProcessingParameterVectorTileDestination;
470 FlagAdvanced = 1 << 1,
472 FlagOptional = 1 << 3,
473 FlagIsModelOutput = 1 << 4,
475 Q_DECLARE_FLAGS( Flags, Flag )
481 bool optional =
false,
const QString &help = QString() );
493 virtual QString
type()
const = 0;
507 QString
name()
const {
return mName; }
514 void setName(
const QString &name ) { mName = name; }
528 void setDescription(
const QString &description ) { mDescription = description; }
539 QString
help()
const {
return mHelp; }
550 void setHelp(
const QString &help ) { mHelp = help; }
580 QVariant guiDefaultValueOverride()
const;
607 QVariant defaultValueForGui()
const;
613 Flags
flags()
const {
return mFlags; }
628 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
637 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
650 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
687 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
693 virtual QString asScriptCode()
const;
711 virtual QVariantMap toVariantMap()
const;
718 virtual bool fromVariantMap(
const QVariantMap &map );
740 void setMetadata(
const QVariantMap &metadata ) { mMetadata = metadata; }
766 virtual QString toolTip()
const;
873 AllowMapLayerValues = 1 << 0,
875 Q_DECLARE_FLAGS( ValueAsStringFlags, ValueAsStringFlag )
888 QString valueAsStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool &ok, ValueAsStringFlags flags )
const;
896 QVariant valueAsJsonObjectPrivate(
const QVariant &value,
QgsProcessingContext &context, ValueAsStringFlags flags )
const;
905 QVariant defaultGuiValueFromSetting()
const;
932 bool mIsDynamic =
false;
984 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1191 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_FACTORY;
1214 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_THROW(
QgsProcessingException )
SIP_FACTORY;
1775 static QString descriptionFromName(
const QString &name );
1786 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1805 bool optional =
false );
1810 static QString
typeName() {
return QStringLiteral(
"boolean" ); }
1813 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1814 QString asScriptCode()
const override;
1835 QgsProcessingParameterCrs(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1836 bool optional =
false );
1841 static QString
typeName() {
return QStringLiteral(
"crs" ); }
1844 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1845 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1847 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1870 bool optional =
false );
1875 static QString
typeName() {
return QStringLiteral(
"extent" ); }
1878 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1879 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1881 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1904 QgsProcessingParameterPoint(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1905 bool optional =
false );
1910 static QString
typeName() {
return QStringLiteral(
"point" ); }
1913 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1914 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1940 QgsProcessingParameterGeometry(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
bool optional =
false,
const QList< int > &geometryTypes = QList< int >(),
bool allowMultipart =
true );
1945 static QString
typeName() {
return QStringLiteral(
"geometry" ); }
1948 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1949 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1950 QString asScriptCode()
const override;
1952 QVariantMap toVariantMap()
const override;
1953 bool fromVariantMap(
const QVariantMap &map )
override;
1988 QList<int> mGeomTypes;
1989 bool mAllowMultipart;
2017 QgsProcessingParameterFile(
const QString &name,
const QString &description = QString(), Behavior behavior = File,
const QString &extension = QString(),
const QVariant &defaultValue = QVariant(),
2018 bool optional =
false,
const QString &fileFilter = QString() );
2023 static QString
typeName() {
return QStringLiteral(
"file" ); }
2026 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2027 QString asScriptCode()
const override;
2029 QString createFileFilter()
const override;
2061 void setExtension(
const QString &extension );
2069 QString fileFilter()
const;
2080 void setFileFilter(
const QString &filter );
2082 QVariantMap toVariantMap()
const override;
2083 bool fromVariantMap(
const QVariantMap &map )
override;
2088 static QgsProcessingParameterFile *fromScriptCode(
const QString &name,
const QString &description,
bool isOptional,
const QString &definition, Behavior behavior = File )
SIP_FACTORY;
2092 Behavior mBehavior = File;
2094 QString mFileFilter;
2111 bool hasFixedNumberRows =
false,
const QStringList &headers = QStringList(),
2112 const QVariant &defaultValue = QVariant(),
2113 bool optional =
false );
2118 static QString
typeName() {
return QStringLiteral(
"matrix" ); }
2121 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2122 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2129 QStringList headers()
const;
2135 void setHeaders(
const QStringList &headers );
2143 int numberRows()
const;
2151 void setNumberRows(
int rows );
2158 bool hasFixedNumberRows()
const;
2165 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2167 QVariantMap toVariantMap()
const override;
2168 bool fromVariantMap(
const QVariantMap &map )
override;
2177 QStringList mHeaders;
2178 int mNumberRows = 3;
2179 bool mFixedNumberRows =
false;
2197 const QVariant &defaultValue = QVariant(),
2198 bool optional =
false );
2203 static QString
typeName() {
return QStringLiteral(
"multilayer" ); }
2206 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2207 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2209 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2210 QString asScriptCode()
const override;
2212 QString createFileFilter()
const override;
2231 int minimumNumberInputs()
const;
2238 void setMinimumNumberInputs(
int minimum );
2240 QVariantMap toVariantMap()
const override;
2241 bool fromVariantMap(
const QVariantMap &map )
override;
2251 int mMinimumNumberInputs = 0;
2288 Type type = Integer,
2289 const QVariant &defaultValue = QVariant(),
2290 bool optional =
false,
2291 double minValue = std::numeric_limits<double>::lowest() + 1,
2292 double maxValue = std::numeric_limits<double>::max()
2298 static QString
typeName() {
return QStringLiteral(
"number" ); }
2301 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2302 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2303 QString toolTip()
const override;
2310 double minimum()
const;
2316 void setMinimum(
double minimum );
2322 double maximum()
const;
2328 void setMaximum(
double maximum );
2334 Type dataType()
const;
2340 void setDataType( Type type );
2342 QVariantMap toVariantMap()
const override;
2343 bool fromVariantMap(
const QVariantMap &map )
override;
2352 double mMin = std::numeric_limits<double>::lowest() + 1;
2353 double mMax = std::numeric_limits<double>::max();
2354 Type mDataType = Integer;
2384 const QVariant &defaultValue = QVariant(),
2385 const QString &parentParameterName = QString(),
2386 bool optional =
false,
2387 double minValue = std::numeric_limits<double>::lowest() + 1,
2388 double maxValue = std::numeric_limits<double>::max() );
2393 static QString
typeName() {
return QStringLiteral(
"distance" ); }
2397 QString type() const override;
2398 QStringList dependsOnOtherParameters() const override;
2399 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2405 QString parentParameterName() const;
2411 void setParentParameterName( const QString &parentParameterName );
2419 Qgis::DistanceUnit defaultUnit()
const {
return mDefaultUnit; }
2429 QVariantMap toVariantMap()
const override;
2430 bool fromVariantMap(
const QVariantMap &map )
override;
2434 QString mParentParameterName;
2454 const QVariant &defaultValue = QVariant(),
2455 bool optional =
false,
2456 double minValue = std::numeric_limits<double>::lowest() + 1,
2457 double maxValue = std::numeric_limits<double>::max() );
2462 static QString
typeName() {
return QStringLiteral(
"duration" ); }
2466 QString type() const override;
2467 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2474 Qgis::TemporalUnit defaultUnit()
const {
return mDefaultUnit; }
2483 QVariantMap toVariantMap()
const override;
2484 bool fromVariantMap(
const QVariantMap &map )
override;
2510 const QVariant &defaultValue = QVariant(),
2511 bool optional =
false );
2516 static QString
typeName() {
return QStringLiteral(
"scale" ); }
2520 QString type() const override;
2521 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2545 const QVariant &defaultValue = QVariant(),
2546 bool optional =
false );
2551 static QString
typeName() {
return QStringLiteral(
"range" ); }
2554 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2555 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2570 QVariantMap toVariantMap()
const override;
2571 bool fromVariantMap(
const QVariantMap &map )
override;
2597 bool optional =
false );
2602 static QString
typeName() {
return QStringLiteral(
"raster" ); }
2605 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2606 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2608 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2609 QString createFileFilter()
const override;
2643 QgsProcessingParameterEnum(
const QString &name,
const QString &description = QString(),
const QStringList &options = QStringList(),
2644 bool allowMultiple =
false,
2645 const QVariant &defaultValue = QVariant(),
2646 bool optional =
false,
2647 bool usesStaticStrings =
false );
2652 static QString
typeName() {
return QStringLiteral(
"enum" ); }
2655 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2656 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2657 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
2658 QString asScriptCode()
const override;
2665 QStringList options()
const;
2671 void setOptions(
const QStringList &options );
2677 bool allowMultiple()
const;
2683 void setAllowMultiple(
bool allowMultiple );
2691 bool usesStaticStrings()
const;
2699 void setUsesStaticStrings(
bool usesStaticStrings );
2701 QVariantMap toVariantMap()
const override;
2702 bool fromVariantMap(
const QVariantMap &map )
override;
2711 QStringList mOptions;
2712 bool mAllowMultiple =
false;
2713 bool mUsesStaticStrings =
false;
2751 bool multiLine =
false,
2752 bool optional =
false );
2757 static QString
typeName() {
return QStringLiteral(
"string" ); }
2760 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2761 QString asScriptCode()
const override;
2768 bool multiLine()
const;
2774 void setMultiLine(
bool multiLine );
2776 QVariantMap toVariantMap()
const override;
2777 bool fromVariantMap(
const QVariantMap &map )
override;
2786 bool mMultiLine =
false;
2811 bool optional =
false );
2816 static QString
typeName() {
return QStringLiteral(
"authcfg" ); }
2819 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2820 QString asScriptCode()
const override;
2843 const QString &parentLayerParameterName = QString(),
2849 static QString
typeName() {
return QStringLiteral(
"expression" ); }
2852 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2853 QStringList dependsOnOtherParameters()
const override;
2860 QString parentLayerParameterName()
const;
2866 void setParentLayerParameterName(
const QString &parentLayerParameterName );
2884 QVariantMap toVariantMap()
const override;
2885 bool fromVariantMap(
const QVariantMap &map )
override;
2894 QString mParentLayerParameterName;
2918 QList< int > dataTypes()
const;
2924 void setDataTypes(
const QList< int > &types );
2947 const QString &description = QString(),
2948 const QList< int > &types = QList< int >(),
2949 const QVariant &defaultValue = QVariant(),
2950 bool optional =
false );
2955 static QString
typeName() {
return QStringLiteral(
"vector" ); }
2958 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2959 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2961 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2963 QString createFileFilter()
const override;
2965 QVariantMap toVariantMap()
const override;
2966 bool fromVariantMap(
const QVariantMap &map )
override;
2989 const QString &description = QString(),
2990 const QVariant &defaultValue = QVariant(),
2991 bool optional =
false );
2996 static QString
typeName() {
return QStringLiteral(
"mesh" ); }
2999 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3000 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3002 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3003 QString createFileFilter()
const override;
3025 bool optional =
false,
3026 const QList< int > &types = QList< int >() );
3031 static QString
typeName() {
return QStringLiteral(
"layer" ); }
3034 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3035 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3037 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3038 QString asScriptCode()
const override;
3040 QString createFileFilter()
const override;
3042 QVariantMap toVariantMap()
const override;
3043 bool fromVariantMap(
const QVariantMap &map )
override;
3076 QgsProcessingParameterField(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3077 const QString &parentLayerParameterName = QString(),
3078 DataType type = Any,
3079 bool allowMultiple =
false,
3080 bool optional =
false,
3081 bool defaultToAllFields =
false );
3086 static QString
typeName() {
return QStringLiteral(
"field" ); }
3089 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3090 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3091 QString asScriptCode()
const override;
3093 QStringList dependsOnOtherParameters()
const override;
3099 QString parentLayerParameterName()
const;
3105 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3111 DataType dataType()
const;
3117 void setDataType( DataType type );
3123 bool allowMultiple()
const;
3129 void setAllowMultiple(
bool allowMultiple );
3140 bool defaultToAllFields()
const;
3151 void setDefaultToAllFields(
bool enabled );
3153 QVariantMap toVariantMap()
const override;
3154 bool fromVariantMap(
const QVariantMap &map )
override;
3163 QString mParentLayerParameterName;
3164 DataType mDataType = Any;
3165 bool mAllowMultiple =
false;
3166 bool mDefaultToAllFields =
false;
3185 const QList< int > &types = QList< int >(),
3186 const QVariant &defaultValue = QVariant(),
bool optional =
false );
3191 static QString
typeName() {
return QStringLiteral(
"source" ); }
3194 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3195 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3197 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3198 QString asScriptCode()
const override;
3200 QString createFileFilter()
const override;
3202 QVariantMap toVariantMap()
const override;
3203 bool fromVariantMap(
const QVariantMap &map )
override;
3230 bool optional =
false,
bool createByDefault =
true );
3233 QVariantMap toVariantMap()
const override;
3234 bool fromVariantMap(
const QVariantMap &map )
override;
3236 QString createFileFilter()
const override;
3269 virtual QString generateTemporaryDestination(
const QgsProcessingContext *context =
nullptr )
const;
3292 bool createByDefault()
const;
3299 void setCreateByDefault(
bool createByDefault );
3324 bool mSupportsNonFileBasedOutputs =
true;
3325 bool mCreateByDefault =
true;
3327 friend class QgsProcessingModelAlgorithm;
3328 friend class TestQgsProcessing;
3329 friend class TestQgsProcessingModelAlgorithm;
3352 bool optional =
false,
bool createByDefault =
true,
bool supportsAppend =
false );
3357 static QString
typeName() {
return QStringLiteral(
"sink" ); }
3360 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3361 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3362 QString asScriptCode()
const override;
3364 QString defaultFileExtension() const override;
3365 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3366 QString createFileFilter() const override;
3373 virtual QStringList supportedOutputVectorLayerExtensions() const;
3385 bool hasGeometry() const;
3401 bool supportsAppend() const;
3411 void setSupportsAppend(
bool supportsAppend );
3413 QVariantMap toVariantMap() const override;
3414 bool fromVariantMap( const QVariantMap &map ) override;
3415 QString generateTemporaryDestination( const
QgsProcessingContext *context =
nullptr ) const override;
3425 bool mSupportsAppend = false;
3450 bool optional =
false,
bool createByDefault =
true );
3455 static QString
typeName() {
return QStringLiteral(
"vectorDestination" ); }
3458 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3459 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3460 QString asScriptCode()
const override;
3462 QString defaultFileExtension() const override;
3463 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3464 QString createFileFilter() const override;
3471 virtual QStringList supportedOutputVectorLayerExtensions() const;
3483 bool hasGeometry() const;
3491 QVariantMap toVariantMap() const override;
3492 bool fromVariantMap( const QVariantMap &map ) override;
3523 const QVariant &defaultValue = QVariant(),
3524 bool optional =
false,
3525 bool createByDefault =
true );
3530 static QString
typeName() {
return QStringLiteral(
"rasterDestination" ); }
3533 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3534 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3536 QString defaultFileExtension() const override;
3537 QString createFileFilter() const override;
3544 virtual QStringList supportedOutputRasterLayerExtensions() const;
3584 const QString &fileFilter = QString(),
3585 const QVariant &defaultValue = QVariant(),
3586 bool optional =
false,
3587 bool createByDefault =
true );
3592 static QString
typeName() {
return QStringLiteral(
"fileDestination" ); }
3595 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3596 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3598 QString defaultFileExtension() const override;
3599 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3600 QString createFileFilter() const override;
3606 QString fileFilter() const;
3612 void setFileFilter( const QString &filter );
3614 QVariantMap toVariantMap() const override;
3615 bool fromVariantMap( const QVariantMap &map ) override;
3625 QString mFileFilter;
3643 const QVariant &defaultValue = QVariant(),
3644 bool optional =
false,
3645 bool createByDefault =
true );
3650 static QString
typeName() {
return QStringLiteral(
"folderDestination" ); }
3653 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3655 QString defaultFileExtension() const override;
3677 QgsProcessingParameterBand(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3678 const QString &parentLayerParameterName = QString(),
3679 bool optional =
false,
3680 bool allowMultiple =
false );
3685 static QString
typeName() {
return QStringLiteral(
"band" ); }
3688 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3689 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3690 QString asScriptCode()
const override;
3691 QStringList dependsOnOtherParameters()
const override;
3698 QString parentLayerParameterName()
const;
3704 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3706 QVariantMap toVariantMap()
const override;
3707 bool fromVariantMap(
const QVariantMap &map )
override;
3719 bool allowMultiple()
const;
3726 void setAllowMultiple(
bool allowMultiple );
3730 QString mParentLayerParameterName;
3731 bool mAllowMultiple =
false;
3753 bool optional =
false );
3758 static QString
typeName() {
return QStringLiteral(
"layout" ); }
3761 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3762 QString asScriptCode()
const override;
3791 const QString &parentLayoutParameterName = QString(),
3793 bool optional =
false );
3798 static QString
typeName() {
return QStringLiteral(
"layoutitem" ); }
3801 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3802 QString asScriptCode()
const override;
3804 QVariantMap toVariantMap()
const override;
3805 bool fromVariantMap(
const QVariantMap &map )
override;
3806 QStringList dependsOnOtherParameters()
const override;
3817 QString parentLayoutParameterName()
const;
3823 void setParentLayoutParameterName(
const QString &name );
3832 int itemType()
const;
3841 void setItemType(
int type );
3844 QString mParentLayoutParameterName;
3866 QgsProcessingParameterColor(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3867 bool opacityEnabled =
true,
3868 bool optional =
false );
3873 static QString
typeName() {
return QStringLiteral(
"color" ); }
3876 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3877 QString asScriptCode()
const override;
3879 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3880 QVariantMap toVariantMap()
const override;
3881 bool fromVariantMap(
const QVariantMap &map )
override;
3889 bool opacityEnabled()
const;
3898 void setOpacityEnabled(
bool enabled );
3907 bool mAllowOpacity =
true;
3929 const QString &sourceCrsParameterName = QString(),
const QString &destinationCrsParameterName = QString(),
3930 const QVariant &staticSourceCrs = QVariant(),
const QVariant &staticDestinationCrs = QVariant(),
3931 bool optional =
false );
3936 static QString
typeName() {
return QStringLiteral(
"coordinateoperation" ); }
3939 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3940 QString asScriptCode()
const override;
3942 QStringList dependsOnOtherParameters()
const override;
3944 QVariantMap toVariantMap()
const override;
3945 bool fromVariantMap(
const QVariantMap &map )
override;
4010 QString mSourceParameterName;
4011 QString mDestParameterName;
4012 QVariant mSourceCrs;
4035 bool optional =
false );
4040 static QString
typeName() {
return QStringLiteral(
"maptheme" ); }
4043 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4044 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4045 QString asScriptCode()
const override;
4047 QVariantMap toVariantMap()
const override;
4048 bool fromVariantMap(
const QVariantMap &map )
override;
4086 Type type = DateTime,
4087 const QVariant &defaultValue = QVariant(),
4088 bool optional =
false,
4089 const QDateTime &minValue = QDateTime(),
4090 const QDateTime &maxValue = QDateTime()
4096 static QString
typeName() {
return QStringLiteral(
"datetime" ); }
4099 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4100 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4101 QString toolTip()
const override;
4111 QDateTime minimum()
const;
4124 void setMinimum(
const QDateTime &minimum );
4133 QDateTime maximum()
const;
4146 void setMaximum(
const QDateTime &maximum );
4152 Type dataType()
const;
4158 void setDataType( Type type );
4160 QVariantMap toVariantMap()
const override;
4161 bool fromVariantMap(
const QVariantMap &map )
override;
4172 Type mDataType = DateTime;
4197 bool optional =
false );
4202 static QString
typeName() {
return QStringLiteral(
"providerconnection" ); }
4205 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4206 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4207 QString asScriptCode()
const override;
4209 QVariantMap toVariantMap()
const override;
4210 bool fromVariantMap(
const QVariantMap &map )
override;
4231 QString mProviderId;
4257 QgsProcessingParameterDatabaseSchema(
const QString &name,
const QString &description,
const QString &connectionParameterName = QString(),
const QVariant &defaultValue = QVariant(),
4258 bool optional =
false );
4263 static QString
typeName() {
return QStringLiteral(
"databaseschema" ); }
4266 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4267 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4268 QString asScriptCode()
const override;
4270 QVariantMap toVariantMap()
const override;
4271 bool fromVariantMap(
const QVariantMap &map )
override;
4272 QStringList dependsOnOtherParameters()
const override;
4278 QString parentConnectionParameterName()
const;
4284 void setParentConnectionParameterName(
const QString &name );
4293 QString mParentConnectionParameterName;
4321 const QString &connectionParameterName = QString(),
4322 const QString &schemaParameterName = QString(),
4323 const QVariant &defaultValue = QVariant(),
4324 bool optional =
false,
4325 bool allowNewTableNames =
false );
4330 static QString
typeName() {
return QStringLiteral(
"databasetable" ); }
4333 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4334 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4335 QString asScriptCode()
const override;
4337 QVariantMap toVariantMap()
const override;
4338 bool fromVariantMap(
const QVariantMap &map )
override;
4339 QStringList dependsOnOtherParameters()
const override;
4345 QString parentConnectionParameterName()
const;
4351 void setParentConnectionParameterName(
const QString &name );
4357 QString parentSchemaParameterName()
const;
4363 void setParentSchemaParameterName(
const QString &name );
4376 bool allowNewTableNames()
const;
4384 void setAllowNewTableNames(
bool allowed );
4388 QString mParentConnectionParameterName;
4389 QString mParentSchemaParameterName;
4390 bool mAllowNewTableNames =
false;
4408 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4413 static QString
typeName() {
return QStringLiteral(
"pointcloud" ); }
4416 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4417 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4419 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4420 QString createFileFilter()
const override;
4443 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4448 static QString
typeName() {
return QStringLiteral(
"annotation" ); }
4451 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4452 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4454 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4480 const QVariant &defaultValue = QVariant(),
4481 bool optional =
false,
4482 bool createByDefault =
true );
4487 static QString
typeName() {
return QStringLiteral(
"pointCloudDestination" ); }
4490 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4491 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4493 QString defaultFileExtension() const override;
4494 QString createFileFilter() const override;
4500 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
4522 const QString &parentLayerParameterName = QString(),
4523 bool allowMultiple =
false,
4524 bool optional =
false,
4525 bool defaultToAllAttributes =
false );
4530 static QString
typeName() {
return QStringLiteral(
"attribute" ); }
4533 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4534 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4535 QString asScriptCode()
const override;
4537 QStringList dependsOnOtherParameters()
const override;
4543 QString parentLayerParameterName()
const;
4549 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4555 bool allowMultiple()
const;
4561 void setAllowMultiple(
bool allowMultiple );
4571 bool defaultToAllAttributes()
const;
4581 void setDefaultToAllAttributes(
bool enabled );
4583 QVariantMap toVariantMap()
const override;
4584 bool fromVariantMap(
const QVariantMap &map )
override;
4593 QString mParentLayerParameterName;
4594 bool mAllowMultiple =
false;
4595 bool mDefaultToAllAttributes =
false;
4616 const QVariant &defaultValue = QVariant(),
4617 bool optional =
false,
4618 bool createByDefault =
true );
4623 static QString
typeName() {
return QStringLiteral(
"vectorTileDestination" ); }
4626 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4627 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4629 QString defaultFileExtension() const override;
4630 QString createFileFilter() const override;
4636 virtual QStringList supportedOutputVectorTileLayerExtensions() const;
The Qgis class provides global constants for use throughout the application.
ExpressionType
Expression types.
@ Qgis
Native QGIS expression.
DistanceUnit
Units of distance.
@ Unknown
Unknown distance unit.
TemporalUnit
Temporal units.
@ Milliseconds
Milliseconds.
WkbType
The WKB type describes the number of dimensions a geometry has.
Represents a map layer containing a set of georeferenced annotations, e.g.
This class represents a coordinate reference system (CRS).
This class wraps a request for features to a vector layer (or directly its vector data provider).
InvalidGeometryCheck
Handling of features with invalid geometries.
@ GeometryAbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
An interface for objects which accept features via addFeature(s) methods.
Container of fields for a vector layer.
Abstract interface for classes which generate a file filter string.
A geometry is the spatial representation of a feature.
Base class for graphical items within a QgsLayout.
Base class for all map layer types.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Represents a map layer supporting display of point clouds.
A class to represent a 2D point.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Abstract base class for processing algorithms.
Contains information about the context in which a processing algorithm is executed.
Base class for all parameter definitions which represent file or layer destinations,...
virtual QString defaultFileExtension() const =0
Returns the default file extension for destination file paths associated with this parameter.
bool supportsNonFileBasedOutput() const
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or ...
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
virtual QgsProcessingOutputDefinition * toOutputDefinition() const =0
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parame...
QgsProcessingProvider * originalProvider() const
Original (source) provider which this parameter has been derived from.
void setSupportsNonFileBasedOutput(bool supportsNonFileBasedOutput)
Sets whether the destination parameter supports non filed-based outputs, such as memory layers or dir...
Custom exception class for processing related exceptions.
Encapsulates settings relating to a feature source input to a processing algorithm.
Flags flags
Flags which dictate source behavior.
bool operator!=(const QgsProcessingFeatureSourceDefinition &other) const
bool selectedFeaturesOnly
true if only selected features in the source should be used by algorithms.
QgsFeatureRequest::InvalidGeometryCheck geometryCheck
Geometry check method to apply to this source.
bool operator==(const QgsProcessingFeatureSourceDefinition &other) const
QgsProcessingFeatureSourceDefinition(const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, QgsProcessingFeatureSourceDefinition::Flags flags=QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck=QgsFeatureRequest::GeometryAbortOnInvalid, const QString &filterExpression=QString())
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.
QgsProperty source
Source definition.
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...
Flag
Flags which control source behavior.
QString filterExpression
Optional expression filter to use for filtering features which will be read from the source.
QgsFeatureSource subclass which proxies methods to an underlying QgsFeatureSource,...
Base class for providing feedback from a processing algorithm.
Base class for the definition of processing outputs.
Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm.
QgsProcessingOutputLayerDefinition(const QgsProperty &sink, QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer.
QgsProperty sink
Sink/layer definition.
bool useRemapping() const
Returns true if the output uses a remapping definition.
QgsProcessingOutputLayerDefinition(const QString &sink=QString(), QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string.
QgsRemappingSinkDefinition remappingDefinition() const
Returns the output remapping definition, if useRemapping() is true.
QString destinationName
Name to use for sink if it's to be loaded into a destination project.
QVariantMap createOptions
Map of optional sink/layer creation options, which are passed to the underlying provider when creatin...
An annotation layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for authentication configuration ID values.
static QString typeName()
Returns the type name for the parameter class.
A raster band parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A boolean parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A color parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A coordinate operation parameter for processing algorithms, for selection between available coordinat...
static QString typeName()
Returns the type name for the parameter class.
QVariant sourceCrs() const
Returns the static source CRS, or an invalid value if this is not set.
QString destinationCrsParameterName() const
Returns the name of the destination CRS parameter, or an empty string if this is not set.
void setDestinationCrsParameterName(const QString &name)
Sets the name of the destination CRS parameter.
void setSourceCrs(const QVariant &crs)
Sets the static source crs.
QVariant destinationCrs() const
Returns the static destination CRS, or an invalid value if this is not set.
void setDestinationCrs(const QVariant &crs)
Sets the static destination crs.
void setSourceCrsParameterName(const QString &name)
Sets the name of the source CRS parameter.
QString sourceCrsParameterName() const
Returns the name of the source CRS parameter, or an empty string if this is not set.
A coordinate reference system parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A database schema parameter for processing algorithms, allowing users to select from existing schemas...
static QString typeName()
Returns the type name for the parameter class.
A database table name parameter for processing algorithms, allowing users to select from existing dat...
static QString typeName()
Returns the type name for the parameter class.
A datetime (or pure date or time) parameter for processing algorithms.
@ DateTime
Datetime values.
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.
void setMetadata(const QVariantMap &metadata)
Sets the parameter's freeform metadata.
Flags mFlags
Parameter flags.
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.
Flags flags() const
Returns any flags associated with the parameter.
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.
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....
void setFlags(Flags flags)
Sets the flags associated with the parameter.
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.
DataType
Field data types.
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(Behavior behavior)
Sets the parameter behavior (e.g.
Behavior
Parameter behavior.
@ Folder
Parameter is a folder.
Behavior 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.
@ Double
Double/float values.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer attribute parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer destination parameter, for specifying the destination path for a point cloud laye...
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A data provider connection parameter for processing algorithms, allowing users to select from availab...
static QString typeName()
Returns the type name for the parameter class.
void setProviderId(const QString &provider)
Sets the ID of the provider associated with the connections.
QString providerId() const
Returns the ID of the provider associated with the connections.
A numeric range parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
static QString typeName()
Returns the type name for the parameter class.
A raster layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for map scale values.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector layer destination parameter, for specifying the destination path for a vector layer created ...
static QString typeName()
Returns the type name for the parameter class.
A vector layer (with or without geometry) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector tile layer destination parameter, for specifying the destination path for a vector tile laye...
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A collection of utilities for working with parameters when running a processing algorithm.
Abstract base class for processing providers.
LayerHint
Layer type hints.
@ UnknownType
Unknown layer type.
Contains enumerations and other constants for use in processing algorithms and parameters.
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
SourceType
Data source types enum.
@ TypeVectorAnyGeometry
Any vector layer with geometry.
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