QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | List of all members
QgsAbstractContentCacheBase Class Reference

A QObject derived base class for QgsAbstractContentCache. More...

#include <qgsabstractcontentcache.h>

Inheritance diagram for QgsAbstractContentCacheBase:
Inheritance graph
[legend]

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.
 

Detailed Description

A QObject derived base class for QgsAbstractContentCache.

Required because template based class (such as QgsAbstractContentCache) cannot use the Q_OBJECT macro.

Since
QGIS 3.6

Definition at line 132 of file qgsabstractcontentcache.h.

Constructor & Destructor Documentation

◆ QgsAbstractContentCacheBase()

QgsAbstractContentCacheBase::QgsAbstractContentCacheBase ( QObject *  parent)

Constructor for QgsAbstractContentCacheBase, with the specified parent object.

Definition at line 36 of file qgsabstractcontentcache.cpp.

Member Function Documentation

◆ checkReply()

virtual bool QgsAbstractContentCacheBase::checkReply ( QNetworkReply *  reply,
const QString &  path 
) const
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.

◆ isBase64Data()

bool QgsAbstractContentCacheBase::isBase64Data ( const QString &  path)
static

Returns true if path represents base64 encoded data.

Since
QGIS 3.40

Definition at line 74 of file qgsabstractcontentcache.cpp.

◆ onRemoteContentFetched

void QgsAbstractContentCacheBase::onRemoteContentFetched ( const QString &  url,
bool  success 
)
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.

◆ parseBase64DataUrl()

bool QgsAbstractContentCacheBase::parseBase64DataUrl ( const QString &  path,
QString *  mimeType = nullptr,
QString *  data = nullptr 
)
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>.

Parameters
pathpath to test
mimeTypewill be set to the extracted mime type if the path is a data URL
datawill be set to the extracted base64 data if the path is a data URL
Returns
true if path is a base 64 encoded data URL
Since
QGIS 3.40

Definition at line 46 of file qgsabstractcontentcache.cpp.

◆ remoteContentFetched

void QgsAbstractContentCacheBase::remoteContentFetched ( const QString &  url)
signal

Emitted when the cache has finished retrieving content from a remote url.


The documentation for this class was generated from the following files: