QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
A model for published QGIS news feeds. More...
#include <qgsnewsfeedmodel.h>
Public Types | |
enum | Role { Key = Qt::UserRole + 1, Title, Content, ImageUrl, Image, Link, Sticky } |
Custom model roles. More... | |
Public Member Functions | |
QgsNewsFeedModel (QgsNewsFeedParser *parser, QObject *parent=nullptr) | |
Constructor for QgsNewsFeedModel, with the specified parent object. More... | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | parent (const QModelIndex &index) const override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
A model for published QGIS news feeds.
This class is designed to work with QgsNewsFeedParser, for displaying feeds from a https://github.com/elpaso/qgis-feed server instance.
Definition at line 33 of file qgsnewsfeedmodel.h.
Custom model roles.
Enumerator | |
---|---|
Key | Entry unique key. |
Title | Entry title. |
Content | Entry content. |
ImageUrl | Optional entry image URL. |
Image | Optional entry image. |
Link | Optional entry URL link. |
Sticky | Whether entry is sticky. |
Definition at line 54 of file qgsnewsfeedmodel.h.
QgsNewsFeedModel::QgsNewsFeedModel | ( | QgsNewsFeedParser * | parser, |
QObject * | parent = nullptr |
||
) |
Constructor for QgsNewsFeedModel, with the specified parent object.
The parser argument must specify a valid QgsNewsFeedParser object, which must exist for the lifetime of this model.
Definition at line 23 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 111 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 37 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 77 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 83 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 96 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 102 of file qgsnewsfeedmodel.cpp.