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
New in version 2.4:
Methods
- param parent
Action to check a group and all its children
Action to check a group and all its parents
- param parent
Deprecated since version QGIS: 3.2
See also
See also
See also
Action to enable/disable mutually exclusive flag of a group (only one child node may be checked)
- param parent
- param parent
- param parent
- param parent
Action to uncheck a group and all its children
- param canvas
Action to zoom to the active layer from the layer tree.
Action to zoom to all the selected layer(s) in the layer tree
Action to zoom to selected features of a vector layer
Deprecated since version QGIS: 3.2
Moves selected layer(s) out of the group(s) and places this/these above the group(s)
Moves selected layer(s) and/or group(s) to the bottom of the layer panel or the bottom of the group if the layer/group is placed within a group.
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.
Slot to enable/disable mutually exclusive group flag
- param parentGroup
- param canvas
Zooms a map
canvas
to the extent of the active layer in the layer tree.Zooms a map
canvas
to all the selected layer(s) in the layer treeSee also
- actionAddGroup(self, parent: QObject = None) QAction ¶
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionCheckAndAllChildren(self, parent: QObject = None) QAction ¶
Action to check a group and all its children
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionCheckAndAllParents(self, parent: QObject = None) QAction ¶
Action to check a group and all its parents
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionGroupSelected(self, parent: QObject = None) QAction ¶
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionMakeTopLevel(self, parent: QObject = None) QAction ¶
Deprecated since version QGIS: 3.2 use
actionMoveOutOfGroup()
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionMoveOutOfGroup(self, parent: QObject = None) QAction ¶
See also
New in version 3.2.
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionMoveToBottom(self, parent: QObject = None) QAction ¶
See also
New in version 3.14.
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionMoveToTop(self, parent: QObject = None) QAction ¶
See also
New in version 3.2.
- Parameters
parent (QObject = None) –
- Return type
QAction
- 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.
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionRemoveGroupOrLayer(self, parent: QObject = None) QAction ¶
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionRenameGroupOrLayer(self, parent: QObject = None) QAction ¶
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionShowFeatureCount(self, parent: QObject = None) QAction ¶
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionShowInOverview(self, parent: QObject = None) QAction ¶
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionUncheckAndAllChildren(self, parent: QObject = None) QAction ¶
Action to uncheck a group and all its children
- Parameters
parent (QObject = None) –
- Return type
QAction
- actionZoomToGroup(self, canvas: QgsMapCanvas, parent: QObject = None) QAction ¶
- Parameters
canvas (QgsMapCanvas) –
parent (QObject = None) –
- Return type
QAction
- actionZoomToLayer(self, canvas: QgsMapCanvas, parent: QObject = None) QAction ¶
Action to zoom to the active layer from the layer tree.
Deprecated since version QGIS: 3.18 use
actionZoomToLayers()
- Parameters
canvas (QgsMapCanvas) –
parent (QObject = None) –
- Return type
QAction
- actionZoomToLayers(self, canvas: QgsMapCanvas, parent: QObject = None) QAction ¶
Action to zoom to all the selected layer(s) in the layer tree
New in version 3.18.
- Parameters
canvas (QgsMapCanvas) –
parent (QObject = None) –
- Return type
QAction
- actionZoomToSelection(self, canvas: QgsMapCanvas, parent: QObject = None) QAction ¶
Action to zoom to selected features of a vector layer
New in version 3.2.
- Parameters
canvas (QgsMapCanvas) –
parent (QObject = None) –
- Return type
QAction
- addGroup(self)¶
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- groupSelected(self)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- makeTopLevel(self)¶
Deprecated since version 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.
- moveToBottom(self)¶
Moves selected layer(s) and/or group(s) to the bottom of the layer panel or the bottom of the group if the layer/group is placed within a group.
New in version 3.14.
- 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(self, PYQT_SIGNAL) int ¶
- removeGroupOrLayer(self)¶
- renameGroupOrLayer(self)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- showFeatureCount(self)¶
- showInOverview(self)¶
- timerEvent(self, QTimerEvent)¶
- uniqueGroupName(self, parentGroup: QgsLayerTreeGroup) str ¶
- Parameters
parentGroup (QgsLayerTreeGroup) –
- Return type
str
- zoomToGroup(self, canvas: QgsMapCanvas)¶
- zoomToGroup(self) None
- Parameters
canvas (QgsMapCanvas) –
- zoomToLayer(self, canvas: QgsMapCanvas)¶
Zooms a map
canvas
to the extent of the active layer in the layer tree.Deprecated since version QGIS: 3.18 use
zoomToLayers()
zoomToLayer(self) Zooms to the extent of the active layer in the layer tree.
Deprecated since version QGIS: 3.18 use
zoomToLayers()
- Parameters
canvas (QgsMapCanvas) –
- zoomToLayers(self, canvas: QgsMapCanvas)¶
Zooms a map
canvas
to all the selected layer(s) in the layer treeSee also
New in version 3.18.
zoomToLayers(self) Zooms to the combined extent of all the selected layer(s) in the layer tree.
New in version 3.18.
zoomToLayers(self, canvas:
QgsMapCanvas
, layers: Iterable[QgsMapLayer])- Parameters
canvas (QgsMapCanvas) –
- zoomToSelection(self, canvas: QgsMapCanvas)¶
See also
New in version 3.2.
zoomToSelection(self) Zooms to the bounding box of all selected features of a vector layer.
New in version 3.2.
- Parameters
canvas (QgsMapCanvas) –