Class: QgsImageFetcher

class qgis.core.QgsImageFetcher

Bases: PyQt5.QtCore.QObject

Handles asynchronous download of images

New in version 2.8.

QgsImageFetcher(parent: QObject = None) Constructor

Methods

childEvent

connectNotify

customEvent

disconnectNotify

isSignalConnected

receivers

sender

senderSignalIndex

start

Starts the image download

timerEvent

Signals

error

Emitted when an error occurs [signal]

finish

Emitted when the download completes

progress

Emitted to report progress [signal]

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
error

Emitted when an error occurs [signal]

Parameters

msg (str) –

finish

Emitted when the download completes

Parameters

legend (QImage) – The downloaded legend image [signal]

isSignalConnected(self, QMetaMethod) bool
progress

Emitted to report progress [signal]

Parameters
  • received (int) –

  • total (int) –

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
start(self)

Starts the image download

Note

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

timerEvent(self, QTimerEvent)