16#ifndef QGSBOOKMARKMODEL_H
17#define QGSBOOKMARKMODEL_H
21#include <QAbstractTableModel>
22#include <QSortFilterProxyModel>
50 RoleExtent = Qt::UserRole,
78 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
79 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
80 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
81 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
82 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
83 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
84 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
85 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
88 void bookmarkAboutToBeAdded(
const QString &
id );
89 void bookmarkAdded(
const QString &
id );
90 void bookmarkAboutToBeRemoved(
const QString &
id );
91 void bookmarkRemoved(
const QString &
id );
92 void bookmarkChanged(
const QString &
id );
95 bool mBlocked =
false;
98 QgsBookmark bookmarkForIndex(
const QModelIndex &index )
const;
Implements a model for the contents of QgsBookmarkManager objects.
@ ColumnXMin
Extent x-minimum.
@ ColumnRotation
Rotation of the map.
@ ColumnCrs
CRS of extent.
@ ColumnGroup
Group column.
@ ColumnYMin
Extent y-minimum.
@ ColumnStore
Manager storing the bookmark (true if stored in project bookmark manager)
@ ColumnXMax
Extent x-maximum.
@ ColumnYMax
Extent y-maximum.
CustomRoles
Custom model roles.
@ RoleRotation
Bookmark map rotation.
@ RoleGroup
Bookmark group.
A QSortFilterProxyModel subclass for sorting the entries in a QgsBookmarkManagerModel.
Manages storage of a set of bookmarks.
Represents a spatial bookmark, with a name, CRS and extent.