QGIS/python/core/layertree/qgslayertree.sip

189 lines
4.9 KiB
Plaintext
Raw Normal View History

2017-04-24 15:52:13 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layertree/qgslayertree.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2017-03-22 19:15:44 +01:00
class QgsLayerTree : QgsLayerTreeGroup
{
2017-04-24 15:52:13 +02:00
%Docstring
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.
.. versionadded:: 3.0
%End
2017-04-24 15:52:13 +02:00
%TypeHeaderCode
#include "qgslayertree.h"
%End
2017-03-23 09:01:52 +01:00
public:
2017-04-24 15:52:13 +02:00
2017-03-23 09:01:52 +01:00
static bool isGroup( QgsLayerTreeNode *node );
2017-04-24 15:52:13 +02:00
%Docstring
Check whether the node is a valid group node
.. versionadded:: 2.4
:rtype: bool
%End
2017-03-23 09:01:52 +01:00
static bool isLayer( const QgsLayerTreeNode *node );
2017-04-24 15:52:13 +02:00
%Docstring
Check whether the node is a valid layer node
.. versionadded:: 2.4
:rtype: bool
%End
2017-03-23 09:01:52 +01:00
2017-04-24 15:52:13 +02:00
QgsLayerTree();
%Docstring
Create a new empty layer tree
%End
2017-03-22 19:15:44 +01:00
QList<QgsMapLayer *> customLayerOrder() const;
2017-04-24 15:52:13 +02:00
%Docstring
The order in which layers will be rendered on the canvas.
Will only be used if the property hasCustomLayerOrder is true.
If you need the current layer order that is active, prefer using layerOrder().
2017-03-22 19:15:44 +01:00
2017-04-30 16:51:18 +02:00
.. seealso:: setCustomLayerOrder
.. seealso:: layerOrder
.. seealso:: hasCustomLayerOrder
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
:rtype: list of QgsMapLayer
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
void setCustomLayerOrder( const QList<QgsMapLayer *> &customLayerOrder );
%Docstring
The order in which layers will be rendered on the canvas.
Will only be used if the property hasCustomLayerOrder is true.
If you need the current layer order that is active, prefer using layerOrder().
2017-03-22 19:15:44 +01:00
2017-04-30 16:51:18 +02:00
.. seealso:: customLayerOrder
.. seealso:: layerOrder
.. seealso:: hasCustomLayerOrder
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
void setCustomLayerOrder( const QStringList &customLayerOrder ) /PyName=setCustomLayerOrderByIds/;
%Docstring
The order in which layers will be rendered on the canvas.
Will only be used if the property hasCustomLayerOrder is true.
If you need the current layer order that is active, prefer using layerOrder().
2017-03-22 19:15:44 +01:00
2017-04-30 16:51:18 +02:00
.. seealso:: customLayerOrder
.. seealso:: layerOrder
.. seealso:: hasCustomLayerOrder
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
QList<QgsMapLayer *> layerOrder() const;
%Docstring
The order in which layers will be rendered on the canvas.
Depending on hasCustomLayerOrder, this will return either the override
customLayerOrder or the layer order derived from the tree.
This property is read only.
2017-03-22 19:15:44 +01:00
2017-04-30 16:51:18 +02:00
.. seealso:: customLayerOrder
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
:rtype: list of QgsMapLayer
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
bool hasCustomLayerOrder() const;
%Docstring
Determines if the layer order should be derived from the layer tree
or if a custom override order shall be used instead.
2017-03-22 19:15:44 +01:00
2017-04-30 16:51:18 +02:00
.. seealso:: customLayerOrder
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
:rtype: bool
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
void setHasCustomLayerOrder( bool hasCustomLayerOrder );
%Docstring
Determines if the layer order should be derived from the layer tree
or if a custom override order shall be used instead.
2017-03-22 19:15:44 +01:00
2017-04-30 16:51:18 +02:00
.. seealso:: setCustomLayerOrder
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
static QgsLayerTree *readXml( QDomElement &element );
%Docstring
Load the layer tree from an XML element.
It is not required that layers are loaded at this point.
resolveReferences() needs to be called after loading the layers and
before using the tree.
.. versionadded:: 3.0
:rtype: QgsLayerTree
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
void readLayerOrderFromXml( const QDomElement &doc );
%Docstring
Load the layer order from an XML element.
Make sure that this is only called after the layers are loaded.
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
virtual void writeXml( QDomElement &parentElement );
2017-03-22 19:15:44 +01:00
2017-05-30 14:39:24 +02:00
virtual QgsLayerTree *clone() const /Factory/;
2017-04-24 15:52:13 +02:00
void clear();
%Docstring
Clear any information from this layer tree.
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
%End
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
signals:
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
void customLayerOrderChanged();
%Docstring
Emitted when the custom layer order has changed.
2017-03-22 19:15:44 +01:00
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
%End
2017-03-22 19:15:44 +01:00
void layerOrderChanged();
2017-04-24 15:52:13 +02:00
%Docstring
Emitted when the layer order has changed.
.. versionadded:: 3.0
%End
2017-03-22 19:15:44 +01:00
void hasCustomLayerOrderChanged( bool hasCustomLayerOrder );
2017-04-24 15:52:13 +02:00
%Docstring
Emitted when the hasCustomLayerOrder flag changes.
2017-04-30 16:51:18 +02:00
.. seealso:: hasCustomLayerOrder
2017-04-24 15:52:13 +02:00
.. versionadded:: 3.0
%End
};
2017-04-24 15:52:13 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layertree/qgslayertree.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/