Class: QgsLayerTreeViewDefaultActions

class qgis.gui.QgsLayerTreeViewDefaultActions

Bases: PyQt5.QtCore.QObject

The QgsLayerTreeViewDefaultActions class serves as a factory of actions that can be used together with a layer tree view.

See also

QgsLayerTreeView

New in version 2.4: Enums

Methods

actionAddGroup

actionCheckAndAllChildren

Action to check a group and all its children

actionCheckAndAllParents

Action to check a group and all its parents

actionGroupSelected

actionMakeTopLevel

Deprecated since version since: QGIS 3.2, use actionMoveOutOfGroup()

actionMoveOutOfGroup

See also

moveOutOfGroup()

actionMoveToTop

See also

moveToTop()

actionMutuallyExclusiveGroup

Action to enable/disable mutually exclusive flag of a group (only one child node may be checked)

actionRemoveGroupOrLayer

actionRenameGroupOrLayer

actionShowFeatureCount

actionShowInOverview

actionUncheckAndAllChildren

Action to uncheck a group and all its children

actionZoomToGroup

actionZoomToLayer

actionZoomToSelection

Action to zoom to selected features of a vector layer

addGroup

childEvent

connectNotify

customEvent

disconnectNotify

groupSelected

isSignalConnected

makeTopLevel

Deprecated since version since: QGIS 3.2, use moveOutOfGroup()

moveOutOfGroup

Moves selected layer(s) out of the group(s) and places this/these above the group(s)

moveToTop

Moves selected layer(s) and/or group(s) to the top of the layer panel or the top of the group if the layer/group is placed within a group.

mutuallyExclusiveGroup

Slot to enable/disable mutually exclusive group flag

receivers

removeGroupOrLayer

renameGroupOrLayer

sender

senderSignalIndex

showFeatureCount

showInOverview

timerEvent

uniqueGroupName

zoomToGroup

zoomToGroup(self)

zoomToLayer

zoomToLayer(self)

zoomToLayers

zoomToSelection

Signals

Attributes

actionAddGroup(self, parent: QObject = None) → QAction
actionCheckAndAllChildren(self, parent: QObject = None) → QAction

Action to check a group and all its children

actionCheckAndAllParents(self, parent: QObject = None) → QAction

Action to check a group and all its parents

actionGroupSelected(self, parent: QObject = None) → QAction
actionMakeTopLevel(self, parent: QObject = None) → QAction

Deprecated since version since: QGIS 3.2, use actionMoveOutOfGroup()

actionMoveOutOfGroup(self, parent: QObject = None) → QAction

See also

moveOutOfGroup()

New in version 3.2.

actionMoveToTop(self, parent: QObject = None) → QAction

See also

moveToTop()

New in version 3.2.

actionMutuallyExclusiveGroup(self, parent: QObject = None) → QAction

Action to enable/disable mutually exclusive flag of a group (only one child node may be checked)

New in version 2.12.

actionRemoveGroupOrLayer(self, parent: QObject = None) → QAction
actionRenameGroupOrLayer(self, parent: QObject = None) → QAction
actionShowFeatureCount(self, parent: QObject = None) → QAction
actionShowInOverview(self, parent: QObject = None) → QAction
actionUncheckAndAllChildren(self, parent: QObject = None) → QAction

Action to uncheck a group and all its children

actionZoomToGroup(self, canvas: QgsMapCanvas, parent: QObject = None) → QAction
actionZoomToLayer(self, canvas: QgsMapCanvas, parent: QObject = None) → QAction
actionZoomToSelection(self, canvas: QgsMapCanvas, parent: QObject = None) → QAction

Action to zoom to selected features of a vector layer

New in version 3.2.

addGroup(self)
childEvent()
connectNotify()
customEvent()
disconnectNotify()
groupSelected(self)
isSignalConnected()
makeTopLevel(self)

Deprecated since version since: QGIS 3.2, use moveOutOfGroup()

moveOutOfGroup(self)

Moves selected layer(s) out of the group(s) and places this/these above the group(s)

New in version 3.2.

moveToTop(self)

Moves selected layer(s) and/or group(s) to the top of the layer panel or the top of the group if the layer/group is placed within a group.

New in version 3.2.

mutuallyExclusiveGroup(self)

Slot to enable/disable mutually exclusive group flag

New in version 2.12.

receivers()
removeGroupOrLayer(self)
renameGroupOrLayer(self)
sender()
senderSignalIndex()
showFeatureCount(self)
showInOverview(self)
timerEvent()
uniqueGroupName(self, parentGroup: QgsLayerTreeGroup) → str
zoomToGroup(self, canvas: QgsMapCanvas)

zoomToGroup(self)

zoomToLayer(self, canvas: QgsMapCanvas)

zoomToLayer(self)

zoomToLayers(self, canvas: QgsMapCanvas, layers: Iterable[QgsMapLayer])
zoomToSelection(self, canvas: QgsMapCanvas)

New in version 3.2.

zoomToSelection(self) Slot to zoom to selected features of a vector layer

New in version 3.2.