16#ifndef QGSMAPLAYERSTYLEMANAGER_H
17#define QGSMAPLAYERSTYLEMANAGER_H
73 void readXml(
const QDomElement &mgrElement );
75 void writeXml( QDomElement &mgrElement )
const;
78 QStringList styles()
const;
84 QMap<QString, QgsMapLayerStyle> mapLayerStyles()
const;
99 bool addStyleFromLayer(
const QString &name );
105 bool removeStyle(
const QString &name );
111 bool renameStyle(
const QString &name,
const QString &newName );
114 QString currentStyle()
const;
120 bool setCurrentStyle(
const QString &name );
127 bool setOverrideStyle(
const QString &styleDef );
129 bool restoreOverrideStyle();
135 static bool isDefault(
const QString &styleName );
157 QMap<QString, QgsMapLayerStyle> mStyles;
158 QString mCurrentStyle;
160 static QString defaultStyleName();
Management of styles for use with one map layer.
void styleAdded(const QString &name)
Emitted when a new style has been added.
void styleRenamed(const QString &oldName, const QString &newName)
Emitted when a style has been renamed.
QgsMapLayer * layer() const
Gets pointer to the associated map layer.
QgsMapLayerStyleManager(QgsMapLayer *layer)
Construct a style manager associated with a map layer (must not be nullptr).
void currentStyleChanged(const QString ¤tName)
Emitted when the current style has been changed.
void styleRemoved(const QString &name)
Emitted when a style has been removed.
Stores style information (renderer, opacity, labeling, diagrams etc.) applicable to a map layer.
Base class for all map layer types.