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.
|
|
| | QgsNewsFeedParser (const QUrl &feedUrl, const QString &authcfg=QString(), QObject *parent=nullptr) |
| | Constructor for QgsNewsFeedParser, parsing the specified feedUrl.
|
| QString | authcfg () const |
| | Returns the authentication configuration for the parser.
|
| Q_INVOKABLE void | dismissAll () |
| | Dismisses all current news items.
|
| Q_INVOKABLE void | dismissEntry (int key) |
| | Dismisses an entry with matching key.
|
| bool | enabled () const |
| | Returns true if the feed URL associated with the news parser is enabled.
|
| QList< QgsNewsFeedParser::Entry > | entries () const |
| | Returns a list of existing entries in the feed.
|
| bool | isFetching () const |
| | Returns true if the news parser is fetching items.
|
| void | setEnabled (bool enabled) |
| | Sets whether the feed URL associated with the news parser is enabled.
|
|
| static QString | keyForFeed (const QString &baseUrl) |
| | Returns the settings key used for a feed with the given baseUrl.
|
|
| static const QgsSettingsEntryString * | settingsFeedEntryContent = new QgsSettingsEntryString( u"content"_s, sTreeNewsFeedEntries, QString(), u"Entry content"_s ) |
| static const QgsSettingsEntryVariant * | settingsFeedEntryExpiry = new QgsSettingsEntryVariant( u"expiry"_s, sTreeNewsFeedEntries, QVariant(), u"Expiry date"_s ) |
| static const QgsSettingsEntryString * | settingsFeedEntryImageUrl = new QgsSettingsEntryString( u"image-url"_s, sTreeNewsFeedEntries, QString(), u"Entry image URL"_s ) |
| static const QgsSettingsEntryString * | settingsFeedEntryLink = new QgsSettingsEntryString( u"link"_s, sTreeNewsFeedEntries, QString(), u"Entry link"_s ) |
| static const QgsSettingsEntryBool * | settingsFeedEntrySticky = new QgsSettingsEntryBool( u"sticky"_s, sTreeNewsFeedEntries, false ) |
| static const QgsSettingsEntryString * | settingsFeedEntryTitle = new QgsSettingsEntryString( u"title"_s, sTreeNewsFeedEntries, QString(), u"Entry title"_s ) |
| static const QgsSettingsEntryString * | settingsFeedLanguage = new QgsSettingsEntryString( u"lang"_s, sTreeNewsFeed, QString(), u"Feed language"_s ) |
| static const QgsSettingsEntryInteger64 * | settingsFeedLastFetchTime = new QgsSettingsEntryInteger64( u"last-fetch-time"_s, sTreeNewsFeed, 0, u"Feed last fetch time"_s, Qgis::SettingsOptions(), 0 ) |
| static const QgsSettingsEntryDouble * | settingsFeedLatitude = new QgsSettingsEntryDouble( u"latitude"_s, sTreeNewsFeed, 0.0, u"Feed latitude"_s ) |
| static const QgsSettingsEntryDouble * | settingsFeedLongitude = new QgsSettingsEntryDouble( u"longitude"_s, sTreeNewsFeed, 0.0, u"Feed longitude"_s ) |
| static QgsSettingsTreeNamedListNode * | sTreeNewsFeed = QgsSettingsTree::sTreeApp->createNamedListNode( u"news-feed"_s ) |
| static QgsSettingsTreeNamedListNode * | sTreeNewsFeedEntries = sTreeNewsFeed->createNamedListNode( u"entries"_s ) |
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 46 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 54 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 129 of file qgsnewsfeedparser.cpp.
◆ enabled()
| bool QgsNewsFeedParser::enabled |
( |
| ) |
const |
|
inline |
Returns true if the feed URL associated with the news parser is enabled.
- Since
- QGIS 4.0
Definition at line 118 of file qgsnewsfeedparser.h.
◆ enabledChanged
| void QgsNewsFeedParser::enabledChanged |
( |
| ) |
|
|
signal |
Emitted when the enabled/disabled state of the feed URL associated to the news parser changes.
- Since
- QGIS 4.0
◆ 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.
◆ isFetching()
| bool QgsNewsFeedParser::isFetching |
( |
| ) |
const |
|
inline |
Returns true if the news parser is fetching items.
- Since
- QGIS 4.0
Definition at line 132 of file qgsnewsfeedparser.h.
◆ isFetchingChanged
| void QgsNewsFeedParser::isFetchingChanged |
( |
| ) |
|
|
signal |
Emitted when the news parser's fetching state changes.
- Since
- QGIS 4.0
◆ keyForFeed()
| QString QgsNewsFeedParser::keyForFeed |
( |
const QString & | baseUrl | ) |
|
|
static |
◆ setEnabled()
| void QgsNewsFeedParser::setEnabled |
( |
bool | enabled | ) |
|
Sets whether the feed URL associated with the news parser is enabled.
- Since
- QGIS 4.0
Definition at line 111 of file qgsnewsfeedparser.cpp.
◆ TestQgsNewsFeedParser
| friend class TestQgsNewsFeedParser |
|
friend |
◆ settingsFeedEntryContent
◆ settingsFeedEntryExpiry
◆ settingsFeedEntryImageUrl
◆ settingsFeedEntryLink
◆ settingsFeedEntrySticky
◆ settingsFeedEntryTitle
◆ settingsFeedLanguage
◆ settingsFeedLastFetchTime
◆ settingsFeedLatitude
◆ settingsFeedLongitude
◆ sTreeNewsFeed
◆ sTreeNewsFeedEntries
◆ enabled
| bool QgsNewsFeedParser::enabled |
|
readwrite |
◆ isFetching
| bool QgsNewsFeedParser::isFetching |
|
read |
The documentation for this class was generated from the following files: