QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
Parser for published QGIS news feeds. More...
#include <qgsnewsfeedparser.h>
Classes | |
class | Entry |
Represents a single entry from a news feed. More... | |
Public Slots | |
void | fetch () |
Fetches new entries from the feed's URL. More... | |
Signals | |
void | entryAdded (const QgsNewsFeedParser::Entry &entry) |
Emitted whenever a new entry is available from the feed (as a result of a call to fetch()). More... | |
void | entryDismissed (const QgsNewsFeedParser::Entry &entry) |
Emitted whenever an entry is dismissed (as a result of a call to dismissEntry()). More... | |
void | fetched (const QList< QgsNewsFeedParser::Entry > &entries) |
Emitted when entries have fetched from the feed. More... | |
void | imageFetched (int key, const QPixmap &pixmap) |
Emitted when the image attached to the entry with the specified key has been fetched and is now available. More... | |
Public Member Functions | |
QgsNewsFeedParser (const QUrl &feedUrl, const QString &authcfg=QString(), QObject *parent=nullptr) | |
Constructor for QgsNewsFeedParser, parsing the specified feedUrl. More... | |
QString | authcfg () const |
Returns the authentication configuration for the parser. More... | |
void | dismissAll () |
Dismisses all current news items. More... | |
void | dismissEntry (int key) |
Dismisses an entry with matching key. More... | |
QList< QgsNewsFeedParser::Entry > | entries () const |
Returns a list of existing entries in the feed. More... | |
Static Public Member Functions | |
static QString | keyForFeed (const QString &baseUrl) |
Returns the settings key used for a feed with the given baseUrl. More... | |
Static Public Attributes | |
static const QgsSettingsEntryString * | settingsFeedEntryContent = new QgsSettingsEntryString( QStringLiteral( "content" ), sTreeNewsFeedEntries, QString(), QStringLiteral( "Entry content" ) ) |
static const QgsSettingsEntryVariant * | settingsFeedEntryExpiry = new QgsSettingsEntryVariant( QStringLiteral( "expiry" ), sTreeNewsFeedEntries, QVariant(), QStringLiteral( "Expiry date" ) ) |
static const QgsSettingsEntryString * | settingsFeedEntryImageUrl = new QgsSettingsEntryString( QStringLiteral( "image-url" ), sTreeNewsFeedEntries, QString(), QStringLiteral( "Entry image URL" ) ) |
static const QgsSettingsEntryString * | settingsFeedEntryLink = new QgsSettingsEntryString( QStringLiteral( "link" ), sTreeNewsFeedEntries, QString(), QStringLiteral( "Entry link" ) ) |
static const QgsSettingsEntryBool * | settingsFeedEntrySticky = new QgsSettingsEntryBool( QStringLiteral( "sticky" ), sTreeNewsFeedEntries, false ) |
static const QgsSettingsEntryString * | settingsFeedEntryTitle = new QgsSettingsEntryString( QStringLiteral( "title" ), sTreeNewsFeedEntries, QString(), QStringLiteral( "Entry title" ) ) |
static const QgsSettingsEntryString * | settingsFeedLanguage = new QgsSettingsEntryString( QStringLiteral( "lang" ), sTreeNewsFeed, QString(), QStringLiteral( "Feed language" ) ) |
static const QgsSettingsEntryInteger64 * | settingsFeedLastFetchTime = new QgsSettingsEntryInteger64( QStringLiteral( "last-fetch-time" ), sTreeNewsFeed, 0, QStringLiteral( "Feed last fetch time" ), Qgis::SettingsOptions(), 0 ) |
static const QgsSettingsEntryDouble * | settingsFeedLatitude = new QgsSettingsEntryDouble( QStringLiteral( "latitude" ), sTreeNewsFeed, 0.0, QStringLiteral( "Feed latitude" ) ) |
static const QgsSettingsEntryDouble * | settingsFeedLongitude = new QgsSettingsEntryDouble( QStringLiteral( "longitude" ), sTreeNewsFeed, 0.0, QStringLiteral( "Feed longitude" ) ) |
static QgsSettingsTreeNamedListNode * | sTreeNewsFeed = QgsSettingsTree::sTreeApp->createNamedListNode( QStringLiteral( "news-feed" ) ) |
static QgsSettingsTreeNamedListNode * | sTreeNewsFeedEntries = sTreeNewsFeed->createNamedListNode( QStringLiteral( "entries" ) ) |
Friends | |
class | TestQgsNewsFeedParser |
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.
Definition at line 44 of file qgsnewsfeedparser.h.
QgsNewsFeedParser::QgsNewsFeedParser | ( | const QUrl & | feedUrl, |
const QString & | authcfg = QString() , |
||
QObject * | parent = nullptr |
||
) |
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.
Definition at line 47 of file qgsnewsfeedparser.cpp.
QString QgsNewsFeedParser::authcfg | ( | ) | const |
Returns the authentication configuration for the parser.
Definition at line 149 of file qgsnewsfeedparser.cpp.
void QgsNewsFeedParser::dismissAll | ( | ) |
Dismisses all current news items.
Definition at line 140 of file qgsnewsfeedparser.cpp.
void QgsNewsFeedParser::dismissEntry | ( | int | key | ) |
Dismisses an entry with matching key.
This removes the entry from the local store, ensuring it will never be present again.
Definition at line 106 of file qgsnewsfeedparser.cpp.
QList< QgsNewsFeedParser::Entry > QgsNewsFeedParser::entries | ( | ) | const |
Returns a list of existing entries in the feed.
Definition at line 101 of file qgsnewsfeedparser.cpp.
|
signal |
|
signal |
Emitted whenever an entry is dismissed (as a result of a call to dismissEntry()).
|
slot |
Fetches new entries from the feed's URL.
Definition at line 154 of file qgsnewsfeedparser.cpp.
|
signal |
Emitted when entries have fetched from the feed.
|
signal |
Emitted when the image attached to the entry with the specified key has been fetched and is now available.
|
static |
Returns the settings key used for a feed with the given baseUrl.
Definition at line 343 of file qgsnewsfeedparser.cpp.
|
friend |
Definition at line 196 of file qgsnewsfeedparser.h.
|
static |
Definition at line 59 of file qgsnewsfeedparser.h.
|
static |
Definition at line 62 of file qgsnewsfeedparser.h.
|
static |
Definition at line 58 of file qgsnewsfeedparser.h.
|
static |
Definition at line 60 of file qgsnewsfeedparser.h.
|
static |
Definition at line 61 of file qgsnewsfeedparser.h.
|
static |
Definition at line 57 of file qgsnewsfeedparser.h.
|
static |
Definition at line 52 of file qgsnewsfeedparser.h.
|
static |
Definition at line 51 of file qgsnewsfeedparser.h.
|
static |
Definition at line 53 of file qgsnewsfeedparser.h.
|
static |
Definition at line 54 of file qgsnewsfeedparser.h.
|
inlinestatic |
Definition at line 50 of file qgsnewsfeedparser.h.
|
inlinestatic |
Definition at line 56 of file qgsnewsfeedparser.h.