Class: QgsExternalStorageContent

Base class for QgsExternalStorage stored and fetched content.

Added in version 3.22.

Class Hierarchy

Inheritance diagram of qgis.core.QgsExternalStorageContent

Base classes

QObject

Subclasses

QgsExternalStorageFetchedContent

Abstract base class for QgsExternalStorage fetched content.

QgsExternalStorageStoredContent

Abstract base class for QgsExternalStorage stored content.

Methods

errorString

Returns error textual description if an error occurred and status() returns Failed

reportError

Update content according to given errorMsg error message Inherited classes should call this method whenever they meet an error.

setStatus

Sets the external storage status

status

Returns content status

Virtual Methods

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

cancel

Cancels content fetching/storing

Signals

canceled

The signal is emitted when content fetching/storing has been canceled

errorOccurred

The signal is emitted when an error occurred.

progressChanged

The signal is emitted whenever content fetching/storing estimated progression value progress has changed.

class qgis.core.QgsExternalStorageContent[source]

Bases: QObject

virtual cancel(self)[source]

Cancels content fetching/storing

signal canceled[source]

The signal is emitted when content fetching/storing has been canceled

signal errorOccurred(errorString: str)[source]

The signal is emitted when an error occurred. errorString is a textual description of the error

Parameters:

errorString (str)

errorString(self) str

Returns error textual description if an error occurred and status() returns Failed

Return type:

str

signal progressChanged(progress: float)[source]

The signal is emitted whenever content fetching/storing estimated progression value progress has changed. progress value is between 0 and 100.

Parameters:

progress (float)

reportError(self, errorMsg: str | None)[source]

Update content according to given errorMsg error message Inherited classes should call this method whenever they meet an error.

Parameters:

errorMsg (Optional[str])

setStatus(self, status: Qgis.ContentStatus)[source]

Sets the external storage status

Parameters:

status (Qgis.ContentStatus)

status(self) Qgis.ContentStatus[source]

Returns content status

Return type:

Qgis.ContentStatus