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 );
103 static QgsBookmark fromXml(
const QDomElement &element,
const QDomDocument &doc );
109 QDomElement writeXml( QDomDocument &doc )
const;
112 SIP_PYOBJECT __repr__();
114 QString
str = QStringLiteral(
"<QgsBookmark: '%1' (%2 - %3)>" ).arg( sipCpp->name(), sipCpp->extent().asWktCoordinates(), sipCpp->extent().crs().authid() );
115 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
171 void initialize(
const QString &filePath );
198 bool removeBookmark(
const QString &
id );
211 bool updateBookmark(
const QgsBookmark &bookmark );
222 QStringList groups()
const;
228 void renameGroup(
const QString &oldName,
const QString &newName );
233 QList< QgsBookmark > bookmarks()
const;
239 QgsBookmark bookmarkById(
const QString &
id )
const;
245 QList< QgsBookmark > bookmarksByGroup(
const QString &group );
252 bool readXml(
const QDomElement &element,
const QDomDocument &doc );
258 QDomElement writeXml( QDomDocument &doc )
const;
276 static bool exportToFile(
const QString &path,
const QList<const QgsBookmarkManager *> &managers,
const QString &group = QString() );
286 bool importFromFile(
const QString &path );
309 QList< QgsBookmark > mBookmarks;
313 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)