Class: QgsLayerNotesUtils

Contains utility functions for working with layer notes.

Added in version 3.20.

Static Methods

layerHasNotes

Returns True if the specified layer has notes available.

layerNotes

Returns the notes for the specified layer.

removeNotes

Removes any notes for the specified layer.

setLayerNotes

Sets the notes for the specified layer, where notes is a HTML formatted string.

class qgis.core.QgsLayerNotesUtils[source]

Bases: object

static layerHasNotes(layer: QgsMapLayer | None) bool[source]

Returns True if the specified layer has notes available.

Parameters:

layer (Optional[QgsMapLayer])

Return type:

bool

static layerNotes(layer: QgsMapLayer | None) str[source]

Returns the notes for the specified layer.

The returned string is a HTML formatted set of user notations for the layer.

Parameters:

layer (Optional[QgsMapLayer])

Return type:

str

static removeNotes(layer: QgsMapLayer | None)[source]

Removes any notes for the specified layer.

Parameters:

layer (Optional[QgsMapLayer])

static setLayerNotes(layer: QgsMapLayer | None, notes: str | None)[source]

Sets the notes for the specified layer, where notes is a HTML formatted string.

Parameters: