Class: QgsOptionalQgsExpressionBase¶
A container for other classes and adds an additional enabled/disabled flag.
Often it is used for configuration options which can be enabled or disabled but also have more internal configuration information that should not be lost when disabling and re-enabling.
Note
For Python you need to use implementations for specific template classes
Note
Not available in Python bindings (although SIP file is present for specific implementations).
Class Hierarchy¶
Subclasses¶
An expression with an additional enabled flag. |
Methods
Access the payload data |
|
Check if this optional is enabled |
|
Set the payload data |
|
Set if this optional is enabled |
- class qgis.core.QgsOptionalQgsExpressionBase¶
Bases:
object
- __init__()
A QgsOptional is disabled by default if default constructed.
- __init__(data: QgsExpression)
A QgsOptional is enabled by default if constructed with payload.
- Parameters:
data (QgsExpression)
- __init__(data: QgsExpression, enabled: bool)
A QgsOptional constructed with enabled status and data
- Parameters:
data (QgsExpression)
enabled (bool)
- __init__(a0: QgsOptionalQgsExpressionBase)
- Parameters:
- data(self) QgsExpression ¶
Access the payload data
- Return type:
- enabled(self) bool ¶
Check if this optional is enabled
- Return type:
bool
- setData(self, data: QgsExpression)¶
Set the payload data
- Parameters:
data (QgsExpression)
- setEnabled(self, enabled: bool)¶
Set if this optional is enabled
- Parameters:
enabled (bool)