|
| QgsLayerTree () |
| Create a new empty layer tree. More...
|
|
void | clear () |
| Clear any information from this layer tree. More...
|
|
QgsLayerTree * | clone () const override |
| Create a copy of the node. Returns new instance. More...
|
|
QList< QgsMapLayer * > | customLayerOrder () const |
| The order in which layers will be rendered on the canvas. More...
|
|
bool | hasCustomLayerOrder () const |
| Determines if the layer order should be derived from the layer tree or if a custom override order shall be used instead. More...
|
|
QList< QgsMapLayer * > | layerOrder () const |
| The order in which layers will be rendered on the canvas. More...
|
|
void | readLayerOrderFromXml (const QDomElement &doc) |
| Load the layer order from an XML element. More...
|
|
void | setCustomLayerOrder (const QList< QgsMapLayer * > &customLayerOrder) |
| The order in which layers will be rendered on the canvas. More...
|
|
void | setCustomLayerOrder (const QStringList &customLayerOrder) |
| The order in which layers will be rendered on the canvas. More...
|
|
void | setHasCustomLayerOrder (bool hasCustomLayerOrder) |
| Determines if the layer order should be derived from the layer tree or if a custom override order shall be used instead. More...
|
|
void | writeXml (QDomElement &parentElement, const QgsReadWriteContext &context) override |
| Write layer tree to XML. More...
|
|
| QgsLayerTreeGroup (const QgsLayerTreeGroup &other) |
|
| QgsLayerTreeGroup (const QString &name=QString(), bool checked=true) |
| Constructor. More...
|
|
void | addChildNode (QgsLayerTreeNode *node) |
| Append an existing node. More...
|
|
QgsLayerTreeGroup * | addGroup (const QString &name) |
| Append a new group node with given name. More...
|
|
QgsLayerTreeLayer * | addLayer (QgsMapLayer *layer) |
| Append a new layer node for given map layer. More...
|
|
QgsLayerTreeGroup * | clone () const override |
| Returns a clone of the group. More...
|
|
QgsGroupLayer * | convertToGroupLayer (const QgsGroupLayer::LayerOptions &options) |
| Converts the group to a QgsGroupLayer. More...
|
|
QString | dump () const override |
| Returns text representation of the tree. More...
|
|
QgsLayerTreeGroup * | findGroup (const QString &name) |
| Find group node with specified name. More...
|
|
QList< QgsLayerTreeGroup * > | findGroups (bool recursive=false) const |
| Find group layer nodes. More...
|
|
QgsLayerTreeLayer * | findLayer (const QString &layerId) const |
| Find layer node representing the map layer specified by its ID. More...
|
|
QgsLayerTreeLayer * | findLayer (QgsMapLayer *layer) const |
| Find layer node representing the map layer. More...
|
|
QStringList | findLayerIds () const |
| Find layer IDs used in all layer nodes. More...
|
|
QList< QgsLayerTreeLayer * > | findLayers () const |
| Find all layer nodes. More...
|
|
QgsGroupLayer * | groupLayer () |
| Returns a reference to the associated group layer, if the layer tree group will be treated as group layer during map rendering. More...
|
|
void | insertChildNode (int index, QgsLayerTreeNode *node) |
| Insert existing node at specified position. More...
|
|
void | insertChildNodes (int index, const QList< QgsLayerTreeNode * > &nodes) |
| Insert existing nodes at specified position. More...
|
|
QgsLayerTreeGroup * | insertGroup (int index, const QString &name) |
| Insert a new group node with given name at specified position. More...
|
|
QgsLayerTreeLayer * | insertLayer (int index, QgsMapLayer *layer) |
| Insert a new layer node for given map layer at specified position. More...
|
|
bool | isMutuallyExclusive () const |
| Returns whether the group is mutually exclusive (only one child can be checked at a time) More...
|
|
QList< QgsMapLayer * > | layerOrderRespectingGroupLayers () const |
| Returns an ordered list of map layers in the group, ignoring any layers which are child layers of QgsGroupLayers. More...
|
|
QString | name () const override |
| Returns the group's name. More...
|
|
void | readChildrenFromXml (QDomElement &element, const QgsReadWriteContext &context) |
| Read children from XML and append them to the group. More...
|
|
void | removeAllChildren () |
| Remove all child nodes. More...
|
|
void | removeChildNode (QgsLayerTreeNode *node) |
| Remove a child node from this group. More...
|
|
void | removeChildren (int from, int count) |
| Remove child nodes from index "from". More...
|
|
void | removeChildrenGroupWithoutLayers () |
| Remove all child group nodes without layers. More...
|
|
void | removeLayer (QgsMapLayer *layer) |
| Remove map layer's node from this group. More...
|
|
void | resolveReferences (const QgsProject *project, bool looseMatching=false) override |
| Calls resolveReferences() on child tree nodes. More...
|
|
void | setGroupLayer (QgsGroupLayer *layer) |
| Sets the associated group layer, if the layer tree group will be treated as group layer during map rendering. More...
|
|
void | setIsMutuallyExclusive (bool enabled, int initialChildIndex=-1) |
| Set whether the group is mutually exclusive (only one child can be checked at a time). More...
|
|
void | setItemVisibilityCheckedRecursive (bool checked) override |
| Check or uncheck a node and all its children (taking into account exclusion rules) More...
|
|
void | setName (const QString &n) override |
| Sets the group's name. More...
|
|
void | writeXml (QDomElement &parentElement, const QgsReadWriteContext &context) override |
| Write group (tree) as XML element <layer-tree-group> and add it to the given parent element. More...
|
|
| ~QgsLayerTreeNode () override |
|
QList< QgsLayerTreeNode * > | abandonChildren () |
| Removes the childrens, disconnect all the forwarded and external signals and sets their parent to nullptr . More...
|
|
QList< QgsMapLayer * > | checkedLayers () const |
| Returns a list of any checked layers which belong to this node or its children. More...
|
|
QList< QgsLayerTreeNode * > | children () |
| Gets list of children of the node. Children are owned by the parent. More...
|
|
QList< QgsLayerTreeNode * > | children () const |
| Gets list of children of the node. Children are owned by the parent. More...
|
|
virtual QgsLayerTreeNode * | clone () const =0 |
| Create a copy of the node. Returns new instance. More...
|
|
QStringList | customProperties () const |
| Returns list of keys stored in custom properties. More...
|
|
QVariant | customProperty (const QString &key, const QVariant &defaultValue=QVariant()) const |
| Read a custom property from layer. Properties are stored in a map and saved in project file. More...
|
|
int | depth () const |
| Returns the depth of this node, i.e. More...
|
|
virtual QString | dump () const =0 |
| Returns string with layer tree structure. For debug purposes only. More...
|
|
bool | isExpanded () const |
| Returns whether the node should be shown as expanded or collapsed in GUI. More...
|
|
bool | isItemVisibilityCheckedRecursive () const |
| Returns whether this node is checked and all its children. More...
|
|
bool | isItemVisibilityUncheckedRecursive () const |
| Returns whether this node is unchecked and all its children. More...
|
|
bool | isVisible () const |
| Returns whether a node is really visible (ie checked and all its ancestors checked as well) More...
|
|
bool | itemVisibilityChecked () const |
| Returns whether a node is checked (independently of its ancestors or children) More...
|
|
virtual QString | name () const =0 |
| Returns name of the node. More...
|
|
NodeType | nodeType () const |
| Find out about type of the node. It is usually shorter to use convenience functions from QgsLayerTree namespace for that. More...
|
|
QgsLayerTreeNode * | parent () |
| Gets pointer to the parent. If parent is nullptr , the node is a root node. More...
|
|
void | removeCustomProperty (const QString &key) |
| Remove a custom property from layer. Properties are stored in a map and saved in project file. More...
|
|
virtual void | resolveReferences (const QgsProject *project, bool looseMatching=false)=0 |
| Turn textual references to layers into map layer object from project. More...
|
|
void | setCustomProperty (const QString &key, const QVariant &value) |
| Sets a custom property for the node. Properties are stored in a map and saved in project file. More...
|
|
void | setExpanded (bool expanded) |
| Sets whether the node should be shown as expanded or collapsed in GUI. More...
|
|
void | setItemVisibilityChecked (bool checked) |
| Check or uncheck a node (independently of its ancestors or children) More...
|
|
void | setItemVisibilityCheckedParentRecursive (bool checked) |
| Check or uncheck a node and all its parents. More...
|
|
virtual void | setItemVisibilityCheckedRecursive (bool checked) |
| Check or uncheck a node and all its children (taking into account exclusion rules) More...
|
|
virtual void | setName (const QString &name)=0 |
| Set name of the node. More...
|
|
bool | takeChild (QgsLayerTreeNode *node) |
| Remove a child from a node. More...
|
|
virtual void | writeXml (QDomElement &parentElement, const QgsReadWriteContext &context)=0 |
| Write layer tree to XML. More...
|
|