Class: QgsBookmarkManagerModel

class qgis.core.QgsBookmarkManagerModel

Bases: PyQt5.QtCore.QAbstractTableModel

Implements a model for the contents of QgsBookmarkManager objects.

QgsBookmarkModel provides a Qt table model for displaying and manipulating the bookmarks managed by a QgsBookmarkManager object. The model requires both a main manager (usually the application bookmark manager, accessed via QgsApplication.bookmarkManager()) and a project-based manager. The resultant model data is a merge of the bookmarks stored in both managers.

New in version 3.10.

QgsBookmarkManagerModel(manager: QgsBookmarkManager, projectManager: QgsBookmarkManager = None, parent: QObject = None) Constructor for QgsBookmarkManagerModel, associated with a main manager (usually the application bookmark manager, accessed via QgsApplication.bookmarkManager()) and a secondary projectManager (a project based bookmark manager).

Enums

CustomRole

Bases: enum.IntEnum

CustomRoles

alias of CustomRole

Methods

beginInsertColumns

beginInsertRows

beginMoveColumns

beginMoveRows

beginRemoveColumns

beginRemoveRows

beginResetModel

changePersistentIndex

changePersistentIndexList

childEvent

columnCount

param parent:

connectNotify

createIndex

customEvent

data

param index:

decodeData

disconnectNotify

encodeData

endInsertColumns

endInsertRows

endMoveColumns

endMoveRows

endRemoveColumns

endRemoveRows

endResetModel

flags

param index:

headerData

param section:

insertRows

param row:

isSignalConnected

persistentIndexList

receivers

removeRows

param row:

resetInternalData

rowCount

param parent:

sender

senderSignalIndex

setData

param index:

timerEvent

Attributes

ColumnCrs

ColumnGroup

ColumnName

ColumnRotation

ColumnStore

ColumnXMax

ColumnXMin

ColumnYMax

ColumnYMin

ColumnCrs = 7
ColumnGroup = 1
ColumnName = 0
ColumnRotation = 6
ColumnStore = 8
ColumnXMax = 4
ColumnXMin = 2
ColumnYMax = 5
ColumnYMin = 3
class Columns

Bases: int

class CustomRole(value)

Bases: enum.IntEnum

Custom model roles.

Note

Prior to QGIS 3.36 this was available as QgsBookmarkManagerModel.CustomRoles

New in version 3.36.

  • RoleExtent: Bookmark extent as a QgsReferencedRectangle

  • RoleName: Bookmark name

  • RoleId: Bookmark ID

  • RoleGroup: Bookmark group

  • RoleRotation: Bookmark map rotation

baseClass

alias of QgsBookmarkManagerModel

CustomRoles

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 = Qt.DisplayRole) Any
Parameters:
  • index (QModelIndex) –

  • role (int = Qt.DisplayRole) –

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

headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any
Parameters:
  • section (int) –

  • orientation (Qt.Orientation) –

  • role (int = Qt.DisplayRole) –

Return type:

Any

insertRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool
Parameters:
  • row (int) –

  • count (int) –

  • parent (QModelIndex = QModelIndex()) –

Return type:

bool

isSignalConnected(self, QMetaMethod) bool
persistentIndexList(self) List[QModelIndex]
receivers(self, PYQT_SIGNAL) int
removeRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool
Parameters:
  • row (int) –

  • count (int) –

  • parent (QModelIndex = QModelIndex()) –

Return type:

bool

resetInternalData(self)
rowCount(self, parent: QModelIndex = QModelIndex()) int
Parameters:

parent (QModelIndex = QModelIndex()) –

Return type:

int

sender(self) QObject
senderSignalIndex(self) int
setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) bool
Parameters:
  • index (QModelIndex) –

  • value (Any) –

  • role (int = Qt.EditRole) –

Return type:

bool

timerEvent(self, QTimerEvent)