QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
Implements a model for the contents of QgsBookmarkManager objects. More...
#include <qgsbookmarkmodel.h>
Public Types | |
enum | Columns { ColumnName , ColumnGroup , ColumnXMin , ColumnYMin , ColumnXMax , ColumnYMax , ColumnRotation , ColumnCrs , ColumnStore } |
Model columns. More... | |
enum | CustomRoles { RoleExtent = Qt::UserRole , RoleName , RoleId , RoleGroup , RoleRotation } |
Custom model roles. More... | |
Public Member Functions | |
QgsBookmarkManagerModel (QgsBookmarkManager *manager, QgsBookmarkManager *projectManager=nullptr, QObject *parent=nullptr) | |
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). More... | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
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.
Definition at line 41 of file qgsbookmarkmodel.h.
Model columns.
Definition at line 58 of file qgsbookmarkmodel.h.
Custom model roles.
Enumerator | |
---|---|
RoleExtent | Bookmark extent as a QgsReferencedRectangle. |
RoleName | Bookmark name. |
RoleId | Bookmark ID. |
RoleGroup | Bookmark group. |
RoleRotation | Bookmark map rotation. |
Definition at line 48 of file qgsbookmarkmodel.h.
QgsBookmarkManagerModel::QgsBookmarkManagerModel | ( | QgsBookmarkManager * | manager, |
QgsBookmarkManager * | projectManager = nullptr , |
||
QObject * | parent = nullptr |
||
) |
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).
Definition at line 22 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 42 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 47 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 112 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 260 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 225 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 243 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 37 of file qgsbookmarkmodel.cpp.
|
override |
Definition at line 131 of file qgsbookmarkmodel.cpp.