16 #ifndef QGSMAPLAYERSTYLEMANAGER_H 17 #define QGSMAPLAYERSTYLEMANAGER_H 19 #include "qgis_core.h" 25 #include <QStringList> 73 void readXml(
const QDomElement &mgrElement );
75 void writeXml( QDomElement &mgrElement )
const;
78 QStringList styles()
const;
85 QMap<QString, QgsMapLayerStyle> mapLayerStyles()
const;
100 bool addStyleFromLayer(
const QString &name );
106 bool removeStyle(
const QString &name );
112 bool renameStyle(
const QString &name,
const QString &newName );
115 QString currentStyle()
const;
121 bool setCurrentStyle(
const QString &name );
128 bool setOverrideStyle(
const QString &styleDef );
130 bool restoreOverrideStyle();
137 bool isDefault(
const QString &styleName )
const;
141 void styleAdded(
const QString &name );
143 void styleRemoved(
const QString &name );
145 void styleRenamed(
const QString &oldName,
const QString &newName );
147 void currentStyleChanged(
const QString ¤tName );
151 QMap<QString, QgsMapLayerStyle> mStyles;
152 QString mCurrentStyle;
154 QString defaultStyleName()
const;
157 #endif // QGSMAPLAYERSTYLEMANAGER_H Base class for all map layer types.
Stores style information (renderer, opacity, labeling, diagrams etc.) applicable to a map layer...
QgsMapLayer * layer() const
Gets pointer to the associated map layer.
Management of styles for use with one map layer.