Class: QgsStyleItemsListWidget¶
A reusable widget for showing a filtered list of entities from a
QgsStyle
database.
Added in version 3.10.
Class Hierarchy¶
Base classes¶
Methods
Returns the type of the item currently selected in the widget. |
|
Returns the name of the item currently selected in the widget. |
|
Returns the current tag filter set for the widget, if any is set. |
|
Sets the type of style entity to show in the widget. |
|
Sets the layer type to show in the widget. |
|
Sets the style database associated with the widget. |
|
Sets the type of symbols to show in the widget. |
Signals
Emitted when the user has opted to save a new entity to the style database, by clicking the "Save" button in the widget. |
|
Emitted when the selected item is changed in the widget. |
|
Emitted when the selected item is changed in the widget. |
- 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.
See also
- Return type:
- currentItemName(self) str [source]¶
Returns the name of the item currently selected in the widget.
See also
- 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]¶
Emitted when the user has opted to save a new entity to the style database, by clicking the “Save” button in the widget.
It is the caller’s responsibility to handle this in an appropriate manner given the context of the widget.
- signal selectionChanged(name: str, type: QgsStyle.StyleEntity)[source]¶
Emitted when the selected item is changed in the widget.
- Parameters:
name (str) – Newly selected item name
type (QgsStyle.StyleEntity) – Newly selected item type
- signal selectionChangedWithStylePath(name: str, type: QgsStyle.StyleEntity, stylePath: str)[source]¶
Emitted when the selected item is changed in the widget.
- Parameters:
name (str) – Newly selected item name
type (QgsStyle.StyleEntity) – Newly selected item type
stylePath (str) – file path to associated style database
Added in version 3.26.
- setEntityType(self, type: QgsStyle.StyleEntity)[source]¶
Sets the
type
of style entity to show in the widget.See also
- Parameters:
type (QgsStyle.StyleEntity)
- setLayerType(self, type: Qgis.GeometryType)[source]¶
Sets the layer
type
to show in the widget. Settype
toQgis
.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
- Parameters:
type (Qgis.SymbolType)