QGIS API Documentation  2.5.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.

bool QgsLayerTree::isLayer ( QgsLayerTreeNode node)
inline

Check whether the node is a valid layer node.

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.

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.