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 );
290 void bookmarkAboutToBeAdded(
const QString &
id );
293 void bookmarkAdded(
const QString &
id );
296 void bookmarkRemoved(
const QString &
id );
299 void bookmarkAboutToBeRemoved(
const QString &
id );
302 void bookmarkChanged(
const QString &
id );
308 QList< QgsBookmark > mBookmarks;
312 bool mInitialized =
false;
316 #endif // QGSBOOKMARKMANAGER_H