QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgslayerdefinition.h
Go to the documentation of this file.
1 #ifndef QGSLAYERDEFINITION_H
2 #define QGSLAYERDEFINITION_H
3 
4 #include "qgslayertreegroup.h"
5 
13 class CORE_EXPORT QgsLayerDefinition
14 {
15  public:
16  /* Loads the QLR at path into QGIS. New layers are added to rootGroup and the map layer registry*/
17  static bool loadLayerDefinition( const QString & path, QgsLayerTreeGroup* rootGroup, QString &errorMessage );
18  /* Loads the QLR from the XML document. New layers are added to rootGroup and the map layer registry */
19  static bool loadLayerDefinition( QDomDocument doc, QgsLayerTreeGroup* rootGroup, QString &errorMessage );
20  /* Export the selected layer tree nodes to a QLR file */
21  static bool exportLayerDefinition( QString path, QList<QgsLayerTreeNode*> selectedTreeNodes, QString &errorMessage );
22 };
23 
24 #endif // QGSLAYERDEFINITION_H