Class: QgsScopedExpressionFunction

Expression function for use within a QgsExpressionContextScope.

This differs from a standard QgsExpression.Function in that it requires an implemented clone() method.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: clone()

Class Hierarchy

Inheritance diagram of qgis.core.QgsScopedExpressionFunction

Base classes

QgsExpressionFunction

An abstract base class for defining QgsExpression functions.

Abstract Methods

clone

Returns a clone of the function.

class qgis.core.QgsScopedExpressionFunction[source]

Bases: QgsExpressionFunction

__init__(fnname: str | None, params: int, group: str | None, helpText: str | None = '', usesGeometry: bool = False, referencedColumns: Iterable[str | None] = set(), lazyEval: bool = False, handlesNull: bool = False, isContextual: bool = True)

Create a new QgsScopedExpressionFunction

Parameters:
  • fnname (Optional[str])

  • params (int)

  • group (Optional[str])

  • helpText (Optional[str] = '')

  • usesGeometry (bool = False)

  • referencedColumns (Iterable[Optional[str]] = set())

  • lazyEval (bool = False)

  • handlesNull (bool = False)

  • isContextual (bool = True)

__init__(fnname: str | None, params: Iterable[QgsExpressionFunction.Parameter], group: str | None, helpText: str | None = '', usesGeometry: bool = False, referencedColumns: Iterable[str | None] = set(), lazyEval: bool = False, handlesNull: bool = False, isContextual: bool = True)

Create a new QgsScopedExpressionFunction using named parameters.

Parameters:
  • fnname (Optional[str])

  • params (Iterable[QgsExpressionFunction.Parameter])

  • group (Optional[str])

  • helpText (Optional[str] = '')

  • usesGeometry (bool = False)

  • referencedColumns (Iterable[Optional[str]] = set())

  • lazyEval (bool = False)

  • handlesNull (bool = False)

  • isContextual (bool = True)

__init__(a0: QgsScopedExpressionFunction)
Parameters:

a0 (QgsScopedExpressionFunction)

abstract clone(self) QgsScopedExpressionFunction | None[source]

Returns a clone of the function.

Return type:

Optional[QgsScopedExpressionFunction]