15 #ifndef QGSNEWSFEEDPARSER_H
16 #define QGSNEWSFEEDPARSER_H
18 #include "qgis_core.h"
87 QList< QgsNewsFeedParser::Entry > entries()
const;
96 void dismissEntry(
int key );
107 QString authcfg()
const;
112 static QString keyForFeed(
const QString &baseUrl );
140 void fetched(
const QList< QgsNewsFeedParser::Entry > &entries );
166 void onFetch(
const QString &content );
173 qint64 mFetchStartTime = 0;
174 QString mSettingsKey;
176 QList< Entry > mEntries;
177 bool mBlockSignals =
false;
179 void readStoredEntries();
180 Entry readEntryFromSettings(
int key );
181 void storeEntryInSettings(
const Entry &entry );
182 void fetchImageForEntry(
const Entry &entry );
184 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...
An integer settings entry.