Class: QgsExternalStorageFileWidget¶
The QgsExternalStorageFileWidget
class creates a widget for
selecting a file or a folder and stores it to a given external storage
backend if defined
Added in version 3.22.
Class Hierarchy¶
Base classes¶
The |
|
Methods
Add file widget specific scope to expression context |
|
Returns expression context used for storage url expression evaluation |
|
Returns external storage used to store selected file names, None if none have been defined. |
|
Returns message bar used to report messages |
|
Set expression context to be used when for storage URL expression evaluation |
|
Set messageBar to report messages |
|
Sets the authentication configuration ID to be used for the current external storage (if defined) |
|
Set storageType storage type unique identifier as defined in |
|
Set urlExpression expression, which once evaluated, provide the URL used to store selected documents. |
|
Returns the authentication configuration ID used for the current external storage (if defined) |
|
Returns storage type unique identifier as defined in |
|
Returns expression, which once evaluated, provide the URL used to store selected documents. |
|
Returns the original, unmodified expression string, which once evaluated, provide the URL used to store selected documents. |
Static Methods
Creates and Returns an expression context scope specific to |
- class qgis.gui.QgsExternalStorageFileWidget[source]¶
Bases:
QgsFileWidget
- __init__(parent: QWidget | None = None)
QgsExternalStorageFileWidget creates a widget for selecting a file or a folder.
- Parameters:
parent (Optional[QWidget] = None)
- static createFileWidgetScope() QgsExpressionContextScope | None [source]¶
Creates and Returns an expression context scope specific to
QgsExternalStorageFileWidget
It defines the variable containing the user selected file nameAdded in version 3.22.
- Return type:
Optional[QgsExpressionContextScope]
- expressionContext(self) QgsExpressionContext ¶
Returns expression context used for storage url expression evaluation
See also
Added in version 3.22.
- Return type:
- externalStorage(self) QgsExternalStorage | None [source]¶
Returns external storage used to store selected file names, None if none have been defined. If no external storage has been defined,
QgsExternalStorageFileWidget
will only update file path according to selected files.See also
Added in version 3.22.
- Return type:
Optional[QgsExternalStorage]
- messageBar(self) QgsMessageBar | None [source]¶
Returns message bar used to report messages
Added in version 3.22.
- Return type:
Optional[QgsMessageBar]
- setExpressionContext(self, context: QgsExpressionContext)[source]¶
Set expression context to be used when for storage URL expression evaluation
See also
Added in version 3.22.
- Parameters:
context (QgsExpressionContext)
- setMessageBar(self, messageBar: QgsMessageBar | None)[source]¶
Set
messageBar
to report messagesAdded in version 3.22.
- Parameters:
messageBar (Optional[QgsMessageBar])
- setStorageAuthConfigId(self, authCfg: str | None)[source]¶
Sets the authentication configuration ID to be used for the current external storage (if defined)
Added in version 3.22.
- Parameters:
authCfg (Optional[str])
- setStorageType(self, storageType: str | None)[source]¶
Set
storageType
storage type unique identifier as defined inQgsExternalStorageRegistry
or null QString if there is no storage defined. If no external storage has been defined,QgsExternalStorageFileWidget
will only update file path according to selected files.See also
Added in version 3.22.
- Parameters:
storageType (Optional[str])
- setStorageUrlExpression(self, urlExpression: str | None)[source]¶
Set
urlExpression
expression, which once evaluated, provide the URL used to store selected documents. This is used only if an external storage has been definedSee also
See also
Added in version 3.22.
- Parameters:
urlExpression (Optional[str])
- storageAuthConfigId(self) str ¶
Returns the authentication configuration ID used for the current external storage (if defined)
Added in version 3.22.
- Return type:
str
- storageType(self) str [source]¶
Returns storage type unique identifier as defined in
QgsExternalStorageRegistry
. Returns null QString if there is no storage defined, only file selection.See also
Added in version 3.22.
- Return type:
str
- storageUrlExpression(self) QgsExpression | None [source]¶
Returns expression, which once evaluated, provide the URL used to store selected documents. This is used only if an external storage has been defined. Returns null if no expression has been set.
See also
Added in version 3.22.
- Return type:
Optional[QgsExpression]
- storageUrlExpressionString(self) str [source]¶
Returns the original, unmodified expression string, which once evaluated, provide the URL used to store selected documents. This is used only if an external storage has been defined. Returns null if no expression has been set.
See also
Added in version 3.22.
- Return type:
str