QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
33 const QDomText exp = element.ownerDocument().createTextNode(
data().expression() );
34 element.setAttribute( QStringLiteral(
"enabled" ),
enabled() );
35 element.appendChild( exp );
40 setEnabled( element.attribute( QStringLiteral(
"enabled" ) ).toInt() );
QgsOptional is a container for other classes and adds an additional enabled/disabled flag.
bool enabled() const
Check if this optional is enabled.
QgsOptionalExpression()=default
Construct a default optional expression.
void readXml(const QDomElement &element)
Read the optional expression from the provided QDomElement.
void setData(const QgsExpression &data)
Set the payload data.
void setEnabled(bool enabled)
Set if this optional is enabled.
QgsExpression data() const
Access the payload data.
Class for parsing and evaluation of expressions (formerly called "search strings")....
void writeXml(QDomElement &element) const
Save the optional expression to the provided QDomElement.