Class: QgsLayerNotesUtils¶
Contains utility functions for working with layer notes.
Added in version 3.20.
Static Methods
Returns |
|
Returns the notes for the specified layer. |
|
Removes any notes for the specified layer. |
|
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
Trueif the specifiedlayerhas 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
notesfor the specifiedlayer, wherenotesis a HTML formatted string.- Parameters:
layer (Optional[QgsMapLayer])
notes (Optional[str])