QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
|
A QObject derived base class for QgsAbstractContentCache. More...
#include <qgsabstractcontentcache.h>
Signals | |
void | remoteContentFetched (const QString &url) |
Emitted when the cache has finished retrieving content from a remote url. | |
Public Member Functions | |
QgsAbstractContentCacheBase (QObject *parent) | |
Constructor for QgsAbstractContentCacheBase, with the specified parent object. | |
Static Public Member Functions | |
static bool | isBase64Data (const QString &path) |
Returns true if path represents base64 encoded data. | |
static bool | parseBase64DataUrl (const QString &path, QString *mimeType=nullptr, QString *data=nullptr) |
Parses a path to determine if it represents a base 64 encoded HTML data URL, and if so, extracts the components of the URL. | |
Protected Slots | |
virtual void | onRemoteContentFetched (const QString &url, bool success) |
Triggered after remote content (i.e. | |
Protected Member Functions | |
virtual bool | checkReply (QNetworkReply *reply, const QString &path) const |
Runs additional checks on a network reply to ensure that the reply content is consistent with that required by the cache. | |
A QObject derived base class for QgsAbstractContentCache.
Required because template based class (such as QgsAbstractContentCache) cannot use the Q_OBJECT macro.
Definition at line 132 of file qgsabstractcontentcache.h.
QgsAbstractContentCacheBase::QgsAbstractContentCacheBase | ( | QObject * | parent | ) |
Constructor for QgsAbstractContentCacheBase, with the specified parent object.
Definition at line 36 of file qgsabstractcontentcache.cpp.
|
inlineprotectedvirtual |
Runs additional checks on a network reply to ensure that the reply content is consistent with that required by the cache.
Reimplemented in QgsSvgCache.
Definition at line 179 of file qgsabstractcontentcache.h.
|
static |
Returns true
if path represents base64 encoded data.
Definition at line 60 of file qgsabstractcontentcache.cpp.
|
protectedvirtualslot |
Triggered after remote content (i.e.
HTTP linked content at the given url) has been fetched.
The success argument will be true
if the content was successfully fetched, or false
if it was not fetched successfully.
Reimplemented in QgsAbstractContentCache< T >, QgsAbstractContentCache< QgsImageCacheEntry >, QgsAbstractContentCache< QgsSourceCacheEntry >, and QgsAbstractContentCache< QgsSvgCacheEntry >.
Definition at line 41 of file qgsabstractcontentcache.cpp.
|
static |
Parses a path to determine if it represents a base 64 encoded HTML data URL, and if so, extracts the components of the URL.
Data URLs are of the form data:[<mediatype>;]base64,<data>
.
path | path to test |
mimeType | will be set to the extracted mime type if the path is a data URL |
data | will be set to the extracted base64 data if the path is a data URL |
true
if path is a base 64 encoded data URLDefinition at line 46 of file qgsabstractcontentcache.cpp.
|
signal |
Emitted when the cache has finished retrieving content from a remote url.