Class: QgsProcessingParameterFileDestination¶
-
class
qgis.core.
QgsProcessingParameterFileDestination
(name: str, description: str = '', fileFilter: str = '', defaultValue: Any = None, optional: bool = False, createByDefault: bool = True)¶ Bases:
QgsProcessingDestinationParameter
Constructor for QgsProcessingParameterFileDestination.
If
createByDefault
is false and the parameter isoptional
, then this destination output will not be created by default.QgsProcessingParameterFileDestination(
QgsProcessingParameterFileDestination
)A generic file based destination parameter, for specifying the destination path for a file (non-map layer) created by the algorithm.
New in version 3.0.
- Parameters
name (str) –
description (str = '') –
fileFilter (str = '') –
defaultValue (Any = None) –
optional (bool = False) –
createByDefault –
-
checkValueIsAcceptable
(self, input: Any, context: QgsProcessingContext = None) → bool¶ - Parameters
input (Any) –
context (
QgsProcessingContext
= None) –
- Return type
bool
-
clone
(self) → QgsProcessingParameterDefinition¶ - Return type
-
defaultFileExtension
(self) → str¶ - Return type
str
-
fileFilter
(self) → str¶ Returns the file filter string for file destinations compatible with this parameter.
See also
- Return type
str
-
fromScriptCode
(name: str, description: str, isOptional: bool, definition: str) → QgsProcessingParameterFileDestination¶ Creates a new parameter using the definition from a script code.
- Parameters
name (str) –
description (str) –
isOptional (bool) –
definition (str) –
- Return type
-
fromVariantMap
(self, map: Dict[str, Any]) → bool¶ - Parameters
map (Dict[str) –
- Return type
bool
-
originalProvider
()¶
-
setFileFilter
(self, filter: str)¶ Sets the file
filter
string for file destinations compatible with this parameter.See also
- Parameters
filter (str) –
-
toOutputDefinition
(self) → QgsProcessingOutputDefinition¶ - Return type
-
toVariantMap
(self) → Dict[str, Any]¶ - Return type
Dict[str, Any]
-
type
(self) → str¶ - Return type
str
-
typeName
() → str¶ Returns the type name for the parameter class.
- Return type
str
-
valueAsPythonString
(self, value: Any, context: QgsProcessingContext) → str¶ - Parameters
value (Any) –
context (QgsProcessingContext) –
- Return type
str