Class: QgsLayerTreeViewIndicator

class qgis.gui.QgsLayerTreeViewIndicator(parent: QObject = None)

Bases: PyQt5.QtCore.QObject

Constructs an indicator, optionally transferring ownership to a parent QObject

Indicator that can be used in a layer tree view to display icons next to items of the layer tree. They add extra context to the item and interactivity (using clicked() signal).

Indicators can be added/removed to individual layer tree items using QgsLayerTreeView.addIndicator() and QgsLayerTreeView.removeIndicator() calls.

New in version 3.2: Enums

Methods

childEvent

connectNotify

customEvent

disconnectNotify

icon

Indicator icon that will be displayed in the layer tree view

isSignalConnected

receivers

sender

senderSignalIndex

setIcon

Sets indicator icon that will be displayed in the layer tree view

setToolTip

Sets tool tip text

timerEvent

toolTip

Returns tool tip text that will be shown when user hovers mouse over the indicator

Signals

changed

Emitted when the indicator changes state (e.g.

clicked

Emitted when user clicks on the indicator [signal]

Attributes

changed

Emitted when the indicator changes state (e.g. icon).

New in version 3.10: [signal]

childEvent()
clicked

Emitted when user clicks on the indicator [signal]

connectNotify()
customEvent()
disconnectNotify()
icon(self) → QIcon

Indicator icon that will be displayed in the layer tree view

isSignalConnected()
receivers()
sender()
senderSignalIndex()
setIcon(self, icon: QIcon)

Sets indicator icon that will be displayed in the layer tree view

setToolTip(self, tip: str)

Sets tool tip text

timerEvent()
toolTip(self) → str

Returns tool tip text that will be shown when user hovers mouse over the indicator