Class: QgsFetchedContent¶
-
class
qgis.core.
QgsFetchedContent
(url: str, file: QTemporaryFile = None, status: QgsFetchedContent.ContentStatus = QgsFetchedContent.NotStarted)¶ Bases:
PyQt5.QtCore.QObject
Constructs a FetchedContent with pointer to the downloaded file and status of the download
FetchedContent holds useful information about a network content being fetched
See also
New in version 3.2: Enums
Methods
Cancel the download operation
Start the download
Returns the potential error of the download
Returns the path to the local file, an empty string if the file is not accessible yet.
Returns the status of the download
Signals
Emitted when the file is fetched and accessible [signal]
Attributes
-
class
ContentStatus
¶ Bases:
int
-
Downloading
= 1¶
-
Failed
= 3¶
-
Finished
= 2¶
-
NotStarted
= 0¶
-
cancel
(self)¶ Cancel the download operation
-
childEvent
()¶
-
connectNotify
()¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
download
(self, redownload: bool = False)¶ Start the download
- Parameters
redownload – if set to
True
, it will restart any achieved or pending download.
-
error
(self) → QNetworkReply.NetworkError¶ Returns the potential error of the download
-
fetched
¶ Emitted when the file is fetched and accessible [signal]
-
filePath
(self) → str¶ Returns the path to the local file, an empty string if the file is not accessible yet.
-
isSignalConnected
()¶
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
status
(self) → QgsFetchedContent.ContentStatus¶ Returns the status of the download
-
timerEvent
()¶
-
class