QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsMapLayerStyleOverride Class Reference

Restore overridden layer style on destruction. More...

#include <qgsmaplayerstyle.h>

Public Member Functions

 QgsMapLayerStyleOverride (QgsMapLayer *layer)
 Construct a style override object associated with a map layer.
 
 ~QgsMapLayerStyleOverride ()
 
void setOverrideStyle (const QString &style)
 Temporarily apply a different style to the layer.
 

Detailed Description

Restore overridden layer style on destruction.

Since
QGIS 3.2

Definition at line 80 of file qgsmaplayerstyle.h.

Constructor & Destructor Documentation

◆ QgsMapLayerStyleOverride()

QgsMapLayerStyleOverride::QgsMapLayerStyleOverride ( QgsMapLayer layer)
inline

Construct a style override object associated with a map layer.

The overridden style will be restored upon object destruction.

Definition at line 88 of file qgsmaplayerstyle.h.

◆ ~QgsMapLayerStyleOverride()

QgsMapLayerStyleOverride::~QgsMapLayerStyleOverride ( )

Definition at line 104 of file qgsmaplayerstyle.cpp.

Member Function Documentation

◆ setOverrideStyle()

void QgsMapLayerStyleOverride::setOverrideStyle ( const QString &  style)

Temporarily apply a different style to the layer.

The argument can be either a style name or a full QML style definition.

Definition at line 110 of file qgsmaplayerstyle.cpp.


The documentation for this class was generated from the following files: