16#ifndef QGSBOOKMARKMANAGER_H
17#define QGSBOOKMARKMANAGER_H
57 void setId(
const QString &
id );
71 void setName(
const QString &name );
78 QString group()
const;
85 void setGroup(
const QString &group );
106 double rotation()
const;
114 void setRotation(
double rotation );
120 static QgsBookmark fromXml(
const QDomElement &element,
const QDomDocument &doc );
126 QDomElement writeXml( QDomDocument &doc )
const;
129 SIP_PYOBJECT __repr__();
131 QString
str = QStringLiteral(
"<QgsBookmark: '%1' (%2 - %3)>" ).arg( sipCpp->name(), sipCpp->extent().asWktCoordinates(), sipCpp->extent().crs().authid() );
132 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
146 double mRotation = 0;
189 void initialize(
const QString &filePath );
216 bool removeBookmark(
const QString &
id );
229 bool updateBookmark(
const QgsBookmark &bookmark );
240 QStringList groups()
const;
246 void renameGroup(
const QString &oldName,
const QString &newName );
251 QList< QgsBookmark > bookmarks()
const;
257 QgsBookmark bookmarkById(
const QString &
id )
const;
263 QList< QgsBookmark > bookmarksByGroup(
const QString &group );
270 bool readXml(
const QDomElement &element,
const QDomDocument &doc );
276 QDomElement writeXml( QDomDocument &doc )
const;
294 static bool exportToFile(
const QString &path,
const QList<const QgsBookmarkManager *> &managers,
const QString &group = QString() );
304 bool importFromFile(
const QString &path );
327 QList< QgsBookmark > mBookmarks;
331 bool mInitialized =
false;
Manages storage of a set of bookmarks.
void bookmarkAboutToBeRemoved(const QString &id)
Emitted when a bookmark is about to be removed from the manager.
void bookmarkChanged(const QString &id)
Emitted when a bookmark is changed.
void bookmarkAdded(const QString &id)
Emitted when a bookmark has been added to the manager.
void bookmarkAboutToBeAdded(const QString &id)
Emitted when a bookmark is about to be added to the manager.
void bookmarkRemoved(const QString &id)
Emitted when a bookmark was removed from the manager.
Represents a spatial bookmark, with a name, CRS and extent.
QgsBookmark()=default
Default constructor, creates an empty bookmark.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
A QgsRectangle with associated coordinate reference system.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)