Class: QgsImageFetcher

Handles asynchronous download of images.

Note

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

The following methods must be implemented: start()

Class Hierarchy

Inheritance diagram of qgis.core.QgsImageFetcher

Base classes

QObject

Abstract Methods

start

Starts the image download

Signals

error

Emitted when an error occurs

finish

Emitted when the download completes

progress

Emitted to report progress

class qgis.core.QgsImageFetcher[source]

Bases: QObject

__init__(parent: QObject | None = None)

Constructor

Parameters:

parent (Optional[QObject] = None)

signal error(msg: str)[source]

Emitted when an error occurs

Parameters:

msg (str)

signal finish(legend: QImage)[source]

Emitted when the download completes

Parameters:

legend (QImage) – The downloaded legend image

signal progress(received: int, total: int)[source]

Emitted to report progress

Parameters:
  • received (int)

  • total (int)

abstract start(self)[source]

Starts the image download

Note

Make sure to connect to “finish” and “error” before starting