Implements a model for the contents of QgsBookmarkManager objects.
More...
#include <qgsbookmarkmodel.h>
|
enum | Columns {
ColumnName
, ColumnGroup
, ColumnXMin
, ColumnYMin
,
ColumnXMax
, ColumnYMax
, ColumnCrs
, ColumnStore
} |
| Model columns. More...
|
|
enum | CustomRoles { RoleExtent = Qt::UserRole
, RoleName
, RoleId
, RoleGroup
} |
| Custom model roles. More...
|
|
|
| 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.
- Since
- QGIS 3.10
Definition at line 41 of file qgsbookmarkmodel.h.
◆ Columns
Model columns.
Enumerator |
---|
ColumnName | Name column.
|
ColumnGroup | Group column.
|
ColumnXMin | Extent x-minimum.
|
ColumnYMin | Extent y-minimum.
|
ColumnXMax | Extent x-maximum.
|
ColumnYMax | Extent y-maxnimum.
|
ColumnCrs | CRS of extent.
|
ColumnStore | Manager storing the bookmark (true if stored in project bookmark manager)
|
Definition at line 57 of file qgsbookmarkmodel.h.
◆ CustomRoles
◆ QgsBookmarkManagerModel()
◆ columnCount()
int QgsBookmarkManagerModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ data()
QVariant QgsBookmarkManagerModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ flags()
Qt::ItemFlags QgsBookmarkManagerModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ headerData()
QVariant QgsBookmarkManagerModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ insertRows()
bool QgsBookmarkManagerModel::insertRows |
( |
int |
row, |
|
|
int |
count, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| |
|
override |
◆ removeRows()
bool QgsBookmarkManagerModel::removeRows |
( |
int |
row, |
|
|
int |
count, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| |
|
override |
◆ rowCount()
int QgsBookmarkManagerModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ setData()
bool QgsBookmarkManagerModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
The documentation for this class was generated from the following files: