QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
QgsLayerTree Namespace Reference

Namespace with helper functions for layer tree operations. More...

Functions

bool isGroup (QgsLayerTreeNode *node)
 Check whether the node is a valid group node. More...
 
bool isLayer (QgsLayerTreeNode *node)
 Check whether the node is a valid layer node. More...
 
QgsLayerTreeGrouptoGroup (QgsLayerTreeNode *node)
 Cast node to a group. No type checking is done - use isGroup() to find out whether this operation is legal. More...
 
QgsLayerTreeLayertoLayer (QgsLayerTreeNode *node)
 Cast node to a layer. No type checking is done - use isLayer() to find out whether this operation is legal. More...
 

Detailed Description

Namespace with helper functions for layer tree operations.

Only generally useful routines should be here. Miscellaneous utility functions for work with the layer tree are in QgsLayerTreeUtils class.

Note
added in 2.4

Function Documentation

bool QgsLayerTree::isGroup ( QgsLayerTreeNode node)
inline

Check whether the node is a valid group node.

Definition at line 34 of file qgslayertree.h.

bool QgsLayerTree::isLayer ( QgsLayerTreeNode node)
inline

Check whether the node is a valid layer node.

Definition at line 40 of file qgslayertree.h.

QgsLayerTreeGroup* QgsLayerTree::toGroup ( QgsLayerTreeNode node)
inline

Cast node to a group. No type checking is done - use isGroup() to find out whether this operation is legal.

Definition at line 46 of file qgslayertree.h.

QgsLayerTreeLayer* QgsLayerTree::toLayer ( QgsLayerTreeNode node)
inline

Cast node to a layer. No type checking is done - use isLayer() to find out whether this operation is legal.

Definition at line 52 of file qgslayertree.h.