QGIS API Documentation  2.99.0-Master (d55fa22)
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)
 
QAction * actionMakeTopLevel (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)
 
void zoomToGroup (QgsMapCanvas *canvas)
 
void zoomToLayer (QgsMapCanvas *canvas)
 

Protected Slots

void groupSelected ()
 
void makeTopLevel ()
 
void mutuallyExclusiveGroup ()
 Slot to enable/disable mutually exclusive group flag. More...
 
void removeGroupOrLayer ()
 
void renameGroupOrLayer ()
 
void showFeatureCount ()
 
void zoomToGroup ()
 
void zoomToLayer ()
 

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::QgsLayerTreeViewDefaultActions ( QgsLayerTreeView view)

Definition at line 28 of file qgslayertreeviewdefaultactions.cpp.

Member Function Documentation

◆ actionAddGroup()

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

Definition at line 34 of file qgslayertreeviewdefaultactions.cpp.

◆ actionCheckAndAllChildren()

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

Action to check a group and all its children.

Definition at line 126 of file qgslayertreeviewdefaultactions.cpp.

◆ actionCheckAndAllParents()

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

Action to check a group and all its parents.

Definition at line 146 of file qgslayertreeviewdefaultactions.cpp.

◆ actionGroupSelected()

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

Definition at line 106 of file qgslayertreeviewdefaultactions.cpp.

◆ actionMakeTopLevel()

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

Definition at line 99 of file qgslayertreeviewdefaultactions.cpp.

◆ actionMutuallyExclusiveGroup()

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 113 of file qgslayertreeviewdefaultactions.cpp.

◆ actionRemoveGroupOrLayer()

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

Definition at line 41 of file qgslayertreeviewdefaultactions.cpp.

◆ actionRenameGroupOrLayer()

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

Definition at line 61 of file qgslayertreeviewdefaultactions.cpp.

◆ actionShowFeatureCount()

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

Definition at line 68 of file qgslayertreeviewdefaultactions.cpp.

◆ actionShowInOverview()

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

Definition at line 48 of file qgslayertreeviewdefaultactions.cpp.

◆ actionUncheckAndAllChildren()

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

Action to uncheck a group and all its children.

Definition at line 136 of file qgslayertreeviewdefaultactions.cpp.

◆ actionZoomToGroup()

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

Definition at line 90 of file qgslayertreeviewdefaultactions.cpp.

◆ actionZoomToLayer()

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

Definition at line 81 of file qgslayertreeviewdefaultactions.cpp.

◆ addGroup

void QgsLayerTreeViewDefaultActions::addGroup ( )
slot

Definition at line 180 of file qgslayertreeviewdefaultactions.cpp.

◆ groupSelected

void QgsLayerTreeViewDefaultActions::groupSelected ( )
protectedslot

Definition at line 338 of file qgslayertreeviewdefaultactions.cpp.

◆ makeTopLevel

void QgsLayerTreeViewDefaultActions::makeTopLevel ( )
protectedslot

Definition at line 323 of file qgslayertreeviewdefaultactions.cpp.

◆ mutuallyExclusiveGroup

void QgsLayerTreeViewDefaultActions::mutuallyExclusiveGroup ( )
protectedslot

Slot to enable/disable mutually exclusive group flag.

Since
QGIS 2.12

Definition at line 363 of file qgslayertreeviewdefaultactions.cpp.

◆ removeGroupOrLayer

void QgsLayerTreeViewDefaultActions::removeGroupOrLayer ( )
protectedslot

Definition at line 190 of file qgslayertreeviewdefaultactions.cpp.

◆ renameGroupOrLayer

void QgsLayerTreeViewDefaultActions::renameGroupOrLayer ( )
protectedslot

Definition at line 199 of file qgslayertreeviewdefaultactions.cpp.

◆ showFeatureCount

void QgsLayerTreeViewDefaultActions::showFeatureCount ( )
protectedslot

Definition at line 214 of file qgslayertreeviewdefaultactions.cpp.

◆ showInOverview

void QgsLayerTreeViewDefaultActions::showInOverview ( )
slot

Definition at line 204 of file qgslayertreeviewdefaultactions.cpp.

◆ uniqueGroupName()

QString QgsLayerTreeViewDefaultActions::uniqueGroupName ( QgsLayerTreeGroup parentGroup)
protected

Definition at line 313 of file qgslayertreeviewdefaultactions.cpp.

◆ zoomToGroup() [1/2]

void QgsLayerTreeViewDefaultActions::zoomToGroup ( QgsMapCanvas canvas)

Definition at line 237 of file qgslayertreeviewdefaultactions.cpp.

◆ zoomToGroup [2/2]

void QgsLayerTreeViewDefaultActions::zoomToGroup ( )
protectedslot

Definition at line 259 of file qgslayertreeviewdefaultactions.cpp.

◆ zoomToLayer() [1/2]

void QgsLayerTreeViewDefaultActions::zoomToLayer ( QgsMapCanvas canvas)

Definition at line 226 of file qgslayertreeviewdefaultactions.cpp.

◆ zoomToLayer [2/2]

void QgsLayerTreeViewDefaultActions::zoomToLayer ( )
protectedslot

Definition at line 250 of file qgslayertreeviewdefaultactions.cpp.

◆ zoomToLayers()

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

Definition at line 269 of file qgslayertreeviewdefaultactions.cpp.

Member Data Documentation

◆ mView

QgsLayerTreeView* QgsLayerTreeViewDefaultActions::mView = nullptr
protected

Definition at line 100 of file qgslayertreeviewdefaultactions.h.


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