QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
QgsLayerTreeViewDefaultActions Class Reference

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

#include <qgslayertreeviewdefaultactions.h>

Inheritance diagram for QgsLayerTreeViewDefaultActions:
Inheritance graph
[legend]

Public Slots

void addGroup ()
 
void showInOverview ()
 

Public Member Functions

 QgsLayerTreeViewDefaultActions (QgsLayerTreeView *view)
 
QAction * actionAddGroup (QObject *parent=nullptr)
 
QAction * actionCheckAndAllChildren (QObject *parent=nullptr)
 Action to check a group and all its children. More...
 
QAction * actionCheckAndAllParents (QObject *parent=nullptr)
 Action to check a group and all its parents. More...
 
QAction * actionGroupSelected (QObject *parent=nullptr)
 
Q_DECL_DEPRECATED QAction * actionMakeTopLevel (QObject *parent=nullptr)
 
QAction * actionMoveOutOfGroup (QObject *parent=nullptr)
 
QAction * actionMoveToTop (QObject *parent=nullptr)
 
QAction * actionMutuallyExclusiveGroup (QObject *parent=nullptr)
 Action to enable/disable mutually exclusive flag of a group (only one child node may be checked) More...
 
QAction * actionRemoveGroupOrLayer (QObject *parent=nullptr)
 
QAction * actionRenameGroupOrLayer (QObject *parent=nullptr)
 
QAction * actionShowFeatureCount (QObject *parent=nullptr)
 
QAction * actionShowInOverview (QObject *parent=nullptr)
 
QAction * actionUncheckAndAllChildren (QObject *parent=nullptr)
 Action to uncheck a group and all its children. More...
 
QAction * actionZoomToGroup (QgsMapCanvas *canvas, QObject *parent=nullptr)
 
QAction * actionZoomToLayer (QgsMapCanvas *canvas, QObject *parent=nullptr)
 
QAction * actionZoomToSelection (QgsMapCanvas *canvas, QObject *parent=nullptr)
 Action to zoom to selected features of a vector layer. More...
 
void zoomToGroup (QgsMapCanvas *canvas)
 
void zoomToLayer (QgsMapCanvas *canvas)
 
void zoomToSelection (QgsMapCanvas *canvas)
 

Protected Slots

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

Protected Member Functions

QString uniqueGroupName (QgsLayerTreeGroup *parentGroup)
 
void zoomToLayers (QgsMapCanvas *canvas, const QList< QgsMapLayer * > &layers)
 

Protected Attributes

QgsLayerTreeViewmView = nullptr
 

Detailed Description

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

See also
QgsLayerTreeView
Since
QGIS 2.4

Definition at line 39 of file qgslayertreeviewdefaultactions.h.

Constructor & Destructor Documentation

QgsLayerTreeViewDefaultActions::QgsLayerTreeViewDefaultActions ( QgsLayerTreeView view)

Definition at line 28 of file qgslayertreeviewdefaultactions.cpp.

Member Function Documentation

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

Definition at line 34 of file qgslayertreeviewdefaultactions.cpp.

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

Action to check a group and all its children.

Definition at line 161 of file qgslayertreeviewdefaultactions.cpp.

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

Action to check a group and all its parents.

Definition at line 189 of file qgslayertreeviewdefaultactions.cpp.

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

Definition at line 141 of file qgslayertreeviewdefaultactions.cpp.

QAction * QgsLayerTreeViewDefaultActions::actionMakeTopLevel ( QObject *  parent = nullptr)
Deprecated:
since QGIS 3.2, use actionMoveOutOfGroup()

Definition at line 118 of file qgslayertreeviewdefaultactions.cpp.

QAction * QgsLayerTreeViewDefaultActions::actionMoveOutOfGroup ( QObject *  parent = nullptr)
See also
moveOutOfGroup()
Since
QGIS 3.2

Definition at line 127 of file qgslayertreeviewdefaultactions.cpp.

QAction * QgsLayerTreeViewDefaultActions::actionMoveToTop ( QObject *  parent = nullptr)
See also
moveToTop()
Since
QGIS 3.2

Definition at line 134 of file qgslayertreeviewdefaultactions.cpp.

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

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

Since
QGIS 2.12

Definition at line 148 of file qgslayertreeviewdefaultactions.cpp.

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

Definition at line 41 of file qgslayertreeviewdefaultactions.cpp.

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

Definition at line 61 of file qgslayertreeviewdefaultactions.cpp.

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

Definition at line 78 of file qgslayertreeviewdefaultactions.cpp.

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

Definition at line 48 of file qgslayertreeviewdefaultactions.cpp.

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

Action to uncheck a group and all its children.

Definition at line 175 of file qgslayertreeviewdefaultactions.cpp.

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

Definition at line 109 of file qgslayertreeviewdefaultactions.cpp.

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

Definition at line 91 of file qgslayertreeviewdefaultactions.cpp.

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

Action to zoom to selected features of a vector layer.

Since
QGIS 3.2

Definition at line 100 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::addGroup ( )
slot

Definition at line 223 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::groupSelected ( )
protectedslot

Definition at line 443 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::makeTopLevel ( )
protectedslot
Deprecated:
since QGIS 3.2, use moveOutOfGroup()

Definition at line 383 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::moveOutOfGroup ( )
protectedslot

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

Since
QGIS 3.2

Definition at line 398 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::moveToTop ( )
protectedslot

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.

Since
QGIS 3.2

Definition at line 420 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::mutuallyExclusiveGroup ( )
protectedslot

Slot to enable/disable mutually exclusive group flag.

Since
QGIS 2.12

Definition at line 469 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::removeGroupOrLayer ( )
protectedslot

Definition at line 233 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::renameGroupOrLayer ( )
protectedslot

Definition at line 242 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::showFeatureCount ( )
protectedslot

Definition at line 257 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::showInOverview ( )
slot

Definition at line 247 of file qgslayertreeviewdefaultactions.cpp.

QString QgsLayerTreeViewDefaultActions::uniqueGroupName ( QgsLayerTreeGroup parentGroup)
protected

Definition at line 373 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::zoomToGroup ( QgsMapCanvas canvas)

Definition at line 289 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::zoomToGroup ( )
protectedslot

Definition at line 319 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::zoomToLayer ( QgsMapCanvas canvas)

Definition at line 269 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::zoomToLayer ( )
protectedslot

Definition at line 302 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::zoomToLayers ( QgsMapCanvas canvas,
const QList< QgsMapLayer * > &  layers 
)
protected

Definition at line 329 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::zoomToSelection ( QgsMapCanvas canvas)
See also
zoomToSelection()
Since
QGIS 3.2

Definition at line 280 of file qgslayertreeviewdefaultactions.cpp.

void QgsLayerTreeViewDefaultActions::zoomToSelection ( )
protectedslot

Slot to zoom to selected features of a vector layer.

Since
QGIS 3.2

Definition at line 311 of file qgslayertreeviewdefaultactions.cpp.

Member Data Documentation

QgsLayerTreeView* QgsLayerTreeViewDefaultActions::mView = nullptr
protected

Definition at line 155 of file qgslayertreeviewdefaultactions.h.


The documentation for this class was generated from the following files: