Class: QgsNewsFeedModel

class qgis.core.QgsNewsFeedModel

Bases: PyQt5.QtCore.QAbstractItemModel

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.

New in version 3.10.

QgsNewsFeedModel(parser: QgsNewsFeedParser, parent: QObject = None) 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.

class CustomRole(value)

Bases: enum.IntEnum

Custom model roles.

Note

Prior to QGIS 3.36 this was available as QgsNewsFeedModel.Role

New in version 3.36.

  • 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

baseClass

alias of QgsNewsFeedModel

Role

alias of CustomRole

beginInsertColumns(self, QModelIndex, int, int)
beginInsertRows(self, QModelIndex, int, int)
beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool
beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool
beginRemoveColumns(self, QModelIndex, int, int)
beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
childEvent(self, QChildEvent)
columnCount(self, parent: QModelIndex = QModelIndex()) int
Parameters:

parent (QModelIndex = QModelIndex()) –

Return type:

int

connectNotify(self, QMetaMethod)
createIndex(self, int, int, object: object = 0) QModelIndex
customEvent(self, QEvent)
data(self, index: QModelIndex, role: int) Any
Parameters:
  • index (QModelIndex) –

  • role (int) –

Return type:

Any

decodeData(self, int, int, QModelIndex, QDataStream) bool
disconnectNotify(self, QMetaMethod)
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
flags(self, index: QModelIndex) Qt.ItemFlags
Parameters:

index (QModelIndex) –

Return type:

Qt.ItemFlags

index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) QModelIndex
Parameters:
  • row (int) –

  • column (int) –

  • parent (QModelIndex = QModelIndex()) –

Return type:

QModelIndex

isSignalConnected(self, QMetaMethod) bool
parent(self, index: QModelIndex) QModelIndex
Parameters:

index (QModelIndex) –

Return type:

QModelIndex

persistentIndexList(self) List[QModelIndex]
receivers(self, PYQT_SIGNAL) int
resetInternalData(self)
rowCount(self, parent: QModelIndex = QModelIndex()) int
Parameters:

parent (QModelIndex = QModelIndex()) –

Return type:

int

sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)