mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
30 lines
926 B
Plaintext
30 lines
926 B
Plaintext
|
%ModuleHeaderCode
|
||
|
#include <qgslayertree.h>
|
||
|
%End
|
||
|
|
||
|
/**
|
||
|
* 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
|
||
|
*/
|
||
|
namespace QgsLayerTree
|
||
|
{
|
||
|
//! Check whether the node is a valid group node
|
||
|
bool isGroup( QgsLayerTreeNode* node );
|
||
|
|
||
|
//! Check whether the node is a valid layer node
|
||
|
bool isLayer( QgsLayerTreeNode* node );
|
||
|
|
||
|
//! Cast node to a group. No type checking is done - use isGroup() to find out whether this operation is legal.
|
||
|
// PYTHON: automatic cast
|
||
|
//inline QgsLayerTreeGroup* toGroup( QgsLayerTreeNode* node );
|
||
|
|
||
|
//! Cast node to a layer. No type checking is done - use isLayer() to find out whether this operation is legal.
|
||
|
// PYTHON: automatic cast
|
||
|
//inline QgsLayerTreeLayer* toLayer( QgsLayerTreeNode* node );
|
||
|
|
||
|
};
|