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)>" )
132 .arg( sipCpp->name() )
134 sipCpp->extent().isNull() ?
135 QStringLiteral(
"EMPTY" ) :
136 QStringLiteral(
"%1 - %2" )
137 .arg( sipCpp->extent().asWktCoordinates(), sipCpp->extent().
crs().authid() )
139 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
153 double mRotation = 0;
196 void initialize(
const QString &filePath );
223 bool removeBookmark(
const QString &
id );
236 bool updateBookmark(
const QgsBookmark &bookmark );
247 QStringList groups()
const;
253 void renameGroup(
const QString &oldName,
const QString &newName );
258 QList< QgsBookmark > bookmarks()
const;
264 QgsBookmark bookmarkById(
const QString &
id )
const;
270 QList< QgsBookmark > bookmarksByGroup(
const QString &group );
277 bool readXml(
const QDomElement &element,
const QDomDocument &doc );
283 QDomElement writeXml( QDomDocument &doc )
const;
301 static bool exportToFile(
const QString &path,
const QList<const QgsBookmarkManager *> &managers,
const QString &group = QString() );
311 bool importFromFile(
const QString &path );
334 QList< QgsBookmark > mBookmarks;
338 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)
const QgsCoordinateReferenceSystem & crs