Class: QgsVbScriptIfStatement

Represents an if statement.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsVbScriptIfStatement

Base classes

QgsVbScriptStatement

Base class for statement nodes in a VBScript script.

QgsVbScriptNode

Represents an abstract node for a VBScript script.

Constructor

__init__

Abstract Methods

clone

Methods

condition

Returns the condition expression.

falseBlock

Returns the statement block executed when the condition evaluates to False, or None if none.

isInline

Returns True if this statement was declared as a single-line inline If.

trueBlock

Returns the statement block executed when the condition evaluates to True.

class qgis.core.QgsVbScriptIfStatement[source]

Bases: QgsVbScriptStatement

__init__(condition: QgsVbScriptExpression | None, trueBlock: QgsVbScriptBlockStatement | None, falseBlock: QgsVbScriptBlockStatement | None = None, isInline: bool = False)

Constructor for QgsVbScriptIfStatement.

Ownership of condition, trueBlock, and falseBlock is transferred to this statement.

Parameters:
abstract clone(self) → QgsVbScriptNode | None[source]
Return type:

QgsVbScriptNode|None

condition(self) → QgsVbScriptExpression | None[source]

Returns the condition expression.

Return type:

QgsVbScriptExpression|None

falseBlock(self) → QgsVbScriptBlockStatement | None[source]

Returns the statement block executed when the condition evaluates to False, or None if none.

Return type:

QgsVbScriptBlockStatement|None

isInline(self) → bool[source]

Returns True if this statement was declared as a single-line inline If.

Return type:

bool

trueBlock(self) → QgsVbScriptBlockStatement | None[source]

Returns the statement block executed when the condition evaluates to True.

Return type:

QgsVbScriptBlockStatement|None