Class: QgsMapLayerStyleModel

A model for display of styles from a QgsMapLayerStyleManager.

Also allows for renaming of styles.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.gui.QgsMapLayerStyleModel

Base classes

QAbstractListModel

QAbstractItemModel

QObject

Constructor

__init__

Methods

indexForName

Returns the model index corresponding to the specified style name.

class qgis.gui.QgsMapLayerStyleModel[source]

Bases: QAbstractListModel

__init__(manager: QgsMapLayerStyleManager | None, parent: QObject | None = None)

Constructor for QgsMapLayerStyleModel, showing styles from the specified manager.

Parameters:
indexForName(self, name: str | None) → QModelIndex[source]

Returns the model index corresponding to the specified style name.

Parameters:

name (str|None)

Return type:

QModelIndex