Class: QgsNewsFeedParser¶
- class qgis.core.QgsNewsFeedParser(feedUrl: QUrl, authcfg: str = '', parent: QObject = None)¶
Bases:
PyQt5.QtCore.QObject
Constructor for
QgsNewsFeedParser
, parsing the specifiedfeedUrl
.The optional
authcfg
argument can be used to specify an authentication configuration to use when connecting to the feed.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.
Methods
Returns the authentication configuration for the parser.
Dismisses all current news items.
Dismisses an entry with matching
key
.Returns a list of existing entries in the feed.
Fetches new entries from the feed’s URL.
Returns the settings key used for a feed with the given
baseUrl
.Signals
Emitted whenever a new
entry
is available from the feed (as a result of a call tofetch()
).Emitted whenever an
entry
is dismissed (as a result of a call todismissEntry()
).Emitted when
entries
have fetched from the feed.Emitted when the image attached to the entry with the specified
key
has been fetched and is now available.- class Entry¶
Bases:
sip.wrapper
Represents a single entry from a news feed.
New in version 3.10.
- content¶
- expiry¶
- image¶
- imageUrl¶
- key¶
- link¶
- sticky¶
- title¶
- authcfg(self) → str¶
Returns the authentication configuration for the parser.
- Return type
str
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- dismissAll(self)¶
Dismisses all current news items.
See also
- dismissEntry(self, key: int)¶
Dismisses an entry with matching
key
.This removes the entry from the local store, ensuring it will never be present again.
See also
- Parameters
key (int) –
- entries(self) → List[QgsNewsFeedParser.Entry]¶
Returns a list of existing entries in the feed.
- Return type
List[QgsNewsFeedParser.Entry]
- entryAdded¶
Emitted whenever a new
entry
is available from the feed (as a result of a call tofetch()
).See also
fetch()
[signal]- Parameters
entry (QgsNewsFeedParser.Entry) –
- entryDismissed¶
Emitted whenever an
entry
is dismissed (as a result of a call todismissEntry()
).See also
dismissEntry()
[signal]- Parameters
entry (QgsNewsFeedParser.Entry) –
- fetched¶
Emitted when
entries
have fetched from the feed.See also
fetch()
[signal]- Parameters
entries (Iterable[QgsNewsFeedParser.Entry]) –
- imageFetched¶
Emitted when the image attached to the entry with the specified
key
has been fetched and is now available. [signal]- Parameters
key (int) –
pixmap (QPixmap) –
- isSignalConnected(self, QMetaMethod) → bool¶
- keyForFeed(baseUrl: str) → str¶
Returns the settings key used for a feed with the given
baseUrl
.- Parameters
baseUrl (str) –
- Return type
str
- receivers(self, PYQT_SIGNAL) → int¶
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- timerEvent(self, QTimerEvent)¶