Class: QgsExpressionNodeUnaryOperator¶
A unary node is either negative as in boolean (not) or as in numbers (minus).
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Abstract base class for all nodes that can appear in an expression. |
Enums
Methods
Returns the unary operator. |
|
Returns the node the operator will operate upon. |
|
Returns a the name of this operator without the operands. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsExpressionNodeUnaryOperator. See the FAQ for more details.
- class qgis.core.QgsExpressionNodeUnaryOperator[source]¶
Bases:
QgsExpressionNode- __init__(op: QgsExpressionNodeUnaryOperator.UnaryOperator, operand: QgsExpressionNode | None)
A node unary operator is modifying the value of
operandby negating it withop.- Parameters:
operand (Optional[QgsExpressionNode])
- virtual evalNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) Any[source]¶
- Parameters:
parent (Optional[QgsExpression])
context (Optional[QgsExpressionContext])
- Return type:
- op(self) QgsExpressionNodeUnaryOperator.UnaryOperator[source]¶
Returns the unary operator.
- Return type:
- operand(self) QgsExpressionNode | None[source]¶
Returns the node the operator will operate upon.
- Return type:
- virtual prepareNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) bool[source]¶
- Parameters:
parent (Optional[QgsExpression])
context (Optional[QgsExpressionContext])
- Return type:
bool
- text(self) str[source]¶
Returns a the name of this operator without the operands. I.e. “NOT” or “-”
- Return type:
str
- uoMinus = 1¶
- uoNot = 0¶