QgsLayerTreeViewDefaultActions class

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

Contents

Public functions

auto actionCheckAndAllChildren(QObject* parent = nullptr) -> QAction*
Action to check a group and all its children.
auto actionCheckAndAllParents(QObject* parent = nullptr) -> QAction*
Action to check a group and all its parents.
auto actionMakeTopLevel(QObject* parent = nullptr) -> Q_DECL_DEPRECATED QAction* deprecated
auto actionMoveOutOfGroup(QObject* parent = nullptr) -> QAction*
auto actionMoveToTop(QObject* parent = nullptr) -> QAction*
auto actionMutuallyExclusiveGroup(QObject* parent = nullptr) -> QAction*
Action to enable/disable mutually exclusive flag of a group (only one child node may be checked)
auto actionUncheckAndAllChildren(QObject* parent = nullptr) -> QAction*
Action to uncheck a group and all its children.
auto actionZoomToSelection(QgsMapCanvas* canvas, QObject* parent = nullptr) -> QAction*
Action to zoom to selected features of a vector layer.
void zoomToSelection(QgsMapCanvas* canvas)

Protected slots

auto makeTopLevel() -> Q_DECL_DEPRECATED void deprecated
void moveOutOfGroup()
Moves selected layer(s) out of the group(s) and places this/these above the group(s)
void 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.
void mutuallyExclusiveGroup()
Slot to enable/disable mutually exclusive group flag.
void zoomToSelection()
Slot to zoom to selected features of a vector layer.

Function documentation

Q_DECL_DEPRECATED QAction* QgsLayerTreeViewDefaultActions::actionMakeTopLevel(QObject* parent = nullptr)

QAction* QgsLayerTreeViewDefaultActions::actionMoveOutOfGroup(QObject* parent = nullptr)

QAction* QgsLayerTreeViewDefaultActions::actionMoveToTop(QObject* parent = nullptr)

QAction* QgsLayerTreeViewDefaultActions::actionMutuallyExclusiveGroup(QObject* parent = nullptr)

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

QAction* QgsLayerTreeViewDefaultActions::actionZoomToSelection(QgsMapCanvas* canvas, QObject* parent = nullptr)

Action to zoom to selected features of a vector layer.

void QgsLayerTreeViewDefaultActions::zoomToSelection(QgsMapCanvas* canvas)

Q_DECL_DEPRECATED void QgsLayerTreeViewDefaultActions::makeTopLevel() protected slot

void QgsLayerTreeViewDefaultActions::moveOutOfGroup() protected slot

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

void QgsLayerTreeViewDefaultActions::moveToTop() protected slot

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.

void QgsLayerTreeViewDefaultActions::mutuallyExclusiveGroup() protected slot

Slot to enable/disable mutually exclusive group flag.

void QgsLayerTreeViewDefaultActions::zoomToSelection() protected slot

Slot to zoom to selected features of a vector layer.