QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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
335  if ( sipCpp->type() == QgsProcessingParameterBoolean::typeName() )
336  sipType = sipType_QgsProcessingParameterBoolean;
337  else if ( sipCpp->type() == QgsProcessingParameterCrs::typeName() )
338  sipType = sipType_QgsProcessingParameterCrs;
339  else if ( sipCpp->type() == QgsProcessingParameterMapLayer::typeName() )
340  sipType = sipType_QgsProcessingParameterMapLayer;
341  else if ( sipCpp->type() == QgsProcessingParameterExtent::typeName() )
342  sipType = sipType_QgsProcessingParameterExtent;
343  else if ( sipCpp->type() == QgsProcessingParameterPoint::typeName() )
344  sipType = sipType_QgsProcessingParameterPoint;
345  else if ( sipCpp->type() == QgsProcessingParameterFile::typeName() )
346  sipType = sipType_QgsProcessingParameterFile;
347  else if ( sipCpp->type() == QgsProcessingParameterMatrix::typeName() )
348  sipType = sipType_QgsProcessingParameterMatrix;
349  else if ( sipCpp->type() == QgsProcessingParameterMultipleLayers::typeName() )
350  sipType = sipType_QgsProcessingParameterMultipleLayers;
351  else if ( sipCpp->type() == QgsProcessingParameterNumber::typeName() )
352  sipType = sipType_QgsProcessingParameterNumber;
353  else if ( sipCpp->type() == QgsProcessingParameterDistance::typeName() )
354  sipType = sipType_QgsProcessingParameterDistance;
355  else if ( sipCpp->type() == QgsProcessingParameterScale::typeName() )
356  sipType = sipType_QgsProcessingParameterScale;
357  else if ( sipCpp->type() == QgsProcessingParameterRange::typeName() )
358  sipType = sipType_QgsProcessingParameterRange;
359  else if ( sipCpp->type() == QgsProcessingParameterRasterLayer::typeName() )
360  sipType = sipType_QgsProcessingParameterRasterLayer;
361  else if ( sipCpp->type() == QgsProcessingParameterMeshLayer::typeName() )
362  sipType = sipType_QgsProcessingParameterMeshLayer;
363  else if ( sipCpp->type() == QgsProcessingParameterEnum::typeName() )
364  sipType = sipType_QgsProcessingParameterEnum;
365  else if ( sipCpp->type() == QgsProcessingParameterString::typeName() )
366  sipType = sipType_QgsProcessingParameterString;
367  else if ( sipCpp->type() == QgsProcessingParameterExpression::typeName() )
368  sipType = sipType_QgsProcessingParameterExpression;
369  else if ( sipCpp->type() == QgsProcessingParameterAuthConfig::typeName() )
370  sipType = sipType_QgsProcessingParameterAuthConfig;
371  else if ( sipCpp->type() == QgsProcessingParameterVectorLayer::typeName() )
372  sipType = sipType_QgsProcessingParameterVectorLayer;
373  else if ( sipCpp->type() == QgsProcessingParameterField::typeName() )
374  sipType = sipType_QgsProcessingParameterField;
375  else if ( sipCpp->type() == QgsProcessingParameterFeatureSource::typeName() )
376  sipType = sipType_QgsProcessingParameterFeatureSource;
377  else if ( sipCpp->type() == QgsProcessingParameterFeatureSink::typeName() )
378  sipType = sipType_QgsProcessingParameterFeatureSink;
379  else if ( sipCpp->type() == QgsProcessingParameterVectorDestination::typeName() )
380  sipType = sipType_QgsProcessingParameterVectorDestination;
381  else if ( sipCpp->type() == QgsProcessingParameterRasterDestination::typeName() )
382  sipType = sipType_QgsProcessingParameterRasterDestination;
383  else if ( sipCpp->type() == QgsProcessingParameterFileDestination::typeName() )
384  sipType = sipType_QgsProcessingParameterFileDestination;
385  else if ( sipCpp->type() == QgsProcessingParameterFolderDestination::typeName() )
386  sipType = sipType_QgsProcessingParameterFolderDestination;
387  else if ( sipCpp->type() == QgsProcessingParameterBand::typeName() )
388  sipType = sipType_QgsProcessingParameterBand;
389  else if ( sipCpp->type() == QgsProcessingParameterLayout::typeName() )
390  sipType = sipType_QgsProcessingParameterLayout;
391  else if ( sipCpp->type() == QgsProcessingParameterLayoutItem::typeName() )
392  sipType = sipType_QgsProcessingParameterLayoutItem;
393  else if ( sipCpp->type() == QgsProcessingParameterColor::typeName() )
394  sipType = sipType_QgsProcessingParameterColor;
395  else if ( sipCpp->type() == QgsProcessingParameterCoordinateOperation::typeName() )
396  sipType = sipType_QgsProcessingParameterCoordinateOperation;
397  else if ( sipCpp->type() == QgsProcessingParameterMapTheme::typeName() )
398  sipType = sipType_QgsProcessingParameterMapTheme;
399  else if ( sipCpp->type() == QgsProcessingParameterDateTime::typeName() )
400  sipType = sipType_QgsProcessingParameterDateTime;
401  else if ( sipCpp->type() == QgsProcessingParameterProviderConnection::typeName() )
402  sipType = sipType_QgsProcessingParameterProviderConnection;
403  else if ( sipCpp->type() == QgsProcessingParameterDatabaseSchema::typeName() )
404  sipType = sipType_QgsProcessingParameterDatabaseSchema;
405  else if ( sipCpp->type() == QgsProcessingParameterDatabaseTable::typeName() )
406  sipType = sipType_QgsProcessingParameterDatabaseTable;
407  else if ( sipCpp->type() == QgsProcessingParameterFieldMapping::typeName() )
408  sipType = sipType_QgsProcessingParameterFieldMapping;
409  else
410  sipType = nullptr;
411  SIP_END
412 #endif
413 
414  public:
415 
417  enum Flag
418  {
419  FlagAdvanced = 1 << 1,
420  FlagHidden = 1 << 2,
421  FlagOptional = 1 << 3,
422  FlagIsModelOutput = 1 << 4,
423  };
424  Q_DECLARE_FLAGS( Flags, Flag )
425 
426 
429  QgsProcessingParameterDefinition( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
430  bool optional = false );
431 
432  virtual ~QgsProcessingParameterDefinition() = default;
433 
437  virtual QgsProcessingParameterDefinition *clone() const = 0 SIP_FACTORY;
438 
442  virtual QString type() const = 0;
443 
449  virtual bool isDestination() const { return false; }
450 
456  QString name() const { return mName; }
457 
463  void setName( const QString &name ) { mName = name; }
464 
470  QString description() const { return mDescription; }
471 
477  void setDescription( const QString &description ) { mDescription = description; }
478 
483  QVariant defaultValue() const { return mDefault; }
484 
490  void setDefaultValue( const QVariant &value ) { mDefault = value; }
491 
496  Flags flags() const { return mFlags; }
497 
502  void setFlags( Flags flags ) { mFlags = flags; }
503 
511  virtual bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const;
512 
517  virtual QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const;
518 
523  virtual QString asScriptCode() const;
524 
534  virtual QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const;
535 
541  virtual QVariantMap toVariantMap() const;
542 
548  virtual bool fromVariantMap( const QVariantMap &map );
549 
556  SIP_SKIP QVariantMap metadata() const { return mMetadata; }
557 
563  QVariantMap &metadata() { return mMetadata; }
564 
570  void setMetadata( const QVariantMap &metadata ) { mMetadata = metadata; }
571 
576  virtual QStringList dependsOnOtherParameters() const { return QStringList(); }
577 
584 
590  QgsProcessingProvider *provider() const;
591 
596  virtual QString toolTip() const;
597 
605  bool isDynamic() const { return mIsDynamic; }
606 
614  void setIsDynamic( bool dynamic ) { mIsDynamic = dynamic; }
615 
622  QgsPropertyDefinition dynamicPropertyDefinition() const { return mPropertyDefinition; }
623 
630  void setDynamicPropertyDefinition( const QgsPropertyDefinition &definition ) { mPropertyDefinition = definition; }
631 
643  QString dynamicLayerParameterName() const { return mDynamicLayerParameterName; }
644 
656  void setDynamicLayerParameterName( const QString &name ) { mDynamicLayerParameterName = name; }
657 
671  QStringList additionalExpressionContextVariables() const { return mAdditionalExpressionVariables; }
672 
690  void setAdditionalExpressionContextVariables( const QStringList &variables ) { mAdditionalExpressionVariables = variables; }
691 
692  protected:
693 
695  QString mName;
696 
698  QString mDescription;
699 
701  QVariant mDefault;
702 
704  Flags mFlags;
705 
707  QVariantMap mMetadata;
708 
710  QgsProcessingAlgorithm *mAlgorithm = nullptr;
711 
713  bool mIsDynamic = false;
714 
717 
720 
723 
724  // To allow access to mAlgorithm. We don't want a public setter for this!
726 
727 };
728 
729 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProcessingParameterDefinition::Flags )
730 
731 typedef QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions;
733 
752 class CORE_EXPORT QgsProcessingParameters
753 {
754 
755  public:
756 
761  static bool isDynamic( const QVariantMap &parameters, const QString &name );
762 
766  static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
767 
772  static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
773 
777  static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
778 
783  static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
784 
788  static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
789 
794  static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
795 
799  static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
800 
805  static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
806 
811  static QList<int> parameterAsInts( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
812 
817  static QList<int> parameterAsInts( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
818 
827  static QDateTime parameterAsDateTime( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
828 
837  static QDateTime parameterAsDateTime( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
838 
847  static QDate parameterAsDate( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
848 
857  static QDate parameterAsDate( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
858 
867  static QTime parameterAsTime( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
868 
877  static QTime parameterAsTime( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
878 
882  static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
883 
888  static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
889 
893  static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
894 
899  static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
900 
904  static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
905 
911  static bool parameterAsBoolean( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
912 
917  static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
918 
923  static bool parameterAsBoolean( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
924 
938  static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters,
939  const QgsFields &fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem &crs,
940  QgsProcessingContext &context, QString &destinationIdentifier SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags() ) SIP_FACTORY;
941 
957  static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariant &value,
958  const QgsFields &fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem &crs,
959  QgsProcessingContext &context, QString &destinationIdentifier SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags() ) SIP_THROW( QgsProcessingException ) SIP_FACTORY;
960 
969  static QgsProcessingFeatureSource *parameterAsSource( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context ) SIP_FACTORY;
970 
981  static QgsProcessingFeatureSource *parameterAsSource( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context ) SIP_FACTORY;
982 
998  static QString parameterAsCompatibleSourceLayerPath( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters,
999  QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat = QString( "shp" ), QgsProcessingFeedback *feedback = nullptr );
1000 
1030  static QString parameterAsCompatibleSourceLayerPathAndLayerName( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters,
1031  QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat = QString( "shp" ), QgsProcessingFeedback *feedback = nullptr, QString *layerName SIP_OUT = nullptr );
1032 
1040  static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingUtils::LayerHint layerHint = QgsProcessingUtils::LayerHint::UnknownType );
1041 
1051  static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context, QgsProcessingUtils::LayerHint layerHint = QgsProcessingUtils::LayerHint::UnknownType );
1052 
1060  static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1061 
1071  static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1072 
1076  static QString parameterAsOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1077 
1082  static QString parameterAsOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1083 
1087  static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1088 
1093  static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1094 
1102  static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1103 
1113  static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1114 
1124  static QgsMeshLayer *parameterAsMeshLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1125 
1135  static QgsMeshLayer *parameterAsMeshLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1136 
1137 
1141  static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1142 
1147  static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1148 
1158  static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context,
1160 
1172  static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context,
1174 
1186  static QgsGeometry parameterAsExtentGeometry( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context,
1188 
1194  static QgsCoordinateReferenceSystem parameterAsExtentCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1195 
1201  static QgsCoordinateReferenceSystem parameterAsExtentCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1202 
1203 
1211  static QgsPointXY parameterAsPoint( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context,
1213 
1222  static QgsPointXY parameterAsPoint( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context,
1224 
1230  static QgsCoordinateReferenceSystem parameterAsPointCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1231 
1238  static QgsCoordinateReferenceSystem parameterAsPointCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1239 
1243  static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1244 
1249  static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1250 
1255  static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1256 
1262  static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1263 
1267  static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1268 
1273  static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1274 
1280  static QStringList parameterAsFileList( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1281 
1287  static QStringList parameterAsFileList( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1288 
1292  static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1293 
1298  static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1299 
1303  static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1304 
1309  static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1310 
1319  static QgsPrintLayout *parameterAsLayout( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1320 
1329  static QgsPrintLayout *parameterAsLayout( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1330 
1339  static QgsLayoutItem *parameterAsLayoutItem( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context, QgsPrintLayout *layout );
1340 
1349  static QgsLayoutItem *parameterAsLayoutItem( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context, QgsPrintLayout *layout );
1350 
1356  static QColor parameterAsColor( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
1357 
1363  static QColor parameterAsColor( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
1364 
1370  static QString parameterAsConnectionName( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1371 
1377  static QString parameterAsConnectionName( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1378 
1384  static QString parameterAsSchema( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1385 
1391  static QString parameterAsSchema( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1392 
1398  static QString parameterAsDatabaseTableName( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, const QgsProcessingContext &context );
1399 
1405  static QString parameterAsDatabaseTableName( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
1406 
1412  static QgsProcessingParameterDefinition *parameterFromVariantMap( const QVariantMap &map ) SIP_FACTORY;
1413 
1417  static QString descriptionFromName( const QString &name );
1418 
1424  static QgsProcessingParameterDefinition *parameterFromScriptCode( const QString &code ) SIP_FACTORY;
1425 
1426  private:
1427 
1428  static bool parseScriptCodeParameterOptions( const QString &code, bool &isOptional, QString &name, QString &type, QString &definition );
1429 };
1430 
1431 
1432 
1440 {
1441  public:
1442 
1446  QgsProcessingParameterBoolean( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1447  bool optional = false );
1448 
1452  static QString typeName() { return QStringLiteral( "boolean" ); }
1454  QString type() const override { return typeName(); }
1455  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1456  QString asScriptCode() const override;
1457 
1461  static QgsProcessingParameterBoolean *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1462 };
1463 
1471 {
1472  public:
1473 
1477  QgsProcessingParameterCrs( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1478  bool optional = false );
1479 
1483  static QString typeName() { return QStringLiteral( "crs" ); }
1485  QString type() const override { return typeName(); }
1486  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1487  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1488 
1492  static QgsProcessingParameterCrs *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1493 
1494 };
1495 
1503 {
1504  public:
1505 
1509  QgsProcessingParameterExtent( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1510  bool optional = false );
1511 
1515  static QString typeName() { return QStringLiteral( "extent" ); }
1517  QString type() const override { return typeName(); }
1518  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1519  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1520 
1524  static QgsProcessingParameterExtent *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1525 
1526 };
1527 
1528 
1536 {
1537  public:
1538 
1542  QgsProcessingParameterPoint( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
1543  bool optional = false );
1544 
1548  static QString typeName() { return QStringLiteral( "point" ); }
1550  QString type() const override { return typeName(); }
1551  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1552  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1553 
1557  static QgsProcessingParameterPoint *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1558 
1559 };
1560 
1568 {
1569  public:
1570 
1573  {
1574  File = 0,
1576  };
1577 
1585  QgsProcessingParameterFile( const QString &name, const QString &description = QString(), Behavior behavior = File, const QString &extension = QString(), const QVariant &defaultValue = QVariant(),
1586  bool optional = false, const QString &fileFilter = QString() );
1587 
1591  static QString typeName() { return QStringLiteral( "file" ); }
1593  QString type() const override { return typeName(); }
1594  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1595  QString asScriptCode() const override;
1597 
1602  Behavior behavior() const { return mBehavior; }
1603 
1608  void setBehavior( Behavior behavior ) { mBehavior = behavior; }
1609 
1617  QString extension() const { return mExtension; }
1618 
1628  void setExtension( const QString &extension );
1629 
1636  QString fileFilter() const;
1637 
1647  void setFileFilter( const QString &filter );
1648 
1649  QVariantMap toVariantMap() const override;
1650  bool fromVariantMap( const QVariantMap &map ) override;
1651 
1655  static QgsProcessingParameterFile *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition, Behavior behavior = File ) SIP_FACTORY;
1656 
1657  private:
1658 
1659  Behavior mBehavior = File;
1660  QString mExtension;
1661  QString mFileFilter;
1662 };
1663 
1671 {
1672  public:
1673 
1677  QgsProcessingParameterMatrix( const QString &name, const QString &description = QString(), int numberRows = 3,
1678  bool hasFixedNumberRows = false, const QStringList &headers = QStringList(),
1679  const QVariant &defaultValue = QVariant(),
1680  bool optional = false );
1681 
1685  static QString typeName() { return QStringLiteral( "matrix" ); }
1687  QString type() const override { return typeName(); }
1688  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1689  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1691 
1696  QStringList headers() const;
1697 
1702  void setHeaders( const QStringList &headers );
1703 
1710  int numberRows() const;
1711 
1718  void setNumberRows( int rows );
1719 
1725  bool hasFixedNumberRows() const;
1726 
1732  void setHasFixedNumberRows( bool hasFixedNumberRows );
1733 
1734  QVariantMap toVariantMap() const override;
1735  bool fromVariantMap( const QVariantMap &map ) override;
1736 
1740  static QgsProcessingParameterMatrix *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1741 
1742  private:
1743 
1744  QStringList mHeaders;
1745  int mNumberRows = 3;
1746  bool mFixedNumberRows = false;
1747 
1748 };
1749 
1757 {
1758  public:
1759 
1763  QgsProcessingParameterMultipleLayers( const QString &name, const QString &description = QString(), QgsProcessing::SourceType layerType = QgsProcessing::TypeVectorAnyGeometry,
1764  const QVariant &defaultValue = QVariant(),
1765  bool optional = false );
1766 
1770  static QString typeName() { return QStringLiteral( "multilayer" ); }
1772  QString type() const override { return typeName(); }
1773  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1774  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1775  QString asScriptCode() const override;
1777  QString createFileFilter() const override;
1778 
1783  QgsProcessing::SourceType layerType() const;
1784 
1789  void setLayerType( QgsProcessing::SourceType type );
1790 
1796  int minimumNumberInputs() const;
1797 
1803  void setMinimumNumberInputs( int minimum );
1804 
1805  QVariantMap toVariantMap() const override;
1806  bool fromVariantMap( const QVariantMap &map ) override;
1807 
1811  static QgsProcessingParameterMultipleLayers *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1812 
1813  private:
1814 
1816  int mMinimumNumberInputs = 0;
1817 
1818 };
1819 
1839 {
1840  public:
1841 
1843  enum Type
1844  {
1847  };
1848 
1852  explicit QgsProcessingParameterNumber( const QString &name, const QString &description = QString(),
1853  Type type = Integer,
1854  const QVariant &defaultValue = QVariant(),
1855  bool optional = false,
1856  double minValue = std::numeric_limits<double>::lowest() + 1,
1857  double maxValue = std::numeric_limits<double>::max()
1858  );
1859 
1863  static QString typeName() { return QStringLiteral( "number" ); }
1865  QString type() const override { return typeName(); }
1866  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
1867  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
1868  QString toolTip() const override;
1870 
1875  double minimum() const;
1876 
1881  void setMinimum( double minimum );
1882 
1887  double maximum() const;
1888 
1893  void setMaximum( double maximum );
1894 
1899  Type dataType() const;
1900 
1905  void setDataType( Type type );
1906 
1907  QVariantMap toVariantMap() const override;
1908  bool fromVariantMap( const QVariantMap &map ) override;
1909 
1913  static QgsProcessingParameterNumber *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
1914 
1915  private:
1916 
1917  double mMin = std::numeric_limits<double>::lowest() + 1;
1918  double mMax = std::numeric_limits<double>::max();
1919  Type mDataType = Integer;
1920 };
1921 
1942 {
1943  public:
1944 
1948  explicit QgsProcessingParameterDistance( const QString &name, const QString &description = QString(),
1949  const QVariant &defaultValue = QVariant(),
1950  const QString &parentParameterName = QString(),
1951  bool optional = false,
1952  double minValue = std::numeric_limits<double>::lowest() + 1,
1953  double maxValue = std::numeric_limits<double>::max() );
1954 
1958  static QString typeName() { return QStringLiteral( "distance" ); }
1959 
1961 
1962  QString type() const override;
1963  QStringList dependsOnOtherParameters() const override;
1964  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
1965 
1970  QString parentParameterName() const;
1971 
1976  void setParentParameterName( const QString &parentParameterName );
1977 
1984  QgsUnitTypes::DistanceUnit defaultUnit() const { return mDefaultUnit; }
1985 
1992  void setDefaultUnit( QgsUnitTypes::DistanceUnit unit ) { mDefaultUnit = unit; }
1993 
1994  QVariantMap toVariantMap() const override;
1995  bool fromVariantMap( const QVariantMap &map ) override;
1996 
1997  private:
1998 
1999  QString mParentParameterName;
2001 
2002 };
2003 
2015 {
2016  public:
2017 
2021  explicit QgsProcessingParameterScale( const QString &name, const QString &description = QString(),
2022  const QVariant &defaultValue = QVariant(),
2023  bool optional = false );
2024 
2028  static QString typeName() { return QStringLiteral( "scale" ); }
2029 
2030  QgsProcessingParameterScale *clone() const override SIP_FACTORY;
2031 
2032  QString type() const override;
2033  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2034 
2038  static QgsProcessingParameterScale *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2039 
2040 };
2041 
2049 {
2050  public:
2051 
2055  QgsProcessingParameterRange( const QString &name, const QString &description = QString(),
2057  const QVariant &defaultValue = QVariant(),
2058  bool optional = false );
2059 
2063  static QString typeName() { return QStringLiteral( "range" ); }
2065  QString type() const override { return typeName(); }
2066  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2067  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2069 
2075 
2081 
2082  QVariantMap toVariantMap() const override;
2083  bool fromVariantMap( const QVariantMap &map ) override;
2084 
2088  static QgsProcessingParameterRange *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2089 
2090  private:
2091 
2093 };
2094 
2102 {
2103  public:
2104 
2108  QgsProcessingParameterRasterLayer( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2109  bool optional = false );
2110 
2114  static QString typeName() { return QStringLiteral( "raster" ); }
2116  QString type() const override { return typeName(); }
2117  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2118  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2119  QString createFileFilter() const override;
2120 
2124  static QgsProcessingParameterRasterLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2125 
2126 };
2127 
2135 {
2136  public:
2137 
2141  QgsProcessingParameterEnum( const QString &name, const QString &description = QString(), const QStringList &options = QStringList(),
2142  bool allowMultiple = false,
2143  const QVariant &defaultValue = QVariant(),
2144  bool optional = false );
2145 
2149  static QString typeName() { return QStringLiteral( "enum" ); }
2151  QString type() const override { return typeName(); }
2152  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2153  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2154  QString asScriptCode() const override;
2156 
2161  QStringList options() const;
2162 
2167  void setOptions( const QStringList &options );
2168 
2173  bool allowMultiple() const;
2174 
2179  void setAllowMultiple( bool allowMultiple );
2180 
2181  QVariantMap toVariantMap() const override;
2182  bool fromVariantMap( const QVariantMap &map ) override;
2183 
2187  static QgsProcessingParameterEnum *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2188 
2189  private:
2190 
2191  QStringList mOptions;
2192  bool mAllowMultiple = false;
2193 
2194 };
2195 
2203 {
2204  public:
2205 
2209  QgsProcessingParameterString( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2210  bool multiLine = false,
2211  bool optional = false );
2212 
2216  static QString typeName() { return QStringLiteral( "string" ); }
2218  QString type() const override { return typeName(); }
2219  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2220  QString asScriptCode() const override;
2222 
2227  bool multiLine() const;
2228 
2233  void setMultiLine( bool multiLine );
2234 
2235  QVariantMap toVariantMap() const override;
2236  bool fromVariantMap( const QVariantMap &map ) override;
2237 
2241  static QgsProcessingParameterString *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2242 
2243  private:
2244 
2245  bool mMultiLine = false;
2246 
2247 };
2248 
2249 
2263 {
2264  public:
2265 
2269  QgsProcessingParameterAuthConfig( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2270  bool optional = false );
2271 
2275  static QString typeName() { return QStringLiteral( "authcfg" ); }
2277  QString type() const override { return typeName(); }
2278  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2279  QString asScriptCode() const override;
2280 
2284  static QgsProcessingParameterAuthConfig *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2285 
2286 };
2287 
2295 {
2296  public:
2297 
2301  QgsProcessingParameterExpression( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2302  const QString &parentLayerParameterName = QString(),
2303  bool optional = false );
2304 
2308  static QString typeName() { return QStringLiteral( "expression" ); }
2310  QString type() const override { return typeName(); }
2311  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2312  QStringList dependsOnOtherParameters() const override;
2314 
2319  QString parentLayerParameterName() const;
2320 
2325  void setParentLayerParameterName( const QString &parentLayerParameterName );
2326 
2327  QVariantMap toVariantMap() const override;
2328  bool fromVariantMap( const QVariantMap &map ) override;
2329 
2333  static QgsProcessingParameterExpression *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2334 
2335  private:
2336 
2337  QString mParentLayerParameterName;
2338 
2339 };
2340 
2341 
2349 {
2350  public:
2351 
2355  QgsProcessingParameterLimitedDataTypes( const QList< int > &types = QList< int >() );
2356 
2361  QList< int > dataTypes() const;
2362 
2367  void setDataTypes( const QList< int > &types );
2368 
2369  protected:
2370 
2372  QList< int > mDataTypes;
2373 };
2374 
2383 {
2384  public:
2385 
2389  QgsProcessingParameterVectorLayer( const QString &name,
2390  const QString &description = QString(),
2391  const QList< int > &types = QList< int >(),
2392  const QVariant &defaultValue = QVariant(),
2393  bool optional = false );
2394 
2398  static QString typeName() { return QStringLiteral( "vector" ); }
2400  QString type() const override { return typeName(); }
2401  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2402  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2404  QString createFileFilter() const override;
2405 
2406  QVariantMap toVariantMap() const override;
2407  bool fromVariantMap( const QVariantMap &map ) override;
2408 
2412  static QgsProcessingParameterVectorLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2413 
2414 };
2415 
2423 {
2424  public:
2425 
2429  QgsProcessingParameterMeshLayer( const QString &name,
2430  const QString &description = QString(),
2431  const QVariant &defaultValue = QVariant(),
2432  bool optional = false );
2433 
2437  static QString typeName() { return QStringLiteral( "mesh" ); }
2439  QString type() const override { return typeName(); }
2440  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2441  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2442  QString createFileFilter() const override;
2443 
2447  static QgsProcessingParameterMeshLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2448 };
2449 
2457 {
2458  public:
2459 
2463  QgsProcessingParameterMapLayer( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2464  bool optional = false,
2465  const QList< int > &types = QList< int >() );
2466 
2470  static QString typeName() { return QStringLiteral( "layer" ); }
2472  QString type() const override { return typeName(); }
2473  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2474  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2475  QString asScriptCode() const override;
2477  QString createFileFilter() const override;
2478 
2479  QVariantMap toVariantMap() const override;
2480  bool fromVariantMap( const QVariantMap &map ) override;
2481 
2485  static QgsProcessingParameterMapLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2486 
2487 };
2488 
2496 {
2497  public:
2498 
2501  {
2502  Any = -1,
2503  Numeric = 0,
2504  String = 1,
2505  DateTime = 2
2506  };
2507 
2511  QgsProcessingParameterField( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2512  const QString &parentLayerParameterName = QString(),
2513  DataType type = Any,
2514  bool allowMultiple = false,
2515  bool optional = false,
2516  bool defaultToAllFields = false );
2517 
2521  static QString typeName() { return QStringLiteral( "field" ); }
2523  QString type() const override { return typeName(); }
2524  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2525  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2526  QString asScriptCode() const override;
2528  QStringList dependsOnOtherParameters() const override;
2529 
2534  QString parentLayerParameterName() const;
2535 
2540  void setParentLayerParameterName( const QString &parentLayerParameterName );
2541 
2546  DataType dataType() const;
2547 
2552  void setDataType( DataType type );
2553 
2558  bool allowMultiple() const;
2559 
2564  void setAllowMultiple( bool allowMultiple );
2565 
2575  bool defaultToAllFields() const;
2576 
2586  void setDefaultToAllFields( bool enabled );
2587 
2588  QVariantMap toVariantMap() const override;
2589  bool fromVariantMap( const QVariantMap &map ) override;
2590 
2594  static QgsProcessingParameterField *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2595 
2596  private:
2597 
2598  QString mParentLayerParameterName;
2599  DataType mDataType = Any;
2600  bool mAllowMultiple = false;
2601  bool mDefaultToAllFields = false;
2602 
2603 };
2604 
2605 
2613 {
2614  public:
2615 
2619  QgsProcessingParameterFeatureSource( const QString &name, const QString &description = QString(),
2620  const QList< int > &types = QList< int >(),
2621  const QVariant &defaultValue = QVariant(), bool optional = false );
2622 
2626  static QString typeName() { return QStringLiteral( "source" ); }
2628  QString type() const override { return typeName(); }
2629  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2630  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2631  QString asScriptCode() const override;
2633  QString createFileFilter() const override;
2634 
2635  QVariantMap toVariantMap() const override;
2636  bool fromVariantMap( const QVariantMap &map ) override;
2637 
2641  static QgsProcessingParameterFeatureSource *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2642 
2643 };
2644 
2653 {
2654  public:
2655 
2662  QgsProcessingDestinationParameter( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
2663  bool optional = false, bool createByDefault = true );
2664 
2665  bool isDestination() const override { return true; }
2666  QVariantMap toVariantMap() const override;
2667  bool fromVariantMap( const QVariantMap &map ) override;
2669  QString createFileFilter() const override;
2670 
2675  virtual QgsProcessingOutputDefinition *toOutputDefinition() const = 0 SIP_FACTORY;
2676 
2682  bool supportsNonFileBasedOutput() const { return mSupportsNonFileBasedOutputs; }
2683 
2689  void setSupportsNonFileBasedOutput( bool supportsNonFileBasedOutput ) { mSupportsNonFileBasedOutputs = supportsNonFileBasedOutput; }
2690 
2695  virtual QString defaultFileExtension() const = 0;
2696 
2702  virtual QString generateTemporaryDestination() const;
2703 
2718  virtual bool isSupportedOutputValue( const QVariant &value, QgsProcessingContext &context, QString &error SIP_OUT ) const;
2719 
2725  bool createByDefault() const;
2726 
2732  void setCreateByDefault( bool createByDefault );
2733 
2734  protected:
2735 
2744  QgsProcessingProvider *originalProvider() const { return mOriginalProvider; }
2745 
2746  private:
2747 
2755  QgsProcessingProvider *mOriginalProvider = nullptr;
2756 
2757  bool mSupportsNonFileBasedOutputs = true;
2758  bool mCreateByDefault = true;
2759 
2760  friend class QgsProcessingModelAlgorithm;
2761  friend class TestQgsProcessing;
2762 };
2763 
2764 
2774 {
2775  public:
2776 
2783  QgsProcessingParameterFeatureSink( const QString &name, const QString &description = QString(), QgsProcessing::SourceType type = QgsProcessing::TypeVectorAnyGeometry, const QVariant &defaultValue = QVariant(),
2784  bool optional = false, bool createByDefault = true, bool supportsAppend = false );
2785 
2789  static QString typeName() { return QStringLiteral( "sink" ); }
2791  QString type() const override { return typeName(); }
2792  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2793  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2794  QString asScriptCode() const override;
2796  QString defaultFileExtension() const override;
2797  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2798  QString createFileFilter() const override;
2799 
2805  virtual QStringList supportedOutputVectorLayerExtensions() const;
2806 
2811  QgsProcessing::SourceType dataType() const;
2812 
2817  bool hasGeometry() const;
2818 
2823  void setDataType( QgsProcessing::SourceType type );
2824 
2833  bool supportsAppend() const;
2834 
2843  void setSupportsAppend( bool supportsAppend );
2844 
2845  QVariantMap toVariantMap() const override;
2846  bool fromVariantMap( const QVariantMap &map ) override;
2847  QString generateTemporaryDestination() const override;
2848 
2852  static QgsProcessingParameterFeatureSink *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2853 
2854  private:
2855 
2856  QgsProcessing::SourceType mDataType = QgsProcessing::TypeVectorAnyGeometry;
2857  bool mSupportsAppend = false;
2858 };
2859 
2860 
2872 {
2873  public:
2874 
2881  QgsProcessingParameterVectorDestination( const QString &name, const QString &description = QString(), QgsProcessing::SourceType type = QgsProcessing::TypeVectorAnyGeometry, const QVariant &defaultValue = QVariant(),
2882  bool optional = false, bool createByDefault = true );
2883 
2887  static QString typeName() { return QStringLiteral( "vectorDestination" ); }
2889  QString type() const override { return typeName(); }
2890  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2891  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2892  QString asScriptCode() const override;
2894  QString defaultFileExtension() const override;
2895  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2896  QString createFileFilter() const override;
2897 
2903  virtual QStringList supportedOutputVectorLayerExtensions() const;
2904 
2909  QgsProcessing::SourceType dataType() const;
2910 
2915  bool hasGeometry() const;
2916 
2921  void setDataType( QgsProcessing::SourceType type );
2922 
2923  QVariantMap toVariantMap() const override;
2924  bool fromVariantMap( const QVariantMap &map ) override;
2925 
2929  static QgsProcessingParameterVectorDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2930 
2931 
2932  private:
2933 
2934  QgsProcessing::SourceType mDataType = QgsProcessing::TypeVectorAnyGeometry;
2935 };
2936 
2945 {
2946  public:
2947 
2954  QgsProcessingParameterRasterDestination( const QString &name, const QString &description = QString(),
2955  const QVariant &defaultValue = QVariant(),
2956  bool optional = false,
2957  bool createByDefault = true );
2958 
2962  static QString typeName() { return QStringLiteral( "rasterDestination" ); }
2964  QString type() const override { return typeName(); }
2965  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
2966  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
2968  QString defaultFileExtension() const override;
2969  QString createFileFilter() const override;
2970 
2976  virtual QStringList supportedOutputRasterLayerExtensions() const;
2977 
2981  static QgsProcessingParameterRasterDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
2982 };
2983 
3006 {
3007  public:
3008 
3015  QgsProcessingParameterFileDestination( const QString &name, const QString &description = QString(),
3016  const QString &fileFilter = QString(),
3017  const QVariant &defaultValue = QVariant(),
3018  bool optional = false,
3019  bool createByDefault = true );
3020 
3024  static QString typeName() { return QStringLiteral( "fileDestination" ); }
3026  QString type() const override { return typeName(); }
3027  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3028  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3030  QString defaultFileExtension() const override;
3031  QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3032  QString createFileFilter() const override;
3033 
3038  QString fileFilter() const;
3039 
3044  void setFileFilter( const QString &filter );
3045 
3046  QVariantMap toVariantMap() const override;
3047  bool fromVariantMap( const QVariantMap &map ) override;
3048 
3052  static QgsProcessingParameterFileDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3053 
3054 
3055  private:
3056 
3057  QString mFileFilter;
3058 };
3059 
3069 {
3070  public:
3071 
3075  QgsProcessingParameterFolderDestination( const QString &name, const QString &description = QString(),
3076  const QVariant &defaultValue = QVariant(),
3077  bool optional = false,
3078  bool createByDefault = true );
3079 
3083  static QString typeName() { return QStringLiteral( "folderDestination" ); }
3085  QString type() const override { return typeName(); }
3086  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3088  QString defaultFileExtension() const override;
3089 
3093  static QgsProcessingParameterFolderDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3094 
3095 };
3096 
3104 {
3105  public:
3106 
3110  QgsProcessingParameterBand( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3111  const QString &parentLayerParameterName = QString(),
3112  bool optional = false,
3113  bool allowMultiple = false );
3114 
3118  static QString typeName() { return QStringLiteral( "band" ); }
3120  QString type() const override { return typeName(); }
3121  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3122  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3123  QString asScriptCode() const override;
3124  QStringList dependsOnOtherParameters() const override;
3126 
3131  QString parentLayerParameterName() const;
3132 
3137  void setParentLayerParameterName( const QString &parentLayerParameterName );
3138 
3139  QVariantMap toVariantMap() const override;
3140  bool fromVariantMap( const QVariantMap &map ) override;
3141 
3145  static QgsProcessingParameterBand *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3146 
3152  bool allowMultiple() const;
3153 
3159  void setAllowMultiple( bool allowMultiple );
3160 
3161  private:
3162 
3163  QString mParentLayerParameterName;
3164  bool mAllowMultiple = false;
3165 };
3166 
3179 {
3180  public:
3181 
3185  QgsProcessingParameterLayout( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3186  bool optional = false );
3187 
3191  static QString typeName() { return QStringLiteral( "layout" ); }
3193  QString type() const override { return typeName(); }
3194  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3195  QString asScriptCode() const override;
3197 
3201  static QgsProcessingParameterLayout *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3202 
3203 };
3204 
3217 {
3218  public:
3219 
3223  QgsProcessingParameterLayoutItem( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3224  const QString &parentLayoutParameterName = QString(),
3225  int itemType = -1,
3226  bool optional = false );
3227 
3231  static QString typeName() { return QStringLiteral( "layoutitem" ); }
3233  QString type() const override { return typeName(); }
3234  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3235  QString asScriptCode() const override;
3237  QVariantMap toVariantMap() const override;
3238  bool fromVariantMap( const QVariantMap &map ) override;
3239  QStringList dependsOnOtherParameters() const override;
3240 
3244  static QgsProcessingParameterLayoutItem *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3245 
3250  QString parentLayoutParameterName() const;
3251 
3256  void setParentLayoutParameterName( const QString &name );
3257 
3265  int itemType() const;
3266 
3274  void setItemType( int type );
3275 
3276  private:
3277  QString mParentLayoutParameterName;
3278  int mItemType = -1;
3279 };
3280 
3291 {
3292  public:
3293 
3299  QgsProcessingParameterColor( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3300  bool opacityEnabled = true,
3301  bool optional = false );
3302 
3306  static QString typeName() { return QStringLiteral( "color" ); }
3308  QString type() const override { return typeName(); }
3309  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3310  QString asScriptCode() const override;
3312  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3313  QVariantMap toVariantMap() const override;
3314  bool fromVariantMap( const QVariantMap &map ) override;
3315 
3322  bool opacityEnabled() const;
3323 
3331  void setOpacityEnabled( bool enabled );
3332 
3336  static QgsProcessingParameterColor *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3337 
3338  private:
3339 
3340  bool mAllowOpacity = true;
3341 
3342 };
3343 
3344 
3355 {
3356  public:
3357 
3361  QgsProcessingParameterCoordinateOperation( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3362  const QString &sourceCrsParameterName = QString(), const QString &destinationCrsParameterName = QString(),
3363  const QVariant &staticSourceCrs = QVariant(), const QVariant &staticDestinationCrs = QVariant(),
3364  bool optional = false );
3365 
3369  static QString typeName() { return QStringLiteral( "coordinateoperation" ); }
3371  QString type() const override { return typeName(); }
3372  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3373  QString asScriptCode() const override;
3375  QStringList dependsOnOtherParameters() const override;
3376 
3377  QVariantMap toVariantMap() const override;
3378  bool fromVariantMap( const QVariantMap &map ) override;
3379 
3383  static QgsProcessingParameterCoordinateOperation *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3384 
3390  QString sourceCrsParameterName() const { return mSourceParameterName; }
3391 
3397  void setSourceCrsParameterName( const QString &name ) { mSourceParameterName = name; }
3398 
3404  QString destinationCrsParameterName() const { return mDestParameterName; }
3405 
3411  void setDestinationCrsParameterName( const QString &name ) { mDestParameterName = name; }
3412 
3418  QVariant sourceCrs() const { return mSourceCrs; }
3419 
3425  void setSourceCrs( const QVariant &crs ) { mSourceCrs = crs; }
3426 
3432  QVariant destinationCrs() const { return mDestCrs; }
3433 
3439  void setDestinationCrs( const QVariant &crs ) { mDestCrs = crs; }
3440 
3441  private:
3442 
3443  QString mSourceParameterName;
3444  QString mDestParameterName;
3445  QVariant mSourceCrs;
3446  QVariant mDestCrs;
3447 
3448 };
3449 
3450 
3461 {
3462  public:
3463 
3467  QgsProcessingParameterMapTheme( const QString &name, const QString &description = QString(), const QVariant &defaultValue = QVariant(),
3468  bool optional = false );
3469 
3473  static QString typeName() { return QStringLiteral( "maptheme" ); }
3475  QString type() const override { return typeName(); }
3476  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3477  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3478  QString asScriptCode() const override;
3480  QVariantMap toVariantMap() const override;
3481  bool fromVariantMap( const QVariantMap &map ) override;
3482 
3486  static QgsProcessingParameterMapTheme *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3487 
3488  private:
3489 
3490 };
3491 
3492 
3504 {
3505  public:
3506 
3508  enum Type
3509  {
3513  };
3514 
3518  explicit QgsProcessingParameterDateTime( const QString &name, const QString &description = QString(),
3519  Type type = DateTime,
3520  const QVariant &defaultValue = QVariant(),
3521  bool optional = false,
3522  const QDateTime &minValue = QDateTime(),
3523  const QDateTime &maxValue = QDateTime()
3524  );
3525 
3529  static QString typeName() { return QStringLiteral( "datetime" ); }
3531  QString type() const override { return typeName(); }
3532  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3533  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3534  QString toolTip() const override;
3536 
3544  QDateTime minimum() const;
3545 
3557  void setMinimum( const QDateTime &minimum );
3558 
3566  QDateTime maximum() const;
3567 
3579  void setMaximum( const QDateTime &maximum );
3580 
3585  Type dataType() const;
3586 
3591  void setDataType( Type type );
3592 
3593  QVariantMap toVariantMap() const override;
3594  bool fromVariantMap( const QVariantMap &map ) override;
3595 
3599  static QgsProcessingParameterDateTime *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3600 
3601  private:
3602 
3603  QDateTime mMin;
3604  QDateTime mMax;
3605  Type mDataType = DateTime;
3606 };
3607 
3608 
3620 {
3621  public:
3622 
3629  QgsProcessingParameterProviderConnection( const QString &name, const QString &description, const QString &provider, const QVariant &defaultValue = QVariant(),
3630  bool optional = false );
3631 
3635  static QString typeName() { return QStringLiteral( "providerconnection" ); }
3637  QString type() const override { return typeName(); }
3638  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3639  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3640  QString asScriptCode() const override;
3642  QVariantMap toVariantMap() const override;
3643  bool fromVariantMap( const QVariantMap &map ) override;
3644 
3649  QString providerId() const { return mProviderId; }
3650 
3655  void setProviderId( const QString &provider ) { mProviderId = provider; }
3656 
3660  static QgsProcessingParameterProviderConnection *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3661 
3662  private:
3663 
3664  QString mProviderId;
3665 };
3666 
3667 
3679 {
3680  public:
3681 
3690  QgsProcessingParameterDatabaseSchema( const QString &name, const QString &description, const QString &connectionParameterName = QString(), const QVariant &defaultValue = QVariant(),
3691  bool optional = false );
3692 
3696  static QString typeName() { return QStringLiteral( "databaseschema" ); }
3698  QString type() const override { return typeName(); }
3699  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3700  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3701  QString asScriptCode() const override;
3703  QVariantMap toVariantMap() const override;
3704  bool fromVariantMap( const QVariantMap &map ) override;
3705  QStringList dependsOnOtherParameters() const override;
3706 
3711  QString parentConnectionParameterName() const;
3712 
3717  void setParentConnectionParameterName( const QString &name );
3718 
3722  static QgsProcessingParameterDatabaseSchema *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3723 
3724  private:
3725 
3726  QString mParentConnectionParameterName;
3727 };
3728 
3729 
3741 {
3742  public:
3743 
3753  QgsProcessingParameterDatabaseTable( const QString &name, const QString &description,
3754  const QString &connectionParameterName = QString(),
3755  const QString &schemaParameterName = QString(),
3756  const QVariant &defaultValue = QVariant(),
3757  bool optional = false,
3758  bool allowNewTableNames = false );
3759 
3763  static QString typeName() { return QStringLiteral( "databasetable" ); }
3765  QString type() const override { return typeName(); }
3766  bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = nullptr ) const override;
3767  QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const override;
3768  QString asScriptCode() const override;
3770  QVariantMap toVariantMap() const override;
3771  bool fromVariantMap( const QVariantMap &map ) override;
3772  QStringList dependsOnOtherParameters() const override;
3773 
3778  QString parentConnectionParameterName() const;
3779 
3784  void setParentConnectionParameterName( const QString &name );
3785 
3790  QString parentSchemaParameterName() const;
3791 
3796  void setParentSchemaParameterName( const QString &name );
3797 
3801  static QgsProcessingParameterDatabaseTable *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) SIP_FACTORY;
3802 
3809  bool allowNewTableNames() const;
3810 
3817  void setAllowNewTableNames( bool allowed );
3818 
3819  private:
3820 
3821  QString mParentConnectionParameterName;
3822  QString mParentSchemaParameterName;
3823  bool mAllowNewTableNames = false;
3824 };
3825 
3826 
3827 // clazy:excludeall=qstring-allocations
3828 
3829 #endif // QGSPROCESSINGPARAMETERS_H
3830 
3831 
QgsProcessingFeatureSourceDefinition::selectedFeaturesOnly
bool selectedFeaturesOnly
true if only selected features in the source should be used by algorithms.
Definition: qgsprocessingparameters.h:122
QgsProcessingParameterMatrix
Definition: qgsprocessingparameters.h:1670
QgsProcessingDestinationParameter::toOutputDefinition
virtual QgsProcessingOutputDefinition * toOutputDefinition() const =0
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parame...
QgsProcessingParameterCoordinateOperation::sourceCrsParameterName
QString sourceCrsParameterName() const
Returns the name of the source CRS parameter, or an empty string if this is not set.
Definition: qgsprocessingparameters.h:3390
QgsProcessingParameterNumber::Double
@ Double
Double/float values.
Definition: qgsprocessingparameters.h:1846
QgsProcessingParameterField::DataType
DataType
Field data types.
Definition: qgsprocessingparameters.h:2500
QgsProcessingParameterProviderConnection::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3635
QgsProcessingParameterDefinition::toVariantMap
virtual QVariantMap toVariantMap() const
Saves this parameter to a QVariantMap.
Definition: qgsprocessingparameters.cpp:2176
QgsProcessingParameterRasterDestination::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2962
QgsProcessingDestinationParameter::isDestination
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
Definition: qgsprocessingparameters.h:2665
QgsProperty
A store for object properties.
Definition: qgsproperty.h:231
QgsProcessingParameterNumber::setDataType
void setDataType(Type type)
Sets the acceptable data type for the parameter.
Definition: qgsprocessingparameters.cpp:3465
qgsfilefiltergenerator.h
QgsFeatureRequest::GeometryAbortOnInvalid
@ GeometryAbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
Definition: qgsfeaturerequest.h:116
QgsProcessingParameterNumber::fromVariantMap
bool fromVariantMap(const QVariantMap &map) override
Restores this parameter to a QVariantMap.
Definition: qgsprocessingparameters.cpp:3479
QgsProcessingParameterDefinition::setDynamicPropertyDefinition
void setDynamicPropertyDefinition(const QgsPropertyDefinition &definition)
Sets the property definition for dynamic properties.
Definition: qgsprocessingparameters.h:630
QgsRemappingSinkDefinition
Definition: qgsremappingproxyfeaturesink.h:37
QgsProcessingParameterNumber
Definition: qgsprocessingparameters.h:1838
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition: qgsfeatureiterator.h:399
QgsProcessingParameterDefinition::valueAsPythonString
virtual QString valueAsPythonString(const QVariant &value, QgsProcessingContext &context) const
Returns a string version of the parameter input value, which is suitable for use as an input paramete...
Definition: qgsprocessingparameters.cpp:2131
QgsUnitTypes::DistanceUnknownUnit
@ DistanceUnknownUnit
Unknown distance unit.
Definition: qgsunittypes.h:78
QgsProcessingFeedback
Definition: qgsprocessingfeedback.h:37
QgsProcessingParameterDefinition::description
QString description() const
Returns the description for the parameter.
Definition: qgsprocessingparameters.h:470
QgsProcessingDestinationParameter::originalProvider
QgsProcessingProvider * originalProvider() const
Original (source) provider which this parameter has been derived from.
Definition: qgsprocessingparameters.h:2744
QgsProcessingParameterDefinition::setIsDynamic
void setIsDynamic(bool dynamic)
Sets whether the parameter is dynamic, and can support data-defined values (i.e.
Definition: qgsprocessingparameters.h:614
algorithm
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
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsProcessingParameterDefinition::flags
Flags flags() const
Returns any flags associated with the parameter.
Definition: qgsprocessingparameters.h:496
QgsProcessingParameterDefinition::mMetadata
QVariantMap mMetadata
Freeform metadata for parameter. Mostly used by widget wrappers to customize their appearance and beh...
Definition: qgsprocessingparameters.h:707
QgsProcessingParameterRasterDestination
Definition: qgsprocessingparameters.h:2944
QgsProcessingParameterDefinition::metadata
QVariantMap metadata() const
Returns the parameter's freeform metadata.
Definition: qgsprocessingparameters.h:556
QgsProcessingParameterFile::Folder
@ Folder
Parameter is a folder.
Definition: qgsprocessingparameters.h:1575
QgsProcessingParameterMapTheme
Definition: qgsprocessingparameters.h:3460
QgsProcessingParameterFile::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1591
QgsFields
Definition: qgsfields.h:44
QgsProcessingProvider
Definition: qgsprocessingprovider.h:34
QgsProcessingParameterLayoutItem::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3231
QgsProcessingParameterDefinition::additionalExpressionContextVariables
QStringList additionalExpressionContextVariables() const
Returns a list of additional expression context variables which are available for use when evaluating...
Definition: qgsprocessingparameters.h:671
qgis.h
QgsProcessingParameterVectorDestination::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2887
QgsProcessingParameterLimitedDataTypes
Definition: qgsprocessingparameters.h:2348
QgsProcessingFeatureSourceDefinition::flags
Flags flags
Flags which dictate source behavior.
Definition: qgsprocessingparameters.h:137
QgsProcessingParameterMultipleLayers::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1770
QgsProcessingParameterDefinition
Definition: qgsprocessingparameters.h:330
QgsProcessingFeatureSourceDefinition::operator!=
bool operator!=(const QgsProcessingFeatureSourceDefinition &other)
Definition: qgsprocessingparameters.h:174
QgsProcessingParameterFeatureSource
Definition: qgsprocessingparameters.h:2612
QgsProcessingOutputLayerDefinition
Definition: qgsprocessingparameters.h:199
QgsWkbTypes::Type
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:68
QgsProcessingParameterMapLayer
Definition: qgsprocessingparameters.h:2456
QgsProcessingParameterDefinition::isDynamic
bool isDynamic() const
Returns true if the parameter supports is dynamic, and can support data-defined values (i....
Definition: qgsprocessingparameters.h:605
QgsProcessingFeatureSourceDefinition::geometryCheck
QgsFeatureRequest::InvalidGeometryCheck geometryCheck
Geometry check method to apply to this source.
Definition: qgsprocessingparameters.h:147
QgsProcessingParameterNumber::clone
QgsProcessingParameterDefinition * clone() const override
Creates a clone of the parameter definition.
Definition: qgsprocessingparameters.cpp:3360
QgsProcessingParameterDefinition::setDefaultValue
void setDefaultValue(const QVariant &value)
Sets the default value for the parameter.
Definition: qgsprocessingparameters.h:490
QgsProcessingUtils::LayerHint
LayerHint
Layer type hints.
Definition: qgsprocessingutils.h:136
QgsFeatureRequest::InvalidGeometryCheck
InvalidGeometryCheck
Handling of features with invalid geometries.
Definition: qgsfeaturerequest.h:112
QgsUnitTypes::DistanceUnit
DistanceUnit
Units of distance.
Definition: qgsunittypes.h:67
QgsProcessingParameterLayout::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3191
QgsProcessingParameterMultipleLayers
Definition: qgsprocessingparameters.h:1756
QgsProcessingDestinationParameter::toVariantMap
QVariantMap toVariantMap() const override
Saves this parameter to a QVariantMap.
Definition: qgsprocessingparameters.cpp:5523
QgsProcessingFeatureSourceDefinition::source
QgsProperty source
Source definition.
Definition: qgsprocessingparameters.h:117
operator!=
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition: qgsfeatureiterator.h:404
QgsRectangle
Definition: qgsrectangle.h:41
QgsProcessingParameterMeshLayer::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2437
QgsProcessingParameterDefinitions
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.
Definition: qgsprocessingparameters.h:732
QgsProcessingParameterCoordinateOperation::destinationCrs
QVariant destinationCrs() const
Returns the static destination CRS, or an invalid value if this is not set.
Definition: qgsprocessingparameters.h:3432
QgsProcessingParameterDatabaseTable::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3763
QgsProject
Definition: qgsproject.h:92
QgsProcessingParameterNumber::dataType
Type dataType() const
Returns the acceptable data type for the parameter.
Definition: qgsprocessingparameters.cpp:3460
QgsProcessingParameterBand::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3118
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsProcessingParameterAuthConfig
Definition: qgsprocessingparameters.h:2262
QgsProcessingParameterColor
Definition: qgsprocessingparameters.h:3290
QgsProcessingParameterFeatureSink::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2789
QgsProcessingParameterDatabaseTable
Definition: qgsprocessingparameters.h:3740
QgsProcessingDestinationParameter::setSupportsNonFileBasedOutput
void setSupportsNonFileBasedOutput(bool supportsNonFileBasedOutput)
Sets whether the destination parameter supports non filed-based outputs, such as memory layers or dir...
Definition: qgsprocessingparameters.h:2689
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QgsProcessingParameterFeatureSink
Definition: qgsprocessingparameters.h:2773
QgsProcessingDestinationParameter
Definition: qgsprocessingparameters.h:2652
QgsProcessingOutputDefinition
Definition: qgsprocessingoutputs.h:41
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:172
QgsProcessingFeatureSourceDefinition
Definition: qgsprocessingparameters.h:55
QgsFeatureRequest
Definition: qgsfeaturerequest.h:75
QgsProcessingDestinationParameter::fromVariantMap
bool fromVariantMap(const QVariantMap &map) override
Restores this parameter to a QVariantMap.
Definition: qgsprocessingparameters.cpp:5531
QgsProcessingParameterColor::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3306
QgsProcessingParameterScale
Definition: qgsprocessingparameters.h:2014
QgsProcessingParameterRange
Definition: qgsprocessingparameters.h:2048
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsProcessingParameterRange::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2063
QgsPrintLayout
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Definition: qgsprintlayout.h:30
QgsProcessingParameterCoordinateOperation::destinationCrsParameterName
QString destinationCrsParameterName() const
Returns the name of the destination CRS parameter, or an empty string if this is not set.
Definition: qgsprocessingparameters.h:3404
SIP_THROW
#define SIP_THROW(name)
Definition: qgis_sip.h:184
QgsProcessing::PythonQgsProcessingAlgorithmSubclass
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
Definition: qgsprocessing.h:60
QgsProcessingParameterDefinition::fromVariantMap
virtual bool fromVariantMap(const QVariantMap &map)
Restores this parameter to a QVariantMap.
Definition: qgsprocessingparameters.cpp:2188
QgsProcessingParameterDistance::setDefaultUnit
void setDefaultUnit(QgsUnitTypes::DistanceUnit unit)
Sets the default distance unit for the parameter.
Definition: qgsprocessingparameters.h:1992
QgsProcessingParameterAuthConfig::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2275
QgsProcessingParameterMeshLayer
Definition: qgsprocessingparameters.h:2422
QgsProcessingFeatureSourceDefinition::QgsProcessingFeatureSourceDefinition
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.
Definition: qgsprocessingparameters.h:105
QgsProcessingParameterDateTime::DateTime
@ DateTime
Datetime values.
Definition: qgsprocessingparameters.h:3510
QgsProcessingParameterCrs
Definition: qgsprocessingparameters.h:1470
QgsProcessingParameterRasterLayer::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2114
QgsProcessingParameterPoint::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1548
QgsProcessingParameterDefinition::mFlags
Flags mFlags
Parameter flags.
Definition: qgsprocessingparameters.h:704
QgsProcessingParameterFile::setBehavior
void setBehavior(Behavior behavior)
Sets the parameter behavior (e.g.
Definition: qgsprocessingparameters.h:1608
QgsProcessingParameterExtent::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1515
QgsProcessingParameterDefinition::setName
void setName(const QString &name)
Sets the name of the parameter.
Definition: qgsprocessingparameters.h:463
QgsFileFilterGenerator
Definition: qgsfilefiltergenerator.h:33
QgsProcessingContext
Definition: qgsprocessingcontext.h:43
QgsProcessingParameterDefinition::toolTip
virtual QString toolTip() const
Returns a formatted tooltip for use with the parameter, which gives helpful information like paramete...
Definition: qgsprocessingparameters.cpp:2208
QgsProcessingParameterDefinition::mDescription
QString mDescription
Parameter description.
Definition: qgsprocessingparameters.h:698
QgsProcessingParameterFileDestination
Definition: qgsprocessingparameters.h:3005
QgsProcessingParameterFile::extension
QString extension() const
Returns any specified file extension for the parameter.
Definition: qgsprocessingparameters.h:1617
QgsMeshLayer
Definition: qgsmeshlayer.h:94
QgsProcessingParameterDefinition::name
QString name() const
Returns the name of the parameter.
Definition: qgsprocessingparameters.h:456
QgsProcessingParameterField::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2521
QgsProcessingParameterDefinition::setMetadata
void setMetadata(const QVariantMap &metadata)
Sets the parameter's freeform metadata.
Definition: qgsprocessingparameters.h:570
QgsProcessingParameterLayoutItem
Definition: qgsprocessingparameters.h:3216
QgsProcessingOutputLayerDefinition::remappingDefinition
QgsRemappingSinkDefinition remappingDefinition() const
Returns the output remapping definition, if useRemapping() is true.
Definition: qgsprocessingparameters.h:263
QgsProcessing::TypeVectorAnyGeometry
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Definition: qgsprocessing.h:47
QgsProcessingParameterString
Definition: qgsprocessingparameters.h:2202
QgsProcessingParameterDefinition::setDescription
void setDescription(const QString &description)
Sets the description for the parameter.
Definition: qgsprocessingparameters.h:477
QgsProcessingParameterExtent
Definition: qgsprocessingparameters.h:1502
QgsProcessingParameterCoordinateOperation::setDestinationCrsParameterName
void setDestinationCrsParameterName(const QString &name)
Sets the name of the destination CRS parameter.
Definition: qgsprocessingparameters.h:3411
QgsProcessingParameterDefinition::metadata
QVariantMap & metadata()
Returns the parameter's freeform metadata.
Definition: qgsprocessingparameters.h:563
QgsProcessingParameterString::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2216
qgsfeaturesource.h
QgsProcessingParameterEnum::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2149
QgsProcessingParameterDefinition::mDynamicLayerParameterName
QString mDynamicLayerParameterName
Linked vector layer parameter name for dynamic properties.
Definition: qgsprocessingparameters.h:719
QgsProcessingParameterDefinition::dynamicLayerParameterName
QString dynamicLayerParameterName() const
Returns the name of the parameter for a layer linked to a dynamic parameter, or an empty string if th...
Definition: qgsprocessingparameters.h:643
QgsUnitTypes
Helper functions for various unit types.
Definition: qgsunittypes.h:38
QgsProcessingParameterProviderConnection::providerId
QString providerId() const
Returns the ID of the provider associated with the connections.
Definition: qgsprocessingparameters.h:3649
QgsProcessingOutputLayerDefinition::QgsProcessingOutputLayerDefinition
QgsProcessingOutputLayerDefinition(const QgsProperty &sink, QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer.
Definition: qgsprocessingparameters.h:218
QgsProcessingParameterRasterLayer
Definition: qgsprocessingparameters.h:2101
QgsPropertyDefinition
Definition for a property.
Definition: qgsproperty.h:47
QgsProcessing
Definition: qgsprocessing.h:38
QgsProcessingParameterProviderConnection
Definition: qgsprocessingparameters.h:3619
QgsProcessingParameterFile
Definition: qgsprocessingparameters.h:1567
typeName
const QString & typeName
Definition: qgswfsgetfeature.cpp:109
QgsProcessingParameterNumber::asPythonString
QString asPythonString(QgsProcessing::PythonOutputType outputType=QgsProcessing::PythonQgsProcessingAlgorithmSubclass) const override
Returns the parameter definition as a Python command which can be used within a Python Processing scr...
Definition: qgsprocessingparameters.cpp:3416
QgsProcessingParameterVectorLayer
Definition: qgsprocessingparameters.h:2382
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition: qgslayoutitem.h:112
QgsProcessingParameterFeatureSource::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2626
QgsRasterLayer
Definition: qgsrasterlayer.h:72
QgsProcessingParameterFolderDestination::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3083
QgsProcessingParameterNumber::Integer
@ Integer
Integer values.
Definition: qgsprocessingparameters.h:1845
QgsProcessingParameterDateTime::Time
@ Time
Time values.
Definition: qgsprocessingparameters.h:3512
QgsCoordinateReferenceSystem
Definition: qgscoordinatereferencesystem.h:206
QgsProcessingParameterLayout
Definition: qgsprocessingparameters.h:3178
QgsProcessingParameterVectorDestination
Definition: qgsprocessingparameters.h:2871
QgsProcessingParameterDatabaseSchema
Definition: qgsprocessingparameters.h:3678
QgsProcessingParameterDistance
Definition: qgsprocessingparameters.h:1941
QgsProcessingParameterPoint
Definition: qgsprocessingparameters.h:1535
QgsFileFilterGenerator::createFileFilter
virtual QString createFileFilter() const =0
This method needs to be reimplemented in all classes which implement this interface and return a file...
QgsPointXY
Definition: qgspointxy.h:43
QgsProcessingParameterCoordinateOperation::setSourceCrs
void setSourceCrs(const QVariant &crs)
Sets the static source crs.
Definition: qgsprocessingparameters.h:3425
QgsProcessingParameterFileDestination::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3024
qgsprocessingutils.h
QgsProcessingParameterDefinition::mName
QString mName
Parameter name.
Definition: qgsprocessingparameters.h:695
QgsProcessingFeatureSourceDefinition::featureLimit
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...
Definition: qgsprocessingparameters.h:130
QgsProcessingParameterBoolean
Definition: qgsprocessingparameters.h:1439
QgsProcessingOutputLayerDefinition::createOptions
QVariantMap createOptions
Map of optional sink/layer creation options, which are passed to the underlying provider when creatin...
Definition: qgsprocessingparameters.h:246
QgsProcessingParameterDefinition::mAdditionalExpressionVariables
QStringList mAdditionalExpressionVariables
Additional expression context variables exposed for use by this parameter.
Definition: qgsprocessingparameters.h:722
QgsProcessingDestinationParameter::supportsNonFileBasedOutput
bool supportsNonFileBasedOutput() const
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or ...
Definition: qgsprocessingparameters.h:2682
QgsProcessingParameterDefinition::dynamicPropertyDefinition
QgsPropertyDefinition dynamicPropertyDefinition() const
Returns the property definition for dynamic properties.
Definition: qgsprocessingparameters.h:622
QgsProcessingParameterDateTime
Definition: qgsprocessingparameters.h:3503
QgsProcessingAlgorithm
Definition: qgsprocessingalgorithm.h:51
QgsProcessingParameterFieldMapping::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameterfieldmap.h:60
qgsprocessing.h
QgsGeometry
Definition: qgsgeometry.h:122
QgsVectorLayer
Definition: qgsvectorlayer.h:385
QgsProcessingParameterExpression
Definition: qgsprocessingparameters.h:2294
QgsProcessingParameterExpression::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2308
QgsMapLayer
Definition: qgsmaplayer.h:81
QgsProcessingParameterMapTheme::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3473
QgsProcessingParameterDistance::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1958
QgsProcessingParameterCoordinateOperation::setSourceCrsParameterName
void setSourceCrsParameterName(const QString &name)
Sets the name of the source CRS parameter.
Definition: qgsprocessingparameters.h:3397
QgsProcessingParameterDefinition::asScriptCode
virtual QString asScriptCode() const
Returns the parameter definition encoded in a string which can be used within a Processing script.
Definition: qgsprocessingparameters.cpp:2142
QgsProcessingFeatureSource
Definition: qgsprocessingutils.h:468
QgsProcessingParameterMatrix::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1685
QgsProcessingParameters
Definition: qgsprocessingparameters.h:752
QgsProcessingParameterDateTime::Type
Type
Datetime data type.
Definition: qgsprocessingparameters.h:3508
QgsProcessingParameterDefinition::asPythonString
virtual QString asPythonString(QgsProcessing::PythonOutputType outputType=QgsProcessing::PythonQgsProcessingAlgorithmSubclass) const
Returns the parameter definition as a Python command which can be used within a Python Processing scr...
Definition: qgsprocessingparameters.cpp:2152
QgsProcessingParameterBoolean::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1452
qgsproperty.h
QgsProcessingParameterBand
Definition: qgsprocessingparameters.h:3103
QgsProcessingParameterLimitedDataTypes::mDataTypes
QList< int > mDataTypes
List of acceptable data types for the parameter.
Definition: qgsprocessingparameters.h:2372
QgsProcessingDestinationParameter::asPythonString
QString asPythonString(QgsProcessing::PythonOutputType outputType=QgsProcessing::PythonQgsProcessingAlgorithmSubclass) const override
Returns the parameter definition as a Python command which can be used within a Python Processing scr...
Definition: qgsprocessingparameters.cpp:5539
QgsProcessingParameterNumber::toVariantMap
QVariantMap toVariantMap() const override
Saves this parameter to a QVariantMap.
Definition: qgsprocessingparameters.cpp:3470
QgsProcessingParameterDefinition::mDefault
QVariant mDefault
Default value for parameter.
Definition: qgsprocessingparameters.h:701
QgsProcessingParameterDefinition::setAdditionalExpressionContextVariables
void setAdditionalExpressionContextVariables(const QStringList &variables)
Sets a list of additional expression context variables which are available for use when evaluating th...
Definition: qgsprocessingparameters.h:690
QgsProcessingParameterDefinition::mPropertyDefinition
QgsPropertyDefinition mPropertyDefinition
Data defined property definition.
Definition: qgsprocessingparameters.h:716
QgsProcessingParameterDefinition::isDestination
virtual bool isDestination() const
Returns true if this parameter represents a file or layer destination, e.g.
Definition: qgsprocessingparameters.h:449
QgsProcessingParameterDefinition::clone
virtual QgsProcessingParameterDefinition * clone() const =0
Creates a clone of the parameter definition.
QgsProcessingFeatureSourceDefinition::Flag
Flag
Flags which control source behavior.
Definition: qgsprocessingparameters.h:63
QgsProcessingParameterDefinition::setDynamicLayerParameterName
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...
Definition: qgsprocessingparameters.h:656
qgsremappingproxyfeaturesink.h
QgsProcessingParameterVectorLayer::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2398
QgsProcessingParameterScale::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2028
QgsProcessingParameterCoordinateOperation::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3369
QgsProcessingParameterNumber::checkValueIsAcceptable
bool checkValueIsAcceptable(const QVariant &input, QgsProcessingContext *context=nullptr) const override
Checks whether the specified input value is acceptable for the parameter.
Definition: qgsprocessingparameters.cpp:3365
QgsProcessingParameterDefinition::provider
QgsProcessingProvider * provider() const
Returns a pointer to the provider for the algorithm which owns this parameter.
Definition: qgsprocessingparameters.cpp:2203
QgsProcessingParameterEnum
Definition: qgsprocessingparameters.h:2134
QgsProcessingFeatureSourceDefinition::operator==
bool operator==(const QgsProcessingFeatureSourceDefinition &other)
Definition: qgsprocessingparameters.h:165
QgsProcessingOutputLayerDefinition::sink
QgsProperty sink
Sink/layer definition.
Definition: qgsprocessingparameters.h:226
QgsProcessingOutputLayerDefinition::destinationName
QString destinationName
Name to use for sink if it's to be loaded into a destination project.
Definition: qgsprocessingparameters.h:238
QgsProcessingParameterCoordinateOperation
Definition: qgsprocessingparameters.h:3354
QgsProcessingParameterDefinition::defaultValue
QVariant defaultValue() const
Returns the default value for the parameter.
Definition: qgsprocessingparameters.h:483
QgsProcessingOutputLayerDefinition::QgsProcessingOutputLayerDefinition
QgsProcessingOutputLayerDefinition(const QString &sink=QString(), QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string.
Definition: qgsprocessingparameters.h:208
QgsProcessingParameterNumber::Type
Type
Numeric data type.
Definition: qgsprocessingparameters.h:1843
QgsProcessing::PythonOutputType
PythonOutputType
Available Python output types.
Definition: qgsprocessing.h:58
QgsProcessingParameterDefinition::Flag
Flag
Parameter flags.
Definition: qgsprocessingparameters.h:417
QgsProcessingParameterFile::behavior
Behavior behavior() const
Returns the parameter behavior (e.g.
Definition: qgsprocessingparameters.h:1602
QgsProcessingParameterCoordinateOperation::setDestinationCrs
void setDestinationCrs(const QVariant &crs)
Sets the static destination crs.
Definition: qgsprocessingparameters.h:3439
QgsProcessingParameterDefinition::dependsOnOtherParameters
virtual QStringList dependsOnOtherParameters() const
Returns a list of other parameter names on which this parameter is dependent (e.g.
Definition: qgsprocessingparameters.h:576
SIP_END
#define SIP_END
Definition: qgis_sip.h:189
QgsProcessingParameterDefinition::checkValueIsAcceptable
virtual bool checkValueIsAcceptable(const QVariant &input, QgsProcessingContext *context=nullptr) const
Checks whether the specified input value is acceptable for the parameter.
Definition: qgsprocessingparameters.cpp:2119
qgscoordinatereferencesystem.h
QgsProcessingParameterNumber::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1863
QgsProcessing::SourceType
SourceType
Data source types enum.
Definition: qgsprocessing.h:44
QgsProcessingParameterCoordinateOperation::sourceCrs
QVariant sourceCrs() const
Returns the static source CRS, or an invalid value if this is not set.
Definition: qgsprocessingparameters.h:3418
QgsProcessingParameterDateTime::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3529
QgsProcessingException
Definition: qgsexception.h:82
QgsProcessingParameterField
Definition: qgsprocessingparameters.h:2495
QgsProcessingParameterCrs::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:1483
QgsProcessingOutputLayerDefinition::useRemapping
bool useRemapping() const
Returns true if the output uses a remapping definition.
Definition: qgsprocessingparameters.h:254
QgsFeatureSink
Definition: qgsfeaturesink.h:33
QgsProcessingParameterDateTime::Date
@ Date
Date values.
Definition: qgsprocessingparameters.h:3511
QgsProcessingParameterNumber::fromScriptCode
static QgsProcessingParameterNumber * fromScriptCode(const QString &name, const QString &description, bool isOptional, const QString &definition)
Creates a new parameter using the definition from a script code.
Definition: qgsprocessingparameters.cpp:3488
QgsProcessingParameterProviderConnection::setProviderId
void setProviderId(const QString &provider)
Sets the ID of the provider associated with the connections.
Definition: qgsprocessingparameters.h:3655
QgsProcessingParameterMapLayer::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:2470
QgsProcessingParameterFile::Behavior
Behavior
Parameter behavior.
Definition: qgsprocessingparameters.h:1572
QgsProcessingParameterDatabaseSchema::typeName
static QString typeName()
Returns the type name for the parameter class.
Definition: qgsprocessingparameters.h:3696
QgsProcessingUtils::LayerHint::UnknownType
@ UnknownType
Unknown layer type.
QgsProcessingParameterFolderDestination
Definition: qgsprocessingparameters.h:3068
QgsProcessingParameterDefinition::setFlags
void setFlags(Flags flags)
Sets the flags associated with the parameter.
Definition: qgsprocessingparameters.h:502
QgsProcessingParameterNumber::valueAsPythonString
QString valueAsPythonString(const QVariant &value, QgsProcessingContext &context) const override
Returns a string version of the parameter input value, which is suitable for use as an input paramete...
Definition: qgsprocessingparameters.cpp:3389