Parser for published QGIS news feeds.
More...
#include <qgsnewsfeedparser.h>
|
class | Entry |
| Represents a single entry from a news feed. More...
|
|
|
void | fetch () |
| Fetches new entries from the feed's URL.
|
|
|
static QString | keyForFeed (const QString &baseUrl) |
| Returns the settings key used for a feed with the given baseUrl.
|
|
|
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" ) ) |
|
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.
- Since
- QGIS 3.10
Definition at line 44 of file qgsnewsfeedparser.h.
◆ QgsNewsFeedParser()
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 48 of file qgsnewsfeedparser.cpp.
◆ authcfg()
QString QgsNewsFeedParser::authcfg |
( |
| ) |
const |
◆ dismissAll()
void QgsNewsFeedParser::dismissAll |
( |
| ) |
|
◆ dismissEntry()
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.
- See also
- dismissAll()
Definition at line 107 of file qgsnewsfeedparser.cpp.
◆ entries()
◆ entryAdded
Emitted whenever a new entry is available from the feed (as a result of a call to fetch()).
- See also
- fetch()
◆ entryDismissed
◆ entryUpdated
Emitted whenever an existing entry is available from the feed (as a result of a call to fetch()).
- See also
- fetch()
- Since
- QGIS 3.36
◆ fetch
void QgsNewsFeedParser::fetch |
( |
| ) |
|
|
slot |
◆ fetched
Emitted when entries have been fetched from the feed.
- See also
- fetch()
◆ imageFetched
void QgsNewsFeedParser::imageFetched |
( |
int |
key, |
|
|
const QPixmap & |
pixmap |
|
) |
| |
|
signal |
Emitted when the image attached to the entry with the specified key has been fetched and is now available.
◆ keyForFeed()
QString QgsNewsFeedParser::keyForFeed |
( |
const QString & |
baseUrl | ) |
|
|
static |
◆ TestQgsNewsFeedParser
friend class TestQgsNewsFeedParser |
|
friend |
◆ settingsFeedEntryContent
◆ settingsFeedEntryExpiry
◆ settingsFeedEntryImageUrl
◆ settingsFeedEntryLink
◆ settingsFeedEntrySticky
◆ settingsFeedEntryTitle
◆ settingsFeedLanguage
◆ settingsFeedLastFetchTime
◆ settingsFeedLatitude
◆ settingsFeedLongitude
◆ sTreeNewsFeed
◆ sTreeNewsFeedEntries
The documentation for this class was generated from the following files: