Class: QgsOptionalExpression¶
An expression with an additional enabled flag.
This can be used for configuration options where an expression can be enabled or disabled but when disabled it shouldn’t lose it’s information for the case it gets re-enabled later on and a user shouldn’t be force to redo the configuration.
Class Hierarchy¶
Base classes¶
A container for other classes and adds an additional enabled/disabled flag. |
Methods
Read the optional expression from the provided QDomElement. |
|
Save the optional expression to the provided QDomElement. |
- class qgis.core.QgsOptionalExpression[source]¶
Bases:
QgsOptionalQgsExpressionBase
- __init__()
Construct a default optional expression. It will be disabled and with an empty expression.
- __init__(expression: QgsExpression)
Construct an optional expression with the provided expression. It will be enabled.
- Parameters:
expression (QgsExpression)
- __init__(expression: QgsExpression, enabled: bool)
Construct an optional expression with the provided expression and enabled state.
- Parameters:
expression (QgsExpression)
enabled (bool)
- __init__(a0: QgsOptionalExpression)
- Parameters: