24 return layer->
customProperty( QStringLiteral(
"userNotes" ) ).toString();
32 if ( notes.isEmpty() )
43 return !layer->
customProperty( QStringLiteral(
"userNotes" ) ).toString().isEmpty();
static void setLayerNotes(QgsMapLayer *layer, const QString ¬es)
Sets the notes for the specified layer, where notes is a HTML formatted string.
static void removeNotes(QgsMapLayer *layer)
Removes any notes for the specified layer.
static bool layerHasNotes(const QgsMapLayer *layer)
Returns true if the specified layer has notes available.
static QString layerNotes(const QgsMapLayer *layer)
Returns the notes for the specified layer.
Base class for all map layer types.
Q_INVOKABLE QVariant customProperty(const QString &value, const QVariant &defaultValue=QVariant()) const
Read a custom property from layer.
void removeCustomProperty(const QString &key)
Remove a custom property from layer.
Q_INVOKABLE void setCustomProperty(const QString &key, const QVariant &value)
Set a custom property for layer.