15 #ifndef QGSNEWSFEEDPARSER_H
16 #define QGSNEWSFEEDPARSER_H
18 #include "qgis_core.h"
86 QList< QgsNewsFeedParser::Entry > entries()
const;
95 void dismissEntry(
int key );
106 QString authcfg()
const;
111 static QString keyForFeed(
const QString &baseUrl );
128 void fetched(
const QList< QgsNewsFeedParser::Entry > &entries );
154 void onFetch(
const QString &content );
161 qint64 mFetchStartTime = 0;
162 QString mSettingsKey;
164 QList< Entry > mEntries;
165 bool mBlockSignals =
false;
167 void readStoredEntries();
168 Entry readEntryFromSettings(
int key );
169 void storeEntryInSettings(
const Entry &entry );
170 void fetchImageForEntry(
const Entry &entry );
172 friend class TestQgsNewsFeedParser;
HTTP network content fetcher.
Represents a single entry from a news feed.
QString content
HTML content of news entry.
QUrl link
Optional URL link for entry.
QString imageUrl
Optional URL for image associated with entry.
QPixmap image
Optional image data.
QDateTime expiry
Optional auto-expiry time for entry.
QString title
Entry title.
Parser for published QGIS news feeds.
void entryDismissed(const QgsNewsFeedParser::Entry &entry)
Emitted whenever an entry is dismissed (as a result of a call to dismissEntry()).
void fetched(const QList< QgsNewsFeedParser::Entry > &entries)
Emitted when entries have fetched from the feed.
void entryAdded(const QgsNewsFeedParser::Entry &entry)
Emitted whenever a new entry is available from the feed (as a result of a call to fetch()).
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 avail...