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

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.