Class: QgsLayerNotesUtils¶
- class qgis.core.QgsLayerNotesUtils¶
Bases:
sip.wrapper
Contains utility functions for working with layer notes.
New in version 3.20:
Methods
Returns
True
if the specifiedlayer
has notes available.Returns the notes for the specified
layer
.Removes any notes for the specified
layer
.Sets the
notes
for the specifiedlayer
, wherenotes
is a HTML formatted string.- layerHasNotes(layer: QgsMapLayer) bool ¶
Returns
True
if the specifiedlayer
has notes available.- Parameters:
layer (QgsMapLayer) –
- Return type:
bool
- layerNotes(layer: QgsMapLayer) str ¶
Returns the notes for the specified
layer
.The returned string is a HTML formatted set of user notations for the layer.
- Parameters:
layer (QgsMapLayer) –
- Return type:
str
- removeNotes(layer: QgsMapLayer)¶
Removes any notes for the specified
layer
.- Parameters:
layer (QgsMapLayer) –
- setLayerNotes(layer: QgsMapLayer, notes: str)¶
Sets the
notes
for the specifiedlayer
, wherenotes
is a HTML formatted string.- Parameters:
layer (QgsMapLayer) –
notes (str) –