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() );
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 );
291 void bookmarkAboutToBeAdded(
const QString &
id );
294 void bookmarkAdded(
const QString &
id );
297 void bookmarkRemoved(
const QString &
id );
300 void bookmarkAboutToBeRemoved(
const QString &
id );
303 void bookmarkChanged(
const QString &
id );
309 QList< QgsBookmark > mBookmarks;
313 bool mInitialized =
false;
317 #endif // QGSBOOKMARKMANAGER_H