QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
A model for published QGIS news feeds. More...
#include <qgsnewsfeedmodel.h>
Public Types | |
enum class | CustomRole : int { 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. | |
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.
|
strong |
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 46 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 24 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 113 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 39 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 79 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 85 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 98 of file qgsnewsfeedmodel.cpp.
|
override |
Definition at line 104 of file qgsnewsfeedmodel.cpp.