QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
qgsprocessingparameters.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprocessingparameters.h
3  -------------------------
4  begin : April 2017
5  copyright : (C) 2017 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSPROCESSINGPARAMETERS_H
19 #define QGSPROCESSINGPARAMETERS_H
20 
21 #include "qgis_core.h"
22 #include "qgis.h"
23 #include "qgsprocessing.h"
24 #include "qgsproperty.h"
26 #include "qgsfeaturesource.h"
27 #include "qgsprocessingutils.h"
28 #include "qgsfilefiltergenerator.h"
30 #include <QMap>
31 #include <limits>
32 
35 class QgsRasterLayer;
36 class QgsMeshLayer;
37 class QgsVectorLayer;
38 class QgsFeatureSink;
43 class QgsPrintLayout;
44 class QgsLayoutItem;
45 
56 {
57  public:
58 
63  enum Flag
64  {
65  FlagOverrideDefaultGeometryCheck = 1 << 0,
66  FlagCreateIndividualOutputPerInputFeature = 1 << 1,
67  };
68  Q_DECLARE_FLAGS( Flags, Flag )
69 
70 
83  QgsProcessingFeatureSourceDefinition( const QString &source = QString(), bool selectedFeaturesOnly = false, long long featureLimit = -1,
84  QgsProcessingFeatureSourceDefinition::Flags flags = QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid )
85  : source( QgsProperty::fromValue( source ) )
86  , selectedFeaturesOnly( selectedFeaturesOnly )
87  , featureLimit( featureLimit )
88  , flags( flags )
89  , geometryCheck( geometryCheck )
90  {}
91 
105  QgsProcessingFeatureSourceDefinition( const QgsProperty &source, bool selectedFeaturesOnly = false, long long featureLimit = -1,
106  QgsProcessingFeatureSourceDefinition::Flags flags = QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid )
107  : source( source )
108  , selectedFeaturesOnly( selectedFeaturesOnly )
109  , featureLimit( featureLimit )
110  , flags( flags )
111  , geometryCheck( geometryCheck )
112  {}
113 
118 
123 
130  long long featureLimit = -1;
131 
137  Flags flags = Flags();
138 
148 
155  QVariant toVariant() const;
156 
163  bool loadVariant( const QVariantMap &map );
164 
166  {
167  return source == other.source
168  && selectedFeaturesOnly == other.selectedFeaturesOnly
169  && featureLimit == other.featureLimit
170  && flags == other.flags
171  && geometryCheck == other.geometryCheck;
172  }
173 
175  {
176  return !( *this == other );
177  }
178 
180  operator QVariant() const
181  {
182  return QVariant::fromValue( *this );
183  }
184 
185 };
186 
188 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProcessingFeatureSourceDefinition::Flags )
189 
190 
200 {
201  public:
202 
208  QgsProcessingOutputLayerDefinition( const QString &sink = QString(), QgsProject *destinationProject = nullptr )
209  : sink( QgsProperty::fromValue( sink ) )
210  , destinationProject( destinationProject )
211  {}
212 
218  QgsProcessingOutputLayerDefinition( const QgsProperty &sink, QgsProject *destinationProject = nullptr )
219  : sink( sink )
220  , destinationProject( destinationProject )
221  {}
222 
227 
233  QgsProject *destinationProject = nullptr;
234 
239 
246  QVariantMap createOptions;
247 
254  bool useRemapping() const { return mUseRemapping; }
255 
263  QgsRemappingSinkDefinition remappingDefinition() const { return mRemappingDefinition; }
264 
275  void setRemappingDefinition( const QgsRemappingSinkDefinition &definition );
276 
283  QVariant toVariant() const;
284 
291  bool loadVariant( const QVariantMap &map );
292 
294  operator QVariant() const
295  {
296  return QVariant::fromValue( *this );
297  }
298 
299  bool operator==( const QgsProcessingOutputLayerDefinition &other ) const;
300  bool operator!=( const QgsProcessingOutputLayerDefinition &other ) const;
301 
302  private:
303 
304  bool mUseRemapping = false;
305  QgsRemappingSinkDefinition mRemappingDefinition;
306 
307 };
308 
310 
311 
312 
313 
314 //
315 // Parameter definitions
316 //
317 
318 
331 {
332 
333 #ifdef SIP_RUN
334  % TypeHeaderCode
341  % End
343  if ( sipCpp->type() == QgsProcessingParameterBoolean::typeName() )
344  sipType = sipType_QgsProcessingParameterBoolean;
345  else if ( sipCpp->type() == QgsProcessingParameterCrs::typeName() )
346  sipType = sipType_QgsProcessingParameterCrs;
347  else if ( sipCpp->type() == QgsProcessingParameterMapLayer::typeName() )
348  sipType = sipType_QgsProcessingParameterMapLayer;
349  else if ( sipCpp->type() == QgsProcessingParameterExtent::typeName() )
350  sipType = sipType_QgsProcessingParameterExtent;
351  else if ( sipCpp->type() == QgsProcessingParameterPoint::typeName() )
352  sipType = sipType_QgsProcessingParameterPoint;
353  else if ( sipCpp->type() == QgsProcessingParameterGeometry::typeName() )
354  sipType = sipType_QgsProcessingParameterGeometry;
355  else if ( sipCpp->type() == QgsProcessingParameterFile::typeName() )
356  sipType = sipType_QgsProcessingParameterFile;
357  else if ( sipCpp->type() == QgsProcessingParameterMatrix::typeName() )
358  sipType = sipType_QgsProcessingParameterMatrix;
359  else if ( sipCpp->type() == QgsProcessingParameterMultipleLayers::typeName() )
360  sipType = sipType_QgsProcessingParameterMultipleLayers;
361  else if ( sipCpp->type() == QgsProcessingParameterNumber::typeName() )
362  sipType = sipType_QgsProcessingParameterNumber;
363  else if ( sipCpp->type() == QgsProcessingParameterDistance::typeName() )
364  sipType = sipType_QgsProcessingParameterDistance;
365  else if ( sipCpp->type() == QgsProcessingParameterScale::typeName() )
366  sipType = sipType_QgsProcessingParameterScale;
367  else if ( sipCpp->type() == QgsProcessingParameterRange::typeName() )
368  sipType = sipType_QgsProcessingParameterRange;
369  else if ( sipCpp->type() == QgsProcessingParameterRasterLayer::typeName() )
370  sipType = sipType_QgsProcessingParameterRasterLayer;
371  else if ( sipCpp->type() == QgsProcessingParameterMeshLayer::typeName() )
372  sipType = sipType_QgsProcessingParameterMeshLayer;
373  else if ( sipCpp->type() == QgsProcessingParameterEnum::typeName() )
374  sipType = sipType_QgsProcessingParameterEnum;
375  else if ( sipCpp->type() == QgsProcessingParameterString::typeName() )
376  sipType = sipType_QgsProcessingParameterString;
377  else if ( sipCpp->type() == QgsProcessingParameterExpression::typeName() )
378  sipType = sipType_QgsProcessingParameterExpression;
379  else if ( sipCpp->type() == QgsProcessingParameterAuthConfig::typeName() )
380  sipType = sipType_QgsProcessingParameterAuthConfig;
381  else if ( sipCpp->type() == QgsProcessingParameterVectorLayer::typeName() )
382  sipType = sipType_QgsProcessingParameterVectorLayer;
383  else if ( sipCpp->type() == QgsProcessingParameterField::typeName() )
384  sipType = sipType_QgsProcessingParameterField;
385  else if ( sipCpp->type() == QgsProcessingParameterFeatureSource::typeName() )
386  sipType = sipType_QgsProcessingParameterFeatureSource;
387  else if ( sipCpp->type() == QgsProcessingParameterFeatureSink::typeName() )
388  sipType = sipType_QgsProcessingParameterFeatureSink;
389  else if ( sipCpp->type() == QgsProcessingParameterVectorDestination::typeName() )
390  sipType = sipType_QgsProcessingParameterVectorDestination;
391  else if ( sipCpp->type() == QgsProcessingParameterRasterDestination::typeName() )
392  sipType = sipType_QgsProcessingParameterRasterDestination;
393  else if ( sipCpp->type() == QgsProcessingParameterFileDestination::typeName() )
394  sipType = sipType_QgsProcessingParameterFileDestination;
395  else if ( sipCpp->type() == QgsProcessingParameterFolderDestination::typeName() )
396  sipType = sipType_QgsProcessingParameterFolderDestination;
397  else if ( sipCpp->type() == QgsProcessingParameterBand::typeName() )
398  sipType = sipType_QgsProcessingParameterBand;
399  else if ( sipCpp->type() == QgsProcessingParameterLayout::typeName() )
400  sipType = sipType_QgsProcessingParameterLayout;
401  else if ( sipCpp->type() == QgsProcessingParameterLayoutItem::typeName() )
402  sipType = sipType_QgsProcessingParameterLayoutItem;
403  else if ( sipCpp->type() == QgsProcessingParameterColor::typeName() )
404  sipType = sipType_QgsProcessingParameterColor;
405  else if ( sipCpp->type() == QgsProcessingParameterCoordinateOperation::typeName() )
406  sipType = sipType_QgsProcessingParameterCoordinateOperation;
407  else if ( sipCpp->type() == QgsProcessingParameterMapTheme::typeName() )
408  sipType = sipType_QgsProcessingParameterMapTheme;
409  else if ( sipCpp->type() == QgsProcessingParameterDateTime::typeName() )
410  sipType = sipType_QgsProcessingParameterDateTime;
411  else if ( sipCpp->type() == QgsProcessingParameterProviderConnection::typeName() )
412  sipType = sipType_QgsProcessingParameterProviderConnection;
413  else if ( sipCpp->type() == QgsProcessingParameterDatabaseSchema::typeName() )
414  sipType = sipType_QgsProcessingParameterDatabaseSchema;
415  else if ( sipCpp->type() == QgsProcessingParameterDatabaseTable::typeName() )
416  sipType = sipType_QgsProcessingParameterDatabaseTable;
417  else if ( sipCpp->type() == QgsProcessingParameterFieldMapping::typeName() )
418  sipType = sipType_QgsProcessingParameterFieldMapping;
419  else if ( sipCpp->type() == QgsProcessingParameterTinInputLayers::typeName() )
420  sipType = sipType_QgsProcessingParameterTinInputLayers;
421  else if ( sipCpp->type() == QgsProcessingParameterVectorTileWriterLayers::typeName() )
422  sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
423  else if ( sipCpp->type() == QgsProcessingParameterDxfLayers::typeName() )
424  sipType = sipType_QgsProcessingParameterDxfLayers;
425  else if ( sipCpp->type() == QgsProcessingParameterMeshDatasetGroups::typeName() )
426  sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
427  else if ( sipCpp->type() == QgsProcessingParameterMeshDatasetTime::typeName() )
428  sipType = sipType_QgsProcessingParameterMeshDatasetTime;
429  else
430  sipType = nullptr;
431  SIP_END
432 #endif
433 
434  public:
435 
437  enum Flag
438  {
439  FlagAdvanced = 1 << 1,
440  FlagHidden = 1 << 2,
441  FlagOptional = 1 << 3,
442  FlagIsModelOutput = 1 << 4,
443  };
444  Q_DECLARE_FLAGS( Flags, Flag )
445 
446 
449  QgsProcessingParameterDefinition( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
450  bool optional = false, const QString &help = QString() );
451 
453 
458 
462  virtual QString type() const = 0;
463 
469  virtual bool isDestination() const { return false; }
470 
476  QString name() const { return mName; }
477 
483  void setName( const QString &name ) { mName = name; }
484 
490  QString description() const { return mDescription; }
491 
497  void setDescription( const QString &description ) { mDescription = description; }
498 
508  QString help() const { return mHelp; }
509 
519  void setHelp( const QString &help ) { mHelp = help; }
520 
527  QVariant defaultValue() const { return mDefault; }
528 
535  void setDefaultValue( const QVariant &value ) { mDefault = value; }
536 
549  QVariant guiDefaultValueOverride() const { return mGuiDefault; }
550 
566  void setGuiDefaultValueOverride( const QVariant &value ) { mGuiDefault = value; }
567 
576  QVariant defaultValueForGui() const { return mGuiDefault.isValid() ? mGuiDefault : mDefault; }
577 
582  Flags flags() const { return mFlags; }
583 
588  void setFlags( Flags flags ) { mFlags = flags; }
589 
597  virtual bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const;
598 
603  virtual QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const;
604 
609  virtual QString asScriptCode() const;
610 
620  virtual QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const;
621 
627  virtual QVariantMap toVariantMap() const;
628 
634  virtual bool fromVariantMap( const QVariantMap &map );
635 
642  SIP_SKIP QVariantMap metadata() const { return mMetadata; }
643 
649  QVariantMap &metadata() { return mMetadata; }
650 
656  void setMetadata( const QVariantMap &metadata ) { mMetadata = metadata; }
657 
662  virtual QStringList dependsOnOtherParameters() const { return QStringList(); }
663 
670 
676  QgsProcessingProvider *provider() const;
677 
682  virtual QString toolTip() const;
683 
691  bool isDynamic() const { return mIsDynamic; }
692 
700  void setIsDynamic( bool dynamic ) { mIsDynamic = dynamic; }
701 
708  QgsPropertyDefinition dynamicPropertyDefinition() const { return mPropertyDefinition; }
709 
716  void setDynamicPropertyDefinition( const QgsPropertyDefinition &definition ) { mPropertyDefinition = definition; }
717 
729  QString dynamicLayerParameterName() const { return mDynamicLayerParameterName; }
730 
742  void setDynamicLayerParameterName( const QString &name ) { mDynamicLayerParameterName = name; }
743 
757  QStringList additionalExpressionContextVariables() const { return mAdditionalExpressionVariables; }
758 
776  void setAdditionalExpressionContextVariables( const QStringList &variables ) { mAdditionalExpressionVariables = variables; }
777 
778  protected:
779 
781  QString mName;
782 
784  QString mDescription;
785 
787  QString mHelp;
788 
790  QVariant mDefault;
791 
793  QVariant mGuiDefault;
794 
796  Flags mFlags;
797 
799  QVariantMap mMetadata;
800 
802  QgsProcessingAlgorithm *mAlgorithm = nullptr;
803 
805  bool mIsDynamic = false;
806 
809 
812 
815 
816  // To allow access to mAlgorithm. We don't want a public setter for this!
818 
819 };
820 
821 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProcessingParameterDefinition::Flags )
822 
823 typedef QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions;
825 
844 class CORE_EXPORT QgsProcessingParameters
845 {
846 
847  public:
848 
853  static bool isDynamic( const QVariantMap &parameters, const QString &name );
854 
858  static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
859 
864  static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
865 
869  static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
870 
875  static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
876 
880  static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
881 
886  static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
887 
891  static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
892 
897  static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
898 
903  static QList<int> parameterAsInts( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
904 
909  static QList<int> parameterAsInts( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
910 
919  static QDateTime parameterAsDateTime( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
920 
929  static QDateTime parameterAsDateTime( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
930 
939  static QDate parameterAsDate( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
940 
949  static QDate parameterAsDate( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
950 
959  static QTime parameterAsTime( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
960 
969  static QTime parameterAsTime( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
970 
974  static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
975 
980  static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
981 
985  static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
986 
991  static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
992 
997  static QString parameterAsEnumString( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
998 
1003  static QString parameterAsEnumString( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1004 
1009  static QStringList parameterAsEnumStrings( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1010 
1015  static QStringList parameterAsEnumStrings( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1016 
1020  static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1021 
1027  static bool parameterAsBoolean( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1028 
1033  static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1034 
1039  static bool parameterAsBoolean( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1040 
1058  static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters,
1059  const QgsFields &fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem &crs,
1060  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;
1061 
1081  static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariant &value,
1082  const QgsFields &fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem &crs,
1083  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;
1084 
1093  static QgsProcessingFeatureSource *parameterAsSource( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context ) SIP_FACTORY;
1094 
1105  static QgsProcessingFeatureSource *parameterAsSource( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context ) SIP_FACTORY;
1106 
1122  static QString parameterAsCompatibleSourceLayerPath( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters,
1123  QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat = QString( "shp" ), QgsProcessingFeedback *feedback = nullptr );
1124 
1154  static QString parameterAsCompatibleSourceLayerPathAndLayerName( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters,
1155  QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat = QString( "shp" ), QgsProcessingFeedback *feedback = nullptr, QString *layerName SIP_OUT = nullptr );
1156 
1164  static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingUtils::LayerHint layerHint = QgsProcessingUtils::LayerHint::UnknownType );
1165 
1175  static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context, QgsProcessingUtils::LayerHint layerHint = QgsProcessingUtils::LayerHint::UnknownType );
1176 
1184  static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1185 
1195  static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1196 
1200  static QString parameterAsOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1201 
1206  static QString parameterAsOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1207 
1211  static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1212 
1217  static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1218 
1226  static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1227 
1237  static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1238 
1248  static QgsMeshLayer *parameterAsMeshLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1249 
1259  static QgsMeshLayer *parameterAsMeshLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1260 
1261 
1265  static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1266 
1271  static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1272 
1282  static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context,
1284 
1296  static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context,
1298 
1310  static QgsGeometry parameterAsExtentGeometry( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context,
1312 
1318  static QgsCoordinateReferenceSystem parameterAsExtentCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1319 
1325  static QgsCoordinateReferenceSystem parameterAsExtentCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1326 
1327 
1335  static QgsPointXY parameterAsPoint( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context,
1337 
1346  static QgsPointXY parameterAsPoint( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context,
1348 
1354  static QgsCoordinateReferenceSystem parameterAsPointCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1355 
1362  static QgsCoordinateReferenceSystem parameterAsPointCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1363 
1369  static QgsGeometry parameterAsGeometry( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
1370 
1376  static QgsGeometry parameterAsGeometry( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
1377 
1384  static QgsCoordinateReferenceSystem parameterAsGeometryCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1385 
1392  static QgsCoordinateReferenceSystem parameterAsGeometryCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1393 
1397  static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1398 
1403  static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1404 
1409  static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1410 
1416  static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1417 
1421  static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1422 
1427  static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1428 
1434  static QStringList parameterAsFileList( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1435 
1441  static QStringList parameterAsFileList( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1442 
1446  static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1447 
1452  static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1453 
1457  static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1458 
1463  static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1464 
1473  static QgsPrintLayout *parameterAsLayout( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1474 
1483  static QgsPrintLayout *parameterAsLayout( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1484 
1493  static QgsLayoutItem *parameterAsLayoutItem( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context, QgsPrintLayout *layout );
1494 
1503  static QgsLayoutItem *parameterAsLayoutItem( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context, QgsPrintLayout *layout );
1504 
1510  static QColor parameterAsColor( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1511 
1517  static QColor parameterAsColor( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1518 
1524  static QString parameterAsConnectionName( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1525 
1531  static QString parameterAsConnectionName( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1532 
1538  static QString parameterAsSchema( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1539 
1545  static QString parameterAsSchema( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1546 
1552  static QString parameterAsDatabaseTableName( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1553 
1559  static QString parameterAsDatabaseTableName( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1560 
1566  static QgsProcessingParameterDefinition *parameterFromVariantMap( const QVariantMap &map ) SIP_FACTORY;
1567 
1571  static QString descriptionFromName( const QString &name );
1572 
1578  static QgsProcessingParameterDefinition *parameterFromScriptCode( const QString &code ) SIP_FACTORY;
1579 
1580  private:
1581 
1582  static bool parseScriptCodeParameterOptions( const QString &code, bool &isOptional, QString &name, QString &type, QString &definition );
1583 };
1584 
1585 
1586 
1594 {
1595  public:
1596 
1600  QgsProcessingParameterBoolean( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1601  bool optional = false );
1602 
1606  static QString typeName() { return QStringLiteral( "boolean" ); }
1607  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1608  QString type() const override { return typeName(); }
1609  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1610  QString asScriptCode() const override;
1611 
1615  static QgsProcessingParameterBoolean *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1616 };
1617 
1625 {
1626  public:
1627 
1631  QgsProcessingParameterCrs( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1632  bool optional = false );
1633 
1637  static QString typeName() { return QStringLiteral( "crs" ); }
1638  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1639  QString type() const override { return typeName(); }
1640  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1641  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1642 
1646  static QgsProcessingParameterCrs *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1647 
1648 };
1649 
1657 {
1658  public:
1659 
1663  QgsProcessingParameterExtent( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1664  bool optional = false );
1665 
1669  static QString typeName() { return QStringLiteral( "extent" ); }
1670  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1671  QString type() const override { return typeName(); }
1672  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1673  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1674 
1678  static QgsProcessingParameterExtent *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1679 
1680 };
1681 
1682 
1690 {
1691  public:
1692 
1696  QgsProcessingParameterPoint( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1697  bool optional = false );
1698 
1702  static QString typeName() { return QStringLiteral( "point" ); }
1703  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1704  QString type() const override { return typeName(); }
1705  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1706  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1707 
1711  static QgsProcessingParameterPoint *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1712 
1713 };
1714 
1722 {
1723  public:
1724 
1731  QgsProcessingParameterGeometry( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(), bool optional = false, const QList< int > &geometryTypes = QList< int >() );
1732 
1736  static QString typeName() { return QStringLiteral( "geometry" ); }
1737  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1738  QString type() const override { return typeName(); }
1739  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1740  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1741  QString asScriptCode() const override;
1742  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
1743  QVariantMap toVariantMap() const override;
1744  bool fromVariantMap( const QVariantMap &map ) override;
1745 
1750  QList<int> geometryTypes() const { return mGeomTypes; }
1751 
1756  void setGeometryTypes( const QList<int> &geometryTypes ) { mGeomTypes = geometryTypes; }
1757 
1761  static QgsProcessingParameterGeometry *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1762 
1763  private:
1764 
1765  QList<int> mGeomTypes;
1766 
1767 };
1768 
1776 {
1777  public:
1778 
1781  {
1782  File = 0,
1784  };
1785 
1793  QgsProcessingParameterFile( const QString &name, const QString &description = QString(), Behavior behavior = File, const QString &extension = QString(), const QVariant &defaultValue = QVariant(),
1794  bool optional = false, const QString &fileFilter = QString() );
1795 
1799  static QString typeName() { return QStringLiteral( "file" ); }
1800  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1801  QString type() const override { return typeName(); }
1802  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1803  QString asScriptCode() const override;
1804  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
1805  QString createFileFilter() const override;
1806 
1811  Behavior behavior() const { return mBehavior; }
1812 
1817  void setBehavior( Behavior behavior ) { mBehavior = behavior; }
1818 
1826  QString extension() const { return mExtension; }
1827 
1837  void setExtension( const QString &extension );
1838 
1845  QString fileFilter() const;
1846 
1856  void setFileFilter( const QString &filter );
1857 
1858  QVariantMap toVariantMap() const override;
1859  bool fromVariantMap( const QVariantMap &map ) override;
1860 
1864  static QgsProcessingParameterFile *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition, Behavior behavior = File ) SIP_FACTORY;
1865 
1866  private:
1867 
1868  Behavior mBehavior = File;
1869  QString mExtension;
1870  QString mFileFilter;
1871 };
1872 
1880 {
1881  public:
1882 
1886  QgsProcessingParameterMatrix( const QString &name, const QString &description = QString(), int numberRows = 3,
1887  bool hasFixedNumberRows = false, const QStringList &headers = QStringList(),
1888  const QVariant &defaultValue = QVariant(),
1889  bool optional = false );
1890 
1894  static QString typeName() { return QStringLiteral( "matrix" ); }
1895  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1896  QString type() const override { return typeName(); }
1897  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1898  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1899  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
1900 
1905  QStringList headers() const;
1906 
1911  void setHeaders( const QStringList &headers );
1912 
1919  int numberRows() const;
1920 
1927  void setNumberRows( int rows );
1928 
1934  bool hasFixedNumberRows() const;
1935 
1941  void setHasFixedNumberRows( bool hasFixedNumberRows );
1942 
1943  QVariantMap toVariantMap() const override;
1944  bool fromVariantMap( const QVariantMap &map ) override;
1945 
1949  static QgsProcessingParameterMatrix *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1950 
1951  private:
1952 
1953  QStringList mHeaders;
1954  int mNumberRows = 3;
1955  bool mFixedNumberRows = false;
1956 
1957 };
1958 
1966 {
1967  public:
1968 
1972  QgsProcessingParameterMultipleLayers( const QString &name, const QString &description = QString(), QgsProcessing::SourceType layerType = QgsProcessing::TypeVectorAnyGeometry,
1973  const QVariant &defaultValue = QVariant(),
1974  bool optional = false );
1975 
1979  static QString typeName() { return QStringLiteral( "multilayer" ); }
1980  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
1981  QString type() const override { return typeName(); }
1982  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1983  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1984  QString asScriptCode() const override;
1985  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
1986  QString createFileFilter() const override;
1987 
1992  QgsProcessing::SourceType layerType() const;
1993 
1998  void setLayerType( QgsProcessing::SourceType type );
1999 
2005  int minimumNumberInputs() const;
2006 
2012  void setMinimumNumberInputs( int minimum );
2013 
2014  QVariantMap toVariantMap() const override;
2015  bool fromVariantMap( const QVariantMap &map ) override;
2016 
2020  static QgsProcessingParameterMultipleLayers *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2021 
2022  private:
2023 
2025  int mMinimumNumberInputs = 0;
2026 
2027 };
2028 
2048 {
2049  public:
2050 
2052  enum Type
2053  {
2056  };
2057 
2061  explicit QgsProcessingParameterNumber( const QString &name, const QString &description = QString(),
2062  Type type = Integer,
2063  const QVariant &defaultValue = QVariant(),
2064  bool optional = false,
2065  double minValue = std::numeric_limits<double>::lowest() + 1,
2066  double maxValue = std::numeric_limits<double>::max()
2067  );
2068 
2072  static QString typeName() { return QStringLiteral( "number" ); }
2073  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2074  QString type() const override { return typeName(); }
2075  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2076  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2077  QString toolTip() const override;
2078  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2079 
2084  double minimum() const;
2085 
2090  void setMinimum( double minimum );
2091 
2096  double maximum() const;
2097 
2102  void setMaximum( double maximum );
2103 
2108  Type dataType() const;
2109 
2114  void setDataType( Type type );
2115 
2116  QVariantMap toVariantMap() const override;
2117  bool fromVariantMap( const QVariantMap &map ) override;
2118 
2122  static QgsProcessingParameterNumber *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2123 
2124  private:
2125 
2126  double mMin = std::numeric_limits<double>::lowest() + 1;
2127  double mMax = std::numeric_limits<double>::max();
2128  Type mDataType = Integer;
2129 };
2130 
2151 {
2152  public:
2153 
2157  explicit QgsProcessingParameterDistance( const QString &name, const QString &description = QString(),
2158  const QVariant &defaultValue = QVariant(),
2159  const QString &parentParameterName = QString(),
2160  bool optional = false,
2161  double minValue = std::numeric_limits<double>::lowest() + 1,
2162  double maxValue = std::numeric_limits<double>::max() );
2163 
2167  static QString typeName() { return QStringLiteral( "distance" ); }
2168 
2169  QgsProcessingParameterDistance *clone() const override SIP_FACTORY;
2170 
2171  QString type() const override;
2172  QStringList dependsOnOtherParameters() const override;
2173  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2174 
2179  QString parentParameterName() const;
2180 
2185  void setParentParameterName( const QString &parentParameterName );
2186 
2193  QgsUnitTypes::DistanceUnit defaultUnit() const { return mDefaultUnit; }
2194 
2201  void setDefaultUnit( QgsUnitTypes::DistanceUnit unit ) { mDefaultUnit = unit; }
2202 
2203  QVariantMap toVariantMap() const override;
2204  bool fromVariantMap( const QVariantMap &map ) override;
2205 
2206  private:
2207 
2208  QString mParentParameterName;
2210 
2211 };
2212 
2224 {
2225  public:
2226 
2230  explicit QgsProcessingParameterScale( const QString &name, const QString &description = QString(),
2231  const QVariant &defaultValue = QVariant(),
2232  bool optional = false );
2233 
2237  static QString typeName() { return QStringLiteral( "scale" ); }
2238 
2239  QgsProcessingParameterScale *clone() const override SIP_FACTORY;
2240 
2241  QString type() const override;
2242  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2243 
2247  static QgsProcessingParameterScale *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2248 
2249 };
2250 
2258 {
2259  public:
2260 
2264  QgsProcessingParameterRange( const QString &name, const QString &description = QString(),
2266  const QVariant &defaultValue = QVariant(),
2267  bool optional = false );
2268 
2272  static QString typeName() { return QStringLiteral( "range" ); }
2273  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2274  QString type() const override { return typeName(); }
2275  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2276  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2277  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2278 
2283  QgsProcessingParameterNumber::Type dataType() const;
2284 
2289  void setDataType( QgsProcessingParameterNumber::Type dataType );
2290 
2291  QVariantMap toVariantMap() const override;
2292  bool fromVariantMap( const QVariantMap &map ) override;
2293 
2297  static QgsProcessingParameterRange *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2298 
2299  private:
2300 
2302 };
2303 
2311 {
2312  public:
2313 
2317  QgsProcessingParameterRasterLayer( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2318  bool optional = false );
2319 
2323  static QString typeName() { return QStringLiteral( "raster" ); }
2324  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2325  QString type() const override { return typeName(); }
2326  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2327  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2328  QString createFileFilter() const override;
2329 
2333  static QgsProcessingParameterRasterLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2334 
2335 };
2336 
2344 {
2345  public:
2346 
2350  QgsProcessingParameterEnum( const QString &name, const QString &description = QString(), const QStringList &options = QStringList(),
2351  bool allowMultiple = false,
2352  const QVariant &defaultValue = QVariant(),
2353  bool optional = false,
2354  bool usesStaticStrings = false );
2355 
2359  static QString typeName() { return QStringLiteral( "enum" ); }
2360  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2361  QString type() const override { return typeName(); }
2362  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2363  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2364  QString asScriptCode() const override;
2365  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2366 
2371  QStringList options() const;
2372 
2377  void setOptions( const QStringList &options );
2378 
2383  bool allowMultiple() const;
2384 
2389  void setAllowMultiple( bool allowMultiple );
2390 
2397  bool usesStaticStrings() const;
2398 
2405  void setUsesStaticStrings( bool usesStaticStrings );
2406 
2407  QVariantMap toVariantMap() const override;
2408  bool fromVariantMap( const QVariantMap &map ) override;
2409 
2413  static QgsProcessingParameterEnum *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2414 
2415  private:
2416 
2417  QStringList mOptions;
2418  bool mAllowMultiple = false;
2419  bool mUsesStaticStrings = false;
2420 };
2421 
2429 {
2430  public:
2431 
2435  QgsProcessingParameterString( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2436  bool multiLine = false,
2437  bool optional = false );
2438 
2442  static QString typeName() { return QStringLiteral( "string" ); }
2443  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2444  QString type() const override { return typeName(); }
2445  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2446  QString asScriptCode() const override;
2447  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2448 
2453  bool multiLine() const;
2454 
2459  void setMultiLine( bool multiLine );
2460 
2461  QVariantMap toVariantMap() const override;
2462  bool fromVariantMap( const QVariantMap &map ) override;
2463 
2467  static QgsProcessingParameterString *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2468 
2469  private:
2470 
2471  bool mMultiLine = false;
2472 
2473 };
2474 
2475 
2489 {
2490  public:
2491 
2495  QgsProcessingParameterAuthConfig( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2496  bool optional = false );
2497 
2501  static QString typeName() { return QStringLiteral( "authcfg" ); }
2502  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2503  QString type() const override { return typeName(); }
2504  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2505  QString asScriptCode() const override;
2506 
2510  static QgsProcessingParameterAuthConfig *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2511 
2512 };
2513 
2521 {
2522  public:
2523 
2527  QgsProcessingParameterExpression( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2528  const QString &parentLayerParameterName = QString(),
2529  bool optional = false );
2530 
2534  static QString typeName() { return QStringLiteral( "expression" ); }
2535  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2536  QString type() const override { return typeName(); }
2537  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2538  QStringList dependsOnOtherParameters() const override;
2539  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2540 
2545  QString parentLayerParameterName() const;
2546 
2551  void setParentLayerParameterName( const QString &parentLayerParameterName );
2552 
2553  QVariantMap toVariantMap() const override;
2554  bool fromVariantMap( const QVariantMap &map ) override;
2555 
2559  static QgsProcessingParameterExpression *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2560 
2561  private:
2562 
2563  QString mParentLayerParameterName;
2564 
2565 };
2566 
2567 
2575 {
2576  public:
2577 
2581  QgsProcessingParameterLimitedDataTypes( const QList< int > &types = QList< int >() );
2582 
2587  QList< int > dataTypes() const;
2588 
2593  void setDataTypes( const QList< int > &types );
2594 
2595  protected:
2596 
2598  QList< int > mDataTypes;
2599 };
2600 
2609 {
2610  public:
2611 
2615  QgsProcessingParameterVectorLayer( const QString &name,
2616  const QString &description = QString(),
2617  const QList< int > &types = QList< int >(),
2618  const QVariant &defaultValue = QVariant(),
2619  bool optional = false );
2620 
2624  static QString typeName() { return QStringLiteral( "vector" ); }
2625  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2626  QString type() const override { return typeName(); }
2627  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2628  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2629  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2630  QString createFileFilter() const override;
2631 
2632  QVariantMap toVariantMap() const override;
2633  bool fromVariantMap( const QVariantMap &map ) override;
2634 
2638  static QgsProcessingParameterVectorLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2639 
2640 };
2641 
2649 {
2650  public:
2651 
2655  QgsProcessingParameterMeshLayer( const QString &name,
2656  const QString &description = QString(),
2657  const QVariant &defaultValue = QVariant(),
2658  bool optional = false );
2659 
2663  static QString typeName() { return QStringLiteral( "mesh" ); }
2664  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2665  QString type() const override { return typeName(); }
2666  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2667  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2668  QString createFileFilter() const override;
2669 
2673  static QgsProcessingParameterMeshLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2674 };
2675 
2683 {
2684  public:
2685 
2689  QgsProcessingParameterMapLayer( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2690  bool optional = false,
2691  const QList< int > &types = QList< int >() );
2692 
2696  static QString typeName() { return QStringLiteral( "layer" ); }
2697  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2698  QString type() const override { return typeName(); }
2699  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2700  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2701  QString asScriptCode() const override;
2702  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2703  QString createFileFilter() const override;
2704 
2705  QVariantMap toVariantMap() const override;
2706  bool fromVariantMap( const QVariantMap &map ) override;
2707 
2711  static QgsProcessingParameterMapLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2712 
2713 };
2714 
2722 {
2723  public:
2724 
2727  {
2728  Any = -1,
2729  Numeric = 0,
2730  String = 1,
2731  DateTime = 2
2732  };
2733 
2737  QgsProcessingParameterField( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2738  const QString &parentLayerParameterName = QString(),
2739  DataType type = Any,
2740  bool allowMultiple = false,
2741  bool optional = false,
2742  bool defaultToAllFields = false );
2743 
2747  static QString typeName() { return QStringLiteral( "field" ); }
2748  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2749  QString type() const override { return typeName(); }
2750  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2751  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2752  QString asScriptCode() const override;
2753  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2754  QStringList dependsOnOtherParameters() const override;
2755 
2760  QString parentLayerParameterName() const;
2761 
2766  void setParentLayerParameterName( const QString &parentLayerParameterName );
2767 
2772  DataType dataType() const;
2773 
2778  void setDataType( DataType type );
2779 
2784  bool allowMultiple() const;
2785 
2790  void setAllowMultiple( bool allowMultiple );
2791 
2801  bool defaultToAllFields() const;
2802 
2812  void setDefaultToAllFields( bool enabled );
2813 
2814  QVariantMap toVariantMap() const override;
2815  bool fromVariantMap( const QVariantMap &map ) override;
2816 
2820  static QgsProcessingParameterField *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2821 
2822  private:
2823 
2824  QString mParentLayerParameterName;
2825  DataType mDataType = Any;
2826  bool mAllowMultiple = false;
2827  bool mDefaultToAllFields = false;
2828 
2829 };
2830 
2831 
2839 {
2840  public:
2841 
2845  QgsProcessingParameterFeatureSource( const QString &name, const QString &description = QString(),
2846  const QList< int > &types = QList< int >(),
2847  const QVariant &defaultValue = QVariant(), bool optional = false );
2848 
2852  static QString typeName() { return QStringLiteral( "source" ); }
2853  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
2854  QString type() const override { return typeName(); }
2855  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2856  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2857  QString asScriptCode() const override;
2858  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2859  QString createFileFilter() const override;
2860 
2861  QVariantMap toVariantMap() const override;
2862  bool fromVariantMap( const QVariantMap &map ) override;
2863 
2867  static QgsProcessingParameterFeatureSource *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2868 
2869 };
2870 
2879 {
2880  public:
2881 
2888  QgsProcessingDestinationParameter( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2889  bool optional = false, bool createByDefault = true );
2890 
2891  bool isDestination() const override { return true; }
2892  QVariantMap toVariantMap() const override;
2893  bool fromVariantMap( const QVariantMap &map ) override;
2894  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2895  QString createFileFilter() const override;
2896 
2902 
2908  bool supportsNonFileBasedOutput() const { return mSupportsNonFileBasedOutputs; }
2909 
2915  void setSupportsNonFileBasedOutput( bool supportsNonFileBasedOutput ) { mSupportsNonFileBasedOutputs = supportsNonFileBasedOutput; }
2916 
2921  virtual QString defaultFileExtension() const = 0;
2922 
2928  virtual QString generateTemporaryDestination() const;
2929 
2944  virtual bool isSupportedOutputValue( const QVariant &value, QgsProcessingContext &context, QString &error SIP_OUT ) const;
2945 
2951  bool createByDefault() const;
2952 
2958  void setCreateByDefault( bool createByDefault );
2959 
2960  protected:
2961 
2970  QgsProcessingProvider *originalProvider() const { return mOriginalProvider; }
2971 
2972  private:
2973 
2981  QgsProcessingProvider *mOriginalProvider = nullptr;
2982 
2983  bool mSupportsNonFileBasedOutputs = true;
2984  bool mCreateByDefault = true;
2985 
2986  friend class QgsProcessingModelAlgorithm;
2987  friend class TestQgsProcessing;
2988 };
2989 
2990 
3000 {
3001  public:
3002 
3009  QgsProcessingParameterFeatureSink( const QString &name, const QString &description = QString(), QgsProcessing::SourceType type = QgsProcessing::TypeVectorAnyGeometry, const QVariant &defaultValue = QVariant(),
3010  bool optional = false, bool createByDefault = true, bool supportsAppend = false );
3011 
3015  static QString typeName() { return QStringLiteral( "sink" ); }
3016  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3017  QString type() const override { return typeName(); }
3018  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3019  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3020  QString asScriptCode() const override;
3021  QgsProcessingOutputDefinition *toOutputDefinition() const override SIP_FACTORY;
3022  QString defaultFileExtension() const override;
3023  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3024  QString createFileFilter() const override;
3025 
3031  virtual QStringList supportedOutputVectorLayerExtensions() const;
3032 
3037  QgsProcessing::SourceType dataType() const;
3038 
3043  bool hasGeometry() const;
3044 
3049  void setDataType( QgsProcessing::SourceType type );
3050 
3059  bool supportsAppend() const;
3060 
3069  void setSupportsAppend( bool supportsAppend );
3070 
3071  QVariantMap toVariantMap() const override;
3072  bool fromVariantMap( const QVariantMap &map ) override;
3073  QString generateTemporaryDestination() const override;
3074 
3078  static QgsProcessingParameterFeatureSink *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3079 
3080  private:
3081 
3082  QgsProcessing::SourceType mDataType = QgsProcessing::TypeVectorAnyGeometry;
3083  bool mSupportsAppend = false;
3084 };
3085 
3086 
3098 {
3099  public:
3100 
3107  QgsProcessingParameterVectorDestination( const QString &name, const QString &description = QString(), QgsProcessing::SourceType type = QgsProcessing::TypeVectorAnyGeometry, const QVariant &defaultValue = QVariant(),
3108  bool optional = false, bool createByDefault = true );
3109 
3113  static QString typeName() { return QStringLiteral( "vectorDestination" ); }
3114  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3115  QString type() const override { return typeName(); }
3116  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3117  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3118  QString asScriptCode() const override;
3119  QgsProcessingOutputDefinition *toOutputDefinition() const override SIP_FACTORY;
3120  QString defaultFileExtension() const override;
3121  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3122  QString createFileFilter() const override;
3123 
3129  virtual QStringList supportedOutputVectorLayerExtensions() const;
3130 
3135  QgsProcessing::SourceType dataType() const;
3136 
3141  bool hasGeometry() const;
3142 
3147  void setDataType( QgsProcessing::SourceType type );
3148 
3149  QVariantMap toVariantMap() const override;
3150  bool fromVariantMap( const QVariantMap &map ) override;
3151 
3155  static QgsProcessingParameterVectorDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3156 
3157 
3158  private:
3159 
3160  QgsProcessing::SourceType mDataType = QgsProcessing::TypeVectorAnyGeometry;
3161 };
3162 
3171 {
3172  public:
3173 
3180  QgsProcessingParameterRasterDestination( const QString &name, const QString &description = QString(),
3181  const QVariant &defaultValue = QVariant(),
3182  bool optional = false,
3183  bool createByDefault = true );
3184 
3188  static QString typeName() { return QStringLiteral( "rasterDestination" ); }
3189  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3190  QString type() const override { return typeName(); }
3191  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3192  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3193  QgsProcessingOutputDefinition *toOutputDefinition() const override SIP_FACTORY;
3194  QString defaultFileExtension() const override;
3195  QString createFileFilter() const override;
3196 
3202  virtual QStringList supportedOutputRasterLayerExtensions() const;
3203 
3207  static QgsProcessingParameterRasterDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3208 };
3209 
3232 {
3233  public:
3234 
3241  QgsProcessingParameterFileDestination( const QString &name, const QString &description = QString(),
3242  const QString &fileFilter = QString(),
3243  const QVariant &defaultValue = QVariant(),
3244  bool optional = false,
3245  bool createByDefault = true );
3246 
3250  static QString typeName() { return QStringLiteral( "fileDestination" ); }
3251  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3252  QString type() const override { return typeName(); }
3253  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3254  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3255  QgsProcessingOutputDefinition *toOutputDefinition() const override SIP_FACTORY;
3256  QString defaultFileExtension() const override;
3257  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3258  QString createFileFilter() const override;
3259 
3264  QString fileFilter() const;
3265 
3270  void setFileFilter( const QString &filter );
3271 
3272  QVariantMap toVariantMap() const override;
3273  bool fromVariantMap( const QVariantMap &map ) override;
3274 
3278  static QgsProcessingParameterFileDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3279 
3280 
3281  private:
3282 
3283  QString mFileFilter;
3284 };
3285 
3294 {
3295  public:
3296 
3300  QgsProcessingParameterFolderDestination( const QString &name, const QString &description = QString(),
3301  const QVariant &defaultValue = QVariant(),
3302  bool optional = false,
3303  bool createByDefault = true );
3304 
3308  static QString typeName() { return QStringLiteral( "folderDestination" ); }
3309  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3310  QString type() const override { return typeName(); }
3311  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3312  QgsProcessingOutputDefinition *toOutputDefinition() const override SIP_FACTORY;
3313  QString defaultFileExtension() const override;
3314 
3318  static QgsProcessingParameterFolderDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3319 
3320 };
3321 
3329 {
3330  public:
3331 
3335  QgsProcessingParameterBand( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3336  const QString &parentLayerParameterName = QString(),
3337  bool optional = false,
3338  bool allowMultiple = false );
3339 
3343  static QString typeName() { return QStringLiteral( "band" ); }
3344  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3345  QString type() const override { return typeName(); }
3346  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3347  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3348  QString asScriptCode() const override;
3349  QStringList dependsOnOtherParameters() const override;
3350  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3351 
3356  QString parentLayerParameterName() const;
3357 
3362  void setParentLayerParameterName( const QString &parentLayerParameterName );
3363 
3364  QVariantMap toVariantMap() const override;
3365  bool fromVariantMap( const QVariantMap &map ) override;
3366 
3370  static QgsProcessingParameterBand *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3371 
3377  bool allowMultiple() const;
3378 
3384  void setAllowMultiple( bool allowMultiple );
3385 
3386  private:
3387 
3388  QString mParentLayerParameterName;
3389  bool mAllowMultiple = false;
3390 };
3391 
3404 {
3405  public:
3406 
3410  QgsProcessingParameterLayout( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3411  bool optional = false );
3412 
3416  static QString typeName() { return QStringLiteral( "layout" ); }
3417  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3418  QString type() const override { return typeName(); }
3419  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3420  QString asScriptCode() const override;
3421  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3422 
3426  static QgsProcessingParameterLayout *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3427 
3428 };
3429 
3442 {
3443  public:
3444 
3448  QgsProcessingParameterLayoutItem( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3449  const QString &parentLayoutParameterName = QString(),
3450  int itemType = -1,
3451  bool optional = false );
3452 
3456  static QString typeName() { return QStringLiteral( "layoutitem" ); }
3457  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3458  QString type() const override { return typeName(); }
3459  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3460  QString asScriptCode() const override;
3461  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3462  QVariantMap toVariantMap() const override;
3463  bool fromVariantMap( const QVariantMap &map ) override;
3464  QStringList dependsOnOtherParameters() const override;
3465 
3469  static QgsProcessingParameterLayoutItem *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3470 
3475  QString parentLayoutParameterName() const;
3476 
3481  void setParentLayoutParameterName( const QString &name );
3482 
3490  int itemType() const;
3491 
3499  void setItemType( int type );
3500 
3501  private:
3502  QString mParentLayoutParameterName;
3503  int mItemType = -1;
3504 };
3505 
3516 {
3517  public:
3518 
3524  QgsProcessingParameterColor( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3525  bool opacityEnabled = true,
3526  bool optional = false );
3527 
3531  static QString typeName() { return QStringLiteral( "color" ); }
3532  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3533  QString type() const override { return typeName(); }
3534  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3535  QString asScriptCode() const override;
3536  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3537  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3538  QVariantMap toVariantMap() const override;
3539  bool fromVariantMap( const QVariantMap &map ) override;
3540 
3547  bool opacityEnabled() const;
3548 
3556  void setOpacityEnabled( bool enabled );
3557 
3561  static QgsProcessingParameterColor *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3562 
3563  private:
3564 
3565  bool mAllowOpacity = true;
3566 
3567 };
3568 
3569 
3580 {
3581  public:
3582 
3586  QgsProcessingParameterCoordinateOperation( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3587  const QString &sourceCrsParameterName = QString(), const QString &destinationCrsParameterName = QString(),
3588  const QVariant &staticSourceCrs = QVariant(), const QVariant &staticDestinationCrs = QVariant(),
3589  bool optional = false );
3590 
3594  static QString typeName() { return QStringLiteral( "coordinateoperation" ); }
3595  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3596  QString type() const override { return typeName(); }
3597  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3598  QString asScriptCode() const override;
3599  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3600  QStringList dependsOnOtherParameters() const override;
3601 
3602  QVariantMap toVariantMap() const override;
3603  bool fromVariantMap( const QVariantMap &map ) override;
3604 
3608  static QgsProcessingParameterCoordinateOperation *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3609 
3615  QString sourceCrsParameterName() const { return mSourceParameterName; }
3616 
3622  void setSourceCrsParameterName( const QString &name ) { mSourceParameterName = name; }
3623 
3629  QString destinationCrsParameterName() const { return mDestParameterName; }
3630 
3636  void setDestinationCrsParameterName( const QString &name ) { mDestParameterName = name; }
3637 
3643  QVariant sourceCrs() const { return mSourceCrs; }
3644 
3650  void setSourceCrs( const QVariant &crs ) { mSourceCrs = crs; }
3651 
3657  QVariant destinationCrs() const { return mDestCrs; }
3658 
3664  void setDestinationCrs( const QVariant &crs ) { mDestCrs = crs; }
3665 
3666  private:
3667 
3668  QString mSourceParameterName;
3669  QString mDestParameterName;
3670  QVariant mSourceCrs;
3671  QVariant mDestCrs;
3672 
3673 };
3674 
3675 
3686 {
3687  public:
3688 
3692  QgsProcessingParameterMapTheme( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3693  bool optional = false );
3694 
3698  static QString typeName() { return QStringLiteral( "maptheme" ); }
3699  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3700  QString type() const override { return typeName(); }
3701  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3702  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3703  QString asScriptCode() const override;
3704  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3705  QVariantMap toVariantMap() const override;
3706  bool fromVariantMap( const QVariantMap &map ) override;
3707 
3711  static QgsProcessingParameterMapTheme *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3712 
3713  private:
3714 
3715 };
3716 
3717 
3729 {
3730  public:
3731 
3733  enum Type
3734  {
3738  };
3739 
3743  explicit QgsProcessingParameterDateTime( const QString &name, const QString &description = QString(),
3744  Type type = DateTime,
3745  const QVariant &defaultValue = QVariant(),
3746  bool optional = false,
3747  const QDateTime &minValue = QDateTime(),
3748  const QDateTime &maxValue = QDateTime()
3749  );
3750 
3754  static QString typeName() { return QStringLiteral( "datetime" ); }
3755  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3756  QString type() const override { return typeName(); }
3757  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3758  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3759  QString toolTip() const override;
3760  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3761 
3769  QDateTime minimum() const;
3770 
3782  void setMinimum( const QDateTime &minimum );
3783 
3791  QDateTime maximum() const;
3792 
3804  void setMaximum( const QDateTime &maximum );
3805 
3810  Type dataType() const;
3811 
3816  void setDataType( Type type );
3817 
3818  QVariantMap toVariantMap() const override;
3819  bool fromVariantMap( const QVariantMap &map ) override;
3820 
3824  static QgsProcessingParameterDateTime *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3825 
3826  private:
3827 
3828  QDateTime mMin;
3829  QDateTime mMax;
3830  Type mDataType = DateTime;
3831 };
3832 
3833 
3845 {
3846  public:
3847 
3854  QgsProcessingParameterProviderConnection( const QString &name, const QString &description, const QString &provider, const QVariant &defaultValue = QVariant(),
3855  bool optional = false );
3856 
3860  static QString typeName() { return QStringLiteral( "providerconnection" ); }
3861  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3862  QString type() const override { return typeName(); }
3863  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3864  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3865  QString asScriptCode() const override;
3866  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3867  QVariantMap toVariantMap() const override;
3868  bool fromVariantMap( const QVariantMap &map ) override;
3869 
3874  QString providerId() const { return mProviderId; }
3875 
3880  void setProviderId( const QString &provider ) { mProviderId = provider; }
3881 
3885  static QgsProcessingParameterProviderConnection *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3886 
3887  private:
3888 
3889  QString mProviderId;
3890 };
3891 
3892 
3904 {
3905  public:
3906 
3915  QgsProcessingParameterDatabaseSchema( const QString &name, const QString &description, const QString &connectionParameterName = QString(), const QVariant &defaultValue = QVariant(),
3916  bool optional = false );
3917 
3921  static QString typeName() { return QStringLiteral( "databaseschema" ); }
3922  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3923  QString type() const override { return typeName(); }
3924  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3925  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3926  QString asScriptCode() const override;
3927  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3928  QVariantMap toVariantMap() const override;
3929  bool fromVariantMap( const QVariantMap &map ) override;
3930  QStringList dependsOnOtherParameters() const override;
3931 
3936  QString parentConnectionParameterName() const;
3937 
3942  void setParentConnectionParameterName( const QString &name );
3943 
3947  static QgsProcessingParameterDatabaseSchema *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3948 
3949  private:
3950 
3951  QString mParentConnectionParameterName;
3952 };
3953 
3954 
3966 {
3967  public:
3968 
3978  QgsProcessingParameterDatabaseTable( const QString &name, const QString &description,
3979  const QString &connectionParameterName = QString(),
3980  const QString &schemaParameterName = QString(),
3981  const QVariant &defaultValue = QVariant(),
3982  bool optional = false,
3983  bool allowNewTableNames = false );
3984 
3988  static QString typeName() { return QStringLiteral( "databasetable" ); }
3989  QgsProcessingParameterDefinition *clone() const override SIP_FACTORY;
3990  QString type() const override { return typeName(); }
3991  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3992  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3993  QString asScriptCode() const override;
3994  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3995  QVariantMap toVariantMap() const override;
3996  bool fromVariantMap( const QVariantMap &map ) override;
3997  QStringList dependsOnOtherParameters() const override;
3998 
4003  QString parentConnectionParameterName() const;
4004 
4009  void setParentConnectionParameterName( const QString &name );
4010 
4015  QString parentSchemaParameterName() const;
4016 
4021  void setParentSchemaParameterName( const QString &name );
4022 
4026  static QgsProcessingParameterDatabaseTable *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
4027 
4034  bool allowNewTableNames() const;
4035 
4042  void setAllowNewTableNames( bool allowed );
4043 
4044  private:
4045 
4046  QString mParentConnectionParameterName;
4047  QString mParentSchemaParameterName;
4048  bool mAllowNewTableNames = false;
4049 };
4050 
4051 
4052 // clazy:excludeall=qstring-allocations
4053 
4054 #endif // QGSPROCESSINGPARAMETERS_H
4055 
4056 
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.
Definition: qgsfields.h:45
Abstract interface for classes which generate a file filter string.
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:124
Base class for graphical items within a QgsLayout.
Base class for all map layer types.
Definition: qgsmaplayer.h:85
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition: qgsmeshlayer.h:95
A class to represent a 2D point.
Definition: qgspointxy.h:44
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 ...
virtual QgsProcessingOutputDefinition * toOutputDefinition() const =0
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parame...
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
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.
Definition: qgsexception.h:83
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
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.
QgsProcessingFeatureSourceDefinition(const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, QgsProcessingFeatureSourceDefinition::Flags flags=QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck=QgsFeatureRequest::GeometryAbortOnInvalid)
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty 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...
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.
QVariant defaultValue() const
Returns the default value for the parameter.
void setDefaultValue(const QVariant &value)
Sets the default value for the parameter.
QVariant guiDefaultValueOverride() const
Returns the default value to use in the GUI 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.
virtual QgsProcessingParameterDefinition * clone() const =0
Creates a clone of the parameter definition.
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.
QVariant defaultValueForGui() const
Returns the default value to use for the parameter in a GUI.
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 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.
QVariantMap & metadata()
Returns the parameter's freeform metadata.
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
QgsPropertyDefinition dynamicPropertyDefinition() const
Returns the property definition for dynamic properties.
A double numeric parameter for distance values.
void setDefaultUnit(QgsUnitTypes::DistanceUnit unit)
Sets the default distance 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(Behavior behavior)
Sets the parameter behavior (e.g.
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 QgsWkbTypes::GeometryType values.
QList< int > geometryTypes() const
Returns the parameter allowed geometries, as a list of QgsWkbTypes::GeometryType values.
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 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.
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.
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.
Definition: qgsprocessing.h:39
PythonOutputType
Available Python output types.
Definition: qgsprocessing.h:59
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
Definition: qgsprocessing.h:60
SourceType
Data source types enum.
Definition: qgsprocessing.h:45
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Definition: qgsprocessing.h:47
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:99
Definition for a property.
Definition: qgsproperty.h:48
A store for object properties.
Definition: qgsproperty.h:232
Represents a raster layer.
A rectangle specified with double values.
Definition: qgsrectangle.h:42
Defines the parameters used to remap features when creating a QgsRemappingProxyFeatureSink.
Helper functions for various unit types.
Definition: qgsunittypes.h:39
DistanceUnit
Units of distance.
Definition: qgsunittypes.h:68
@ DistanceUnknownUnit
Unknown distance unit.
Definition: qgsunittypes.h:78
Represents a vector layer which manages a vector based data sets.
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:70
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_THROW(name)
Definition: qgis_sip.h:189
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:177
#define SIP_SKIP
Definition: qgis_sip.h:126
#define SIP_OUT
Definition: qgis_sip.h:58
#define SIP_FACTORY
Definition: qgis_sip.h:76
#define SIP_END
Definition: qgis_sip.h:194
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.
const QgsCoordinateReferenceSystem & crs
const QString & typeName