Skip to content
Permalink
Browse files
sipify layer tree classes
  • Loading branch information
3nids committed Apr 25, 2017
1 parent 6b260ff commit 157709129eb7b4852ffb0e301e9b7e4a34f947cf
@@ -200,12 +200,6 @@ core/fieldformatter/qgslistfieldformatter.sip
core/fieldformatter/qgsrelationreferencefieldformatter.sip
core/fieldformatter/qgsvaluemapfieldformatter.sip
core/fieldformatter/qgsvaluerelationfieldformatter.sip
core/layertree/qgslayertree.sip
core/layertree/qgslayertreemodel.sip
core/layertree/qgslayertreemodellegendnode.sip
core/layertree/qgslayertreenode.sip
core/layertree/qgslayertreeregistrybridge.sip
core/layertree/qgslayertreeutils.sip
core/raster/qgsbilinearrasterresampler.sip
core/raster/qgsbrightnesscontrastfilter.sip
core/raster/qgscliptominmaxenhancement.sip
@@ -1,61 +1,188 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layertree/qgslayertree.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsLayerTree : QgsLayerTreeGroup
{
%TypeHeaderCode
#include <qgslayertree.h>
%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

%TypeHeaderCode
#include "qgslayertree.h"
%End
public:

static bool isGroup( QgsLayerTreeNode *node );
%Docstring
Check whether the node is a valid group node

.. versionadded:: 2.4
:rtype: bool
%End

static bool isLayer( const QgsLayerTreeNode *node );
%Docstring
Check whether the node is a valid layer node

.. versionadded:: 2.4
:rtype: bool
%End


//! 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 );

QgsLayerTree();
%Docstring
Create a new empty layer tree
%End

QList<QgsMapLayer *> customLayerOrder() const;
void setCustomLayerOrder( const QList<QgsMapLayer *> &customLayerOrder );
void setCustomLayerOrder( const QStringList &customLayerOrder ) /PyName=setCustomLayerOrderByIds/;
QList<QgsMapLayer *> layerOrder() const;
bool hasCustomLayerOrder() const;
void setHasCustomLayerOrder( bool hasCustomLayerOrder );
static QgsLayerTree *readXml( QDomElement &element );
%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().

\see setCustomLayerOrder
\see layerOrder
\see hasCustomLayerOrder

.. versionadded:: 3.0
:rtype: list of QgsMapLayer
%End

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().

\see customLayerOrder
\see layerOrder
\see hasCustomLayerOrder

.. versionadded:: 3.0
%End

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().

void readLayerOrderFromXml( const QDomElement &doc );
\see customLayerOrder
\see layerOrder
\see hasCustomLayerOrder

virtual void writeXml( QDomElement &parentElement );
.. versionadded:: 3.0
%End

virtual QgsLayerTree *clone() const;
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.

\see customLayerOrder

.. versionadded:: 3.0
:rtype: list of QgsMapLayer
%End

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.

\see customLayerOrder

.. versionadded:: 3.0
:rtype: bool
%End

void clear();
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.

signals:
\see setCustomLayerOrder

.. versionadded:: 3.0
%End

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

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.

.. versionadded:: 3.0
%End

void customLayerOrderChanged();
virtual void writeXml( QDomElement &parentElement );

virtual QgsLayerTree *clone() const;

void clear();
%Docstring
Clear any information from this layer tree.

.. versionadded:: 3.0
%End

signals:

void customLayerOrderChanged();
%Docstring
Emitted when the custom layer order has changed.

.. versionadded:: 3.0
%End

void layerOrderChanged();
%Docstring
Emitted when the layer order has changed.

.. versionadded:: 3.0
%End

void hasCustomLayerOrderChanged( bool hasCustomLayerOrder );
%Docstring
Emitted when the hasCustomLayerOrder flag changes.

\see hasCustomLayerOrder

.. versionadded:: 3.0
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layertree/qgslayertree.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Loading

0 comments on commit 1577091

Please sign in to comment.