Skip to content
Permalink
Browse files

Add QgsProcessingAlgorithm::parameterAsBoolean

For consistency

Alias to QgsProcessingAlgorithm::parameterAsBool(), because the parameter class is called
QgsProcessingParameterBoolean
  • Loading branch information
m-kuhn committed Apr 12, 2019
1 parent a0a8e49 commit d0e24e8bc41845b6b956a5fd53ed3f392959b2e0
@@ -612,6 +612,13 @@ Evaluates the parameter with matching ``name`` to list of enum values.
bool parameterAsBool( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
%Docstring
Evaluates the parameter with matching ``name`` to a static boolean value.
%End

bool parameterAsBoolean( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
%Docstring
Evaluates the parameter with matching ``name`` to a static boolean value.

.. versionadded:: 3.8
%End

QgsFeatureSink *parameterAsSink( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context, QString &destinationIdentifier /Out/,
@@ -592,6 +592,11 @@ bool QgsProcessingAlgorithm::parameterAsBool( const QVariantMap &parameters, con
return QgsProcessingParameters::parameterAsBool( parameterDefinition( name ), parameters, context );
}

bool QgsProcessingAlgorithm::parameterAsBoolean( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const
{
return QgsProcessingParameters::parameterAsBool( parameterDefinition( name ), parameters, context );
}

QgsFeatureSink *QgsProcessingAlgorithm::parameterAsSink( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context, QString &destinationIdentifier, const QgsFields &fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem &crs, QgsFeatureSink::SinkFlags sinkFlags ) const
{
return QgsProcessingParameters::parameterAsSink( parameterDefinition( name ), parameters, fields, geometryType, crs, context, destinationIdentifier, sinkFlags );
@@ -609,6 +609,12 @@ class CORE_EXPORT QgsProcessingAlgorithm
*/
bool parameterAsBool( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;

/**
* Evaluates the parameter with matching \a name to a static boolean value.
* \since QGIS 3.8
*/
bool parameterAsBoolean( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;

/**
* Evaluates the parameter with matching \a name to a feature sink.
*

0 comments on commit d0e24e8

Please sign in to comment.
You can’t perform that action at this time.