QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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.
bool isLayer (QgsLayerTreeNode *node)
 Check whether the node is a valid layer node.
QgsLayerTreeGrouptoGroup (QgsLayerTreeNode *node)
 Cast node to a group. No type checking is done - use isGroup() to find out whether this operation is legal.
QgsLayerTreeLayertoLayer (QgsLayerTreeNode *node)
 Cast node to a layer. No type checking is done - use isLayer() to find out whether this operation is legal.

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.