QgsProcessingParameterFolderDestination class

A folder destination parameter, for specifying the destination path for a folder created by the algorithm or used for creating new files within the algorithm.

A folder output parameter.

Base classes

class QgsProcessingDestinationParameter
Base class for all parameter definitions which represent file or layer destinations, e.g.

Public static functions

static auto fromScriptCode(const QString& name, const QString& description, bool isOptional, const QString& definition) -> QgsProcessingParameterFolderDestination*
Creates a new parameter using the definition from a script code.
static auto typeName() -> QString
Returns the type name for the parameter class.

Constructors, destructors, conversion operators

QgsProcessingParameterFolderDestination(const QString& name, const QString& description = QString(), const QVariant& defaultValue = QVariant(), bool optional = false)
Constructor for QgsProcessingParameterFolderDestination.

Public functions

auto checkValueIsAcceptable(const QVariant& input, QgsProcessingContext* context = nullptr) const -> bool override
Checks whether the specified input value is acceptable for the parameter.
auto clone() const -> QgsProcessingParameterDefinition* override
Creates a clone of the parameter definition.
auto defaultFileExtension() const -> QString override
Returns the default file extension for destination file paths associated with this parameter.
auto toOutputDefinition() const -> QgsProcessingOutputDefinition* override
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parameter.
auto type() const -> QString override
Unique parameter type name.

Function documentation

bool QgsProcessingParameterFolderDestination::checkValueIsAcceptable(const QVariant& input, QgsProcessingContext* context = nullptr) const override

Checks whether the specified input value is acceptable for the parameter.

Returns true if the value can be accepted. The optional context parameter can be specified to allow a more stringent check to be performed, capable of checking for the presence of required layers and other factors within the context.