QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSBOOKMARKMANAGER_H
17 #define QGSBOOKMARKMANAGER_H
19 #include "qgis_core.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() );
170 void initialize(
const QString &filePath );
197 bool removeBookmark(
const QString &
id );
210 bool updateBookmark(
const QgsBookmark &bookmark );
221 QStringList groups()
const;
227 void renameGroup(
const QString &oldName,
const QString &newName );
232 QList< QgsBookmark > bookmarks()
const;
238 QgsBookmark bookmarkById(
const QString &
id )
const;
244 QList< QgsBookmark > bookmarksByGroup(
const QString &group );
251 bool readXml(
const QDomElement &element,
const QDomDocument &doc );
257 QDomElement writeXml( QDomDocument &doc )
const;
275 static bool exportToFile(
const QString &path,
const QList<const QgsBookmarkManager *> &managers,
const QString &group = QString() );
285 bool importFromFile(
const QString &path );
308 QList< QgsBookmark > mBookmarks;
312 bool mInitialized =
false;
316 #endif // QGSBOOKMARKMANAGER_H
void bookmarkAboutToBeRemoved(const QString &id)
Emitted when a bookmark is about to be removed from the manager.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
A QgsRectangle with associated coordinate reference system.
QgsBookmark()=default
Default constructor, creates an empty bookmark.
void bookmarkAdded(const QString &id)
Emitted when a bookmark has been added to the manager.
Manages storage of a set of bookmarks.
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
void bookmarkChanged(const QString &id)
Emitted when a bookmark is changed.
Represents a spatial bookmark, with a name, CRS and extent.
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.