Class: QgsBookmark¶
- class qgis.core.QgsBookmark¶
Bases:
sip.wrapper
Default constructor, creates an empty bookmark.
QgsBookmark(
QgsBookmark
)Represents a spatial bookmark, with a name, CRS and extent.
QgsBookmark
objects are typically used alongside theQgsBookmarkManager
class, which handles storage of a set of bookmarks.Methods
Returns the bookmark’s spatial extent.
Creates a bookmark using the properties from a DOM
element
.Returns the bookmark’s group, which is a user-visible string identifying the bookmark’s category.
Returns the bookmark’s unique ID.
Returns the bookmark’s name, which is a user-visible string identifying the bookmark.
Sets the bookmark’s spatial
extent
.Sets the bookmark’s
group
, which is a user-visible string identifying the bookmark’s category.Sets the bookmark’s unique
id
.Sets the bookmark’s
name
, which is a user-visible string identifying the bookmark.Returns a DOM element representing the bookmark’s properties.
- extent(self) → QgsReferencedRectangle¶
Returns the bookmark’s spatial extent.
See also
- Return type
- fromXml(element: QDomElement, doc: QDomDocument) → QgsBookmark¶
Creates a bookmark using the properties from a DOM
element
.See also
- Parameters
element (QDomElement) –
doc (QDomDocument) –
- Return type
- group(self) → str¶
Returns the bookmark’s group, which is a user-visible string identifying the bookmark’s category.
See also
- Return type
str
- name(self) → str¶
Returns the bookmark’s name, which is a user-visible string identifying the bookmark.
See also
- Return type
str
- setExtent(self, extent: QgsReferencedRectangle)¶
Sets the bookmark’s spatial
extent
.See also
- Parameters
extent (QgsReferencedRectangle) –
- setGroup(self, group: str)¶
Sets the bookmark’s
group
, which is a user-visible string identifying the bookmark’s category.See also
- Parameters
group (str) –
- setName(self, name: str)¶
Sets the bookmark’s
name
, which is a user-visible string identifying the bookmark.See also
- Parameters
name (str) –