1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsabstractcontentcache.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAbstractContentCacheEntry
{
%Docstring(signature="appended")
Base class for entries in a :py:class:`QgsAbstractContentCache`.
Subclasses must take care to correctly implement the :py:func:`~isEqual` method, applying their
own logic for testing extra cache properties (e.g. image size for an image-based cache).
.. versionadded:: 3.6
%End
%TypeHeaderCode
#include "qgsabstractcontentcache.h"
%End
public:
QgsAbstractContentCacheEntry( const QString &path );
%Docstring
Constructor for QgsAbstractContentCacheEntry for an entry relating to the specified ``path``.
%End
virtual ~QgsAbstractContentCacheEntry();
QString path;
QDateTime fileModified;
QElapsedTimer fileModifiedLastCheckTimer;
int mFileModifiedCheckTimeout;
QgsAbstractContentCacheEntry *nextEntry;
QgsAbstractContentCacheEntry *previousEntry;
bool operator==( const QgsAbstractContentCacheEntry &other ) const;
virtual int dataSize() const = 0;
%Docstring
Returns the memory usage in bytes for the entry.
%End
virtual void dump() const = 0;
%Docstring
Dumps debugging strings containing the item's properties. For testing purposes only.
%End
protected:
virtual bool isEqual( const QgsAbstractContentCacheEntry *other ) const = 0;
%Docstring
Tests whether this entry matches another entry. Subclasses must take care to check
that the type of ``other`` is of a matching class, and then test extra cache-specific
properties, such as image size.
%End
private:
QgsAbstractContentCacheEntry( const QgsAbstractContentCacheEntry &rh );
};
class QgsAbstractContentCacheBase: QObject
{
%Docstring(signature="appended")
A QObject derived base class for :py:class:`QgsAbstractContentCache`.
Required because template based class (such as :py:class:`QgsAbstractContentCache`) cannot use the Q_OBJECT macro.
.. versionadded:: 3.6
%End
%TypeHeaderCode
#include "qgsabstractcontentcache.h"
%End
public:
QgsAbstractContentCacheBase( QObject *parent );
%Docstring
Constructor for QgsAbstractContentCacheBase, with the specified ``parent`` object.
%End
signals:
void remoteContentFetched( const QString &url );
%Docstring
Emitted when the cache has finished retrieving content from a remote ``url``.
%End
protected:
virtual bool checkReply( QNetworkReply *reply, const QString &path ) const;
%Docstring
Runs additional checks on a network ``reply`` to ensure that the reply content is
consistent with that required by the cache.
%End
protected slots:
virtual void onRemoteContentFetched( const QString &url, bool success );
%Docstring
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.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsabstractcontentcache.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
|