1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layertree/qgslayertree.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsLayerTree : QgsLayerTreeGroup
{
%Docstring(signature="appended")
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
:py:class:`QgsLayerTreeUtils` class.
%End
%TypeHeaderCode
#include "qgslayertree.h"
%End
public:
static bool isGroup( QgsLayerTreeNode *node );
%Docstring
Check whether the node is a valid group node
%End
static bool isLayer( const QgsLayerTreeNode *node );
%Docstring
Check whether the node is a valid layer node
%End
QgsLayerTree();
%Docstring
Create a new empty layer tree
%End
SIP_PYOBJECT __repr__();
%MethodCode
// override parent QgsLayerTreeGroup __repr__ and resort back to default repr for QgsLayerTree -- there's no extra useful context we can show
QString str = QStringLiteral( "<qgis._core.QgsLayerTree object at 0x%1>" ).arg( reinterpret_cast<quintptr>( sipCpp ), 2 * QT_POINTER_SIZE, 16, QLatin1Char( '0' ) );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
QList<QgsMapLayer *> customLayerOrder() const;
%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
:py:func:`~QgsLayerTree.layerOrder`.
.. seealso:: :py:func:`setCustomLayerOrder`
.. seealso:: :py:func:`layerOrder`
.. seealso:: :py:func:`hasCustomLayerOrder`
%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
:py:func:`~QgsLayerTree.layerOrder`.
.. seealso:: :py:func:`customLayerOrder`
.. seealso:: :py:func:`layerOrder`
.. seealso:: :py:func:`hasCustomLayerOrder`
%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
:py:func:`~QgsLayerTree.layerOrder`.
.. seealso:: :py:func:`customLayerOrder`
.. seealso:: :py:func:`layerOrder`
.. seealso:: :py:func:`hasCustomLayerOrder`
%End
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.
.. seealso:: :py:func:`customLayerOrder`
%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.
.. seealso:: :py:func:`customLayerOrder`
%End
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.
.. seealso:: :py:func:`setCustomLayerOrder`
%End
static QgsLayerTree *readXml( QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Load the layer tree from an XML element. It is not required that layers
are loaded at this point. :py:func:`~QgsLayerTree.resolveReferences`
needs to be called after loading the layers and before using the tree.
%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.
%End
virtual void writeXml( QDomElement &parentElement, const QgsReadWriteContext &context );
virtual QgsLayerTree *clone() const /Factory/;
void clear();
%Docstring
Clear any information from this layer tree.
%End
signals:
void customLayerOrderChanged();
%Docstring
Emitted when the custom layer order has changed.
%End
void layerOrderChanged();
%Docstring
Emitted when the layer order has changed.
%End
void hasCustomLayerOrderChanged( bool hasCustomLayerOrder );
%Docstring
Emitted when the hasCustomLayerOrder flag changes.
.. seealso:: :py:func:`hasCustomLayerOrder`
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layertree/qgslayertree.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|