Class: QgsStyleItemsListWidget

A reusable widget for showing a filtered list of entities from a QgsStyle database.

Added in version 3.10.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsStyleItemsListWidget

Base classes

QWidget

QObject

QPaintDevice

class qgis.gui.QgsStyleItemsListWidget[source]

Bases: QWidget

__init__(parent: QWidget | None)

Constructor for QgsStyleItemsListWidget, with the specified parent widget.

Parameters:

parent (Optional[QWidget])

currentEntityType(self) QgsStyle.StyleEntity[source]

Returns the type of the item currently selected in the widget.

Return type:

QgsStyle.StyleEntity

currentItemName(self) str[source]

Returns the name of the item currently selected in the widget.

Return type:

str

currentTagFilter(self) str[source]

Returns the current tag filter set for the widget, if any is set.

Return type:

str

signal saveEntity[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

signal selectionChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

signal selectionChangedWithStylePath[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

setEntityType(self, type: QgsStyle.StyleEntity)[source]

Sets the type of style entity to show in the widget.

See also

setSymbolType()

Parameters:

type (QgsStyle.StyleEntity)

setLayerType(self, type: Qgis.GeometryType)[source]

Sets the layer type to show in the widget. Set type to Qgis.GeometryType.Unknown if no layer type filter is desired.

This setting only applies to label settings and 3d style entities.

Parameters:

type (Qgis.GeometryType)

setStyle(self, style: QgsStyle | None)[source]

Sets the style database associated with the widget.

Ownership of style is not transferred, and the caller is responsible for ensuring that it exists for the lifetime of the widget.

Parameters:

style (Optional[QgsStyle])

setSymbolType(self, type: Qgis.SymbolType)[source]

Sets the type of symbols to show in the widget.

See also

setEntityType()

Parameters:

type (Qgis.SymbolType)