Class: QgsNetworkContentFetcherRegistry¶
- class qgis.core.QgsNetworkContentFetcherRegistry¶
Bases:
PyQt5.QtCore.QObject
Create the registry for temporary downloaded files
Registry for temporary fetched files
This provides a simple way of downloading and accessing remote files during QGIS application running.
See also
New in version 3.2:
Methods
Initialize a download for the given URL
Returns the path to a local file or to a temporary file previously fetched by the registry
Attributes
- DownloadImmediately = 1¶
- DownloadLater = 0¶
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- fetch(self, url: str, fetchingMode: QgsNetworkContentFetcherRegistry.FetchingMode = QgsNetworkContentFetcherRegistry.DownloadLater) QgsFetchedContent ¶
Initialize a download for the given URL
- Parameters
url (str) – the URL to be fetched
fetchingMode (QgsNetworkContentFetcherRegistry.FetchingMode = QgsNetworkContentFetcherRegistry.DownloadLater) – defines if the download will start immediately or shall be manually triggered
Note
If the download starts immediately, it will not redownload any already fetched or currently fetching file.
- Return type
- isSignalConnected(self, QMetaMethod) bool ¶
- localPath(self, filePathOrUrl: str) str ¶
Returns the path to a local file or to a temporary file previously fetched by the registry
- Parameters
filePathOrUrl (str) – can either be a local file path or a remote content which has previously been fetched
- Return type
str
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶