QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Represents a spatial bookmark, with a name, CRS and extent. More...
#include <qgsbookmarkmanager.h>
Public Member Functions | |
QgsBookmark ()=default | |
Default constructor, creates an empty bookmark. More... | |
QgsReferencedRectangle | extent () const |
Returns the bookmark's spatial extent. More... | |
QString | group () const |
Returns the bookmark's group, which is a user-visible string identifying the bookmark's category. More... | |
QString | id () const |
Returns the bookmark's unique ID. More... | |
QString | name () const |
Returns the bookmark's name, which is a user-visible string identifying the bookmark. More... | |
bool | operator!= (const QgsBookmark &other) |
bool | operator== (const QgsBookmark &other) |
void | setExtent (const QgsReferencedRectangle &extent) |
Sets the bookmark's spatial extent. More... | |
void | setGroup (const QString &group) |
Sets the bookmark's group, which is a user-visible string identifying the bookmark's category. More... | |
void | setId (const QString &id) |
Sets the bookmark's unique id. More... | |
void | setName (const QString &name) |
Sets the bookmark's name, which is a user-visible string identifying the bookmark. More... | |
QDomElement | writeXml (QDomDocument &doc) const |
Returns a DOM element representing the bookmark's properties. More... | |
Static Public Member Functions | |
static QgsBookmark | fromXml (const QDomElement &element, const QDomDocument &doc) |
Creates a bookmark using the properties from a DOM element. More... | |
Represents a spatial bookmark, with a name, CRS and extent.
QgsBookmark objects are typically used alongside the QgsBookmarkManager class, which handles storage of a set of bookmarks.
Definition at line 37 of file qgsbookmarkmanager.h.
|
default |
Default constructor, creates an empty bookmark.
QgsReferencedRectangle QgsBookmark::extent | ( | ) | const |
Returns the bookmark's spatial extent.
Definition at line 92 of file qgsbookmarkmanager.cpp.
|
static |
Creates a bookmark using the properties from a DOM element.
Definition at line 38 of file qgsbookmarkmanager.cpp.
QString QgsBookmark::group | ( | ) | const |
Returns the bookmark's group, which is a user-visible string identifying the bookmark's category.
Definition at line 82 of file qgsbookmarkmanager.cpp.
QString QgsBookmark::id | ( | ) | const |
Returns the bookmark's unique ID.
Definition at line 28 of file qgsbookmarkmanager.cpp.
QString QgsBookmark::name | ( | ) | const |
Returns the bookmark's name, which is a user-visible string identifying the bookmark.
Definition at line 72 of file qgsbookmarkmanager.cpp.
bool QgsBookmark::operator!= | ( | const QgsBookmark & | other | ) |
Definition at line 67 of file qgsbookmarkmanager.cpp.
bool QgsBookmark::operator== | ( | const QgsBookmark & | other | ) |
Definition at line 62 of file qgsbookmarkmanager.cpp.
void QgsBookmark::setExtent | ( | const QgsReferencedRectangle & | extent | ) |
Sets the bookmark's spatial extent.
Definition at line 97 of file qgsbookmarkmanager.cpp.
void QgsBookmark::setGroup | ( | const QString & | group | ) |
Sets the bookmark's group, which is a user-visible string identifying the bookmark's category.
Definition at line 87 of file qgsbookmarkmanager.cpp.
void QgsBookmark::setId | ( | const QString & | id | ) |
void QgsBookmark::setName | ( | const QString & | name | ) |
Sets the bookmark's name, which is a user-visible string identifying the bookmark.
Definition at line 77 of file qgsbookmarkmanager.cpp.
QDomElement QgsBookmark::writeXml | ( | QDomDocument & | doc | ) | const |
Returns a DOM element representing the bookmark's properties.
Definition at line 51 of file qgsbookmarkmanager.cpp.