Class: QgsRasterBlockFeedback

Feedback object tailored for raster block reading.

Class Hierarchy

Inheritance diagram of qgis.core.QgsRasterBlockFeedback

Base classes

QgsFeedback

Base class for feedback objects to be used for cancellation of something running in a worker thread.

QObject

Methods

appendError

Appends an error message to the stored list of errors.

errors

Returns a list of any errors encountered while retrieving the raster block.

isPreviewOnly

Whether the raster provider should return only data that are already available without waiting for full result.

renderContext

Returns the render context of the associated block reading

renderPartialOutput

Whether our painter is drawing to a temporary image used just by this layer

setPreviewOnly

set flag whether the block request is for preview purposes only

setRenderContext

Sets the render context of the associated block reading

setRenderPartialOutput

Set whether our painter is drawing to a temporary image used just by this layer

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsRasterBlockFeedback. See the FAQ for more details.

onNewData

May be emitted by raster data provider to indicate that some partial data are available and a new preview image may be produced

class qgis.core.QgsRasterBlockFeedback[source]

Bases: QgsFeedback

__init__(parent: QObject | None = None)

Construct a new raster block feedback object

Parameters:

parent (Optional[QObject] = None)

appendError(self, error: str | None)[source]

Appends an error message to the stored list of errors. Should be called whenever an error is encountered while retrieving a raster block.

See also

errors()

Added in version 3.8.0.

Parameters:

error (Optional[str])

errors(self) List[str][source]

Returns a list of any errors encountered while retrieving the raster block.

See also

appendError()

Added in version 3.8.0.

Return type:

List[str]

isPreviewOnly(self) bool[source]

Whether the raster provider should return only data that are already available without waiting for full result. By default this flag is not enabled.

See also

setPreviewOnly()

Return type:

bool

virtual onNewData(self)[source]

May be emitted by raster data provider to indicate that some partial data are available and a new preview image may be produced

renderContext(self) QgsRenderContext[source]

Returns the render context of the associated block reading

Added in version 3.24.0.

Return type:

QgsRenderContext

renderPartialOutput(self) bool[source]

Whether our painter is drawing to a temporary image used just by this layer

Return type:

bool

setPreviewOnly(self, preview: bool)[source]

set flag whether the block request is for preview purposes only

See also

isPreviewOnly()

Parameters:

preview (bool)

setRenderContext(self, renderContext: QgsRenderContext)[source]

Sets the render context of the associated block reading

See also

renderContext()

Added in version 3.24.0.

Parameters:

renderContext (QgsRenderContext)

setRenderPartialOutput(self, enable: bool)[source]

Set whether our painter is drawing to a temporary image used just by this layer

Parameters:

enable (bool)