Class: QgsProcessingParameterFile¶
-
class
qgis.core.
QgsProcessingParameterFile
(name: str, description: str = '', behavior: QgsProcessingParameterFile.Behavior = QgsProcessingParameterFile.File, extension: str = '', defaultValue: Any = None, optional: bool = False)¶ Bases:
qgis._core.QgsProcessingParameterDefinition
Constructor for QgsProcessingParameterFile.
QgsProcessingParameterFile(QgsProcessingParameterFile)
An input file or folder parameter for processing algorithms.
New in version 3.0: Enums
Methods
Returns the parameter behavior (e.g.
Returns any specified file extension for the parameter.
Creates a new parameter using the definition from a script code.
Sets the parameter
behavior
(e.g.Sets a file
extension
for the parameter.Returns the type name for the parameter class.
Signals
Attributes
-
class
Behavior
¶ Bases:
int
-
File
= 0¶
-
Folder
= 1¶
-
asPythonString
(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) → str¶
-
asScriptCode
(self) → str¶
-
behavior
(self) → QgsProcessingParameterFile.Behavior¶ Returns the parameter behavior (e.g. File or Folder).
See also
-
checkValueIsAcceptable
(self, input: Any, context: QgsProcessingContext = None) → bool¶
-
clone
(self) → QgsProcessingParameterDefinition¶
-
extension
(self) → str¶ Returns any specified file extension for the parameter.
See also
-
fromScriptCode
(name: str, description: str, isOptional: bool, definition: str, behavior: QgsProcessingParameterFile.Behavior = QgsProcessingParameterFile.File) → QgsProcessingParameterFile¶ Creates a new parameter using the definition from a script code.
-
fromVariantMap
(self, map: Dict[str, Any]) → bool¶
-
setBehavior
(self, behavior: QgsProcessingParameterFile.Behavior)¶ Sets the parameter
behavior
(e.g. File or Folder).See also
-
setExtension
(self, extension: str)¶ Sets a file
extension
for the parameter.See also
-
toVariantMap
(self) → Dict[str, Any]¶
-
type
(self) → str¶
-
typeName
() → str¶ Returns the type name for the parameter class.
-
class