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 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/network/qgsnewsfeedparser.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsNewsFeedParser : QObject
{
%Docstring(signature="appended")
Parser for published QGIS news feeds.
This class is designed to work with the specialized QGIS news feed API.
See https://github.com/elpaso/qgis-feed.
.. versionadded:: 3.10
%End
%TypeHeaderCode
#include "qgsnewsfeedparser.h"
%End
public:
class Entry
{
%Docstring(signature="appended")
Represents a single entry from a news feed.
.. versionadded:: 3.10
%End
%TypeHeaderCode
#include "qgsnewsfeedparser.h"
%End
public:
int key;
QString title;
QString imageUrl;
QPixmap image;
QString content;
QUrl link;
bool sticky;
QDateTime expiry;
};
QgsNewsFeedParser( const QUrl &feedUrl, const QString &authcfg = QString(), QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsNewsFeedParser, parsing the specified ``feedUrl``.
The optional ``authcfg`` argument can be used to specify an
authentication configuration to use when connecting to the feed.
%End
QList< QgsNewsFeedParser::Entry > entries() const;
%Docstring
Returns a list of existing entries in the feed.
%End
void dismissEntry( int key );
%Docstring
Dismisses an entry with matching ``key``.
This removes the entry from the local store, ensuring it will never be
present again.
.. seealso:: :py:func:`dismissAll`
%End
void dismissAll();
%Docstring
Dismisses all current news items.
.. seealso:: :py:func:`dismissEntry`
%End
QString authcfg() const;
%Docstring
Returns the authentication configuration for the parser.
%End
static QString keyForFeed( const QString &baseUrl );
%Docstring
Returns the settings key used for a feed with the given ``baseUrl``.
%End
public slots:
void fetch();
%Docstring
Fetches new entries from the feed's URL.
.. seealso:: :py:func:`fetched`
%End
signals:
void fetched( const QList< QgsNewsFeedParser::Entry > &entries );
%Docstring
Emitted when ``entries`` have been fetched from the feed.
.. seealso:: :py:func:`fetch`
%End
void entryAdded( const QgsNewsFeedParser::Entry &entry );
%Docstring
Emitted whenever a new ``entry`` is available from the feed (as a result
of a call to :py:func:`~QgsNewsFeedParser.fetch`).
.. seealso:: :py:func:`fetch`
%End
void entryUpdated( const QgsNewsFeedParser::Entry &entry );
%Docstring
Emitted whenever an existing ``entry`` is available from the feed (as a
result of a call to :py:func:`~QgsNewsFeedParser.fetch`).
.. seealso:: :py:func:`fetch`
.. versionadded:: 3.36
%End
void entryDismissed( const QgsNewsFeedParser::Entry &entry );
%Docstring
Emitted whenever an ``entry`` is dismissed (as a result of a call to
:py:func:`~QgsNewsFeedParser.dismissEntry`).
.. seealso:: :py:func:`dismissEntry`
%End
void imageFetched( int key, const QPixmap &pixmap );
%Docstring
Emitted when the image attached to the entry with the specified ``key``
has been fetched and is now available.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/network/qgsnewsfeedparser.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|