Class: QgsAbstractLayoutIterator

class qgis.core.QgsAbstractLayoutIterator

Bases: sip.wrapper

An abstract base class for QgsLayout based classes which can be exported by QgsLayoutExporter.

Methods

beginRender

Called when rendering begins, before iteration commences.

count

Returns the number of features to iterate over.

endRender

Ends the render, performing any required cleanup tasks.

filePath

Returns the file path for the current feature, based on a specified base file path and extension.

layout

Returns the layout associated with the iterator.

next

Iterates to next feature, returning False if no more features exist to iterate over.

beginRender(self) bool

Called when rendering begins, before iteration commences. Returns True if successful, False if no iteration is available or required.

See also

endRender()

Return type:

bool

count(self) int

Returns the number of features to iterate over.

Return type:

int

endRender(self) bool

Ends the render, performing any required cleanup tasks.

Return type:

bool

filePath(self, baseFilePath: str, extension: str) str

Returns the file path for the current feature, based on a specified base file path and extension.

Parameters:
  • baseFilePath (str) –

  • extension (str) –

Return type:

str

layout(self) QgsLayout

Returns the layout associated with the iterator.

Return type:

QgsLayout

next(self) bool

Iterates to next feature, returning False if no more features exist to iterate over.

Return type:

bool