QGIS API Documentation
3.6.0-Noosa (5873452)
|
Registry for temporary fetched files. More...
#include <qgsnetworkcontentfetcherregistry.h>
Public Types | |
enum | FetchingMode { DownloadLater, DownloadImmediately } |
Enum to determine when the download should start. More... | |
Public Member Functions | |
QgsNetworkContentFetcherRegistry ()=default | |
Create the registry for temporary downloaded files. More... | |
~QgsNetworkContentFetcherRegistry () override | |
const QgsFetchedContent * | fetch (const QString &url, FetchingMode fetchingMode=DownloadLater) |
Initialize a download for the given URL. More... | |
QFile * | localFile (const QString &filePathOrUrl) |
Returns a QFile from a local file or to a temporary file previously fetched by the registry. More... | |
QString | localPath (const QString &filePathOrUrl) |
Returns the path to a local file or to a temporary file previously fetched by the registry. More... | |
Registry for temporary fetched files.
This provides a simple way of downloading and accessing remote files during QGIS application running.
Definition at line 126 of file qgsnetworkcontentfetcherregistry.h.
Enum to determine when the download should start.
Definition at line 131 of file qgsnetworkcontentfetcherregistry.h.
|
explicitdefault |
Create the registry for temporary downloaded files.
|
override |
Definition at line 23 of file qgsnetworkcontentfetcherregistry.cpp.
const QgsFetchedContent * QgsNetworkContentFetcherRegistry::fetch | ( | const QString & | url, |
FetchingMode | fetchingMode = DownloadLater |
||
) |
Initialize a download for the given URL.
url | the URL to be fetched |
fetchingMode | defines if the download will start immediately or shall be manually triggered |
Definition at line 33 of file qgsnetworkcontentfetcherregistry.cpp.
QFile * QgsNetworkContentFetcherRegistry::localFile | ( | const QString & | filePathOrUrl | ) |
Returns a QFile from a local file or to a temporary file previously fetched by the registry.
filePathOrUrl | can either be a local file path or a remote content which has previously been fetched |
Definition at line 52 of file qgsnetworkcontentfetcherregistry.cpp.
QString QgsNetworkContentFetcherRegistry::localPath | ( | const QString & | filePathOrUrl | ) |
Returns the path to a local file or to a temporary file previously fetched by the registry.
filePathOrUrl | can either be a local file path or a remote content which has previously been fetched |
Definition at line 83 of file qgsnetworkcontentfetcherregistry.cpp.