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 aQgsBookmarkManager
object. The model requires both a main manager (usually the application bookmark manager, accessed viaQgsApplication.bookmarkManager()
) and a project-based manager. The resultant model data is a merge of the bookmarks stored in both managers.Added in version 3.10.
QgsBookmarkManagerModel(manager: Optional[QgsBookmarkManager], projectManager: Optional[QgsBookmarkManager] = None, parent: Optional[QObject] = None) Constructor for
QgsBookmarkManagerModel
, associated with a mainmanager
(usually the application bookmark manager, accessed viaQgsApplication.bookmarkManager()
) and a secondaryprojectManager
(a project based bookmark manager).Enums
Bases:
enum.IntEnum
alias of
CustomRole
Methods
- param parent:
- param index:
- param index:
- param section:
- param row:
- param row:
- param parent:
- param index:
Signals
Attributes
- 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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
enum.IntEnum
Custom model roles.
Note
Prior to QGIS 3.36 this was available as QgsBookmarkManagerModel.CustomRoles
Added in version 3.36.
RoleExtent
: Bookmark extent as a QgsReferencedRectangleRoleName
: Bookmark nameRoleId
: Bookmark IDRoleGroup
: Bookmark groupRoleRotation
: Bookmark map rotation
- baseClass¶
alias of
QgsBookmarkManagerModel
- CustomRoles¶
alias of
CustomRole
- beginInsertColumns(self, parent: QModelIndex, first: int, last: int)¶
- beginInsertRows(self, parent: QModelIndex, first: int, last: int)¶
- beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) bool ¶
- beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) bool ¶
- beginRemoveColumns(self, parent: QModelIndex, first: int, last: int)¶
- beginRemoveRows(self, parent: QModelIndex, first: int, last: int)¶
- beginResetModel(self)¶
- changePersistentIndex(self, from_: QModelIndex, to: QModelIndex)¶
- changePersistentIndexList(self, from_: Iterable[QModelIndex], to: Iterable[QModelIndex])¶
- childEvent(self, a0: QChildEvent | None)¶
- columnCount(self, parent: QModelIndex = QModelIndex()) int ¶
- Parameters:
parent (QModelIndex = QModelIndex())
- Return type:
int
- connectNotify(self, signal: QMetaMethod)¶
- createIndex(self, row: int, column: int, object: Any = None) QModelIndex ¶
- customEvent(self, a0: QEvent | None)¶
- data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any ¶
- Parameters:
index (QModelIndex)
role (int = Qt.DisplayRole)
- Return type:
Any
- decodeData(self, row: int, column: int, parent: QModelIndex, stream: QDataStream) bool ¶
- disconnectNotify(self, signal: QMetaMethod)¶
- encodeData(self, indexes: Iterable[QModelIndex], stream: 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, signal: QMetaMethod) bool ¶
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, signal: 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 | None ¶
- 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, a0: QTimerEvent | None)¶