QGIS API Documentation
3.4.15-Madeira (e83d02e274)
|
Listens to the updates in map layer registry and does changes in layer tree. More...
#include <qgslayertreeregistrybridge.h>
Signals | |
void | addedLayersToLayerTree (const QList< QgsMapLayer * > &layers) |
Tell others we have just added layers to the tree (used in QGIS to auto-select first newly added layer) More... | |
Public Member Functions | |
QgsLayerTreeRegistryBridge (QgsLayerTreeGroup *root, QgsProject *project, QObject *parent=nullptr) | |
Create the instance that synchronizes given project with a layer tree root. More... | |
bool | isEnabled () const |
bool | newLayersVisible () const |
void | setEnabled (bool enabled) |
void | setLayerInsertionPoint (QgsLayerTreeGroup *parentGroup, int index) |
Set where the new layers should be inserted - can be used to follow current selection. More... | |
void | setNewLayersVisible (bool enabled) |
Protected Slots | |
void | groupRemovedChildren () |
void | groupWillRemoveChildren (QgsLayerTreeNode *node, int indexFrom, int indexTo) |
void | layersAdded (const QList< QgsMapLayer * > &layers) |
void | layersWillBeRemoved (const QStringList &layerIds) |
void | removeLayersFromRegistry (const QStringList &layerIds) |
Protected Attributes | |
bool | mEnabled |
QgsLayerTreeGroup * | mInsertionPointGroup = nullptr |
int | mInsertionPointIndex |
QStringList | mLayerIdsForRemoval |
bool | mNewLayersVisible |
QgsProject * | mProject = nullptr |
bool | mRegistryRemovingLayers |
QgsLayerTreeGroup * | mRoot = nullptr |
Listens to the updates in map layer registry and does changes in layer tree.
When connected to a layer tree, any layers added to the map layer registry will be also added to the layer tree. Similarly, map layers that are removed from registry will be removed from the layer tree.
If a layer is completely removed from the layer tree, it will be also removed from the map layer registry.
Definition at line 44 of file qgslayertreeregistrybridge.h.
|
explicit |
Create the instance that synchronizes given project with a layer tree root.
Definition at line 23 of file qgslayertreeregistrybridge.cpp.
|
signal |
Tell others we have just added layers to the tree (used in QGIS to auto-select first newly added layer)
|
protectedslot |
Definition at line 126 of file qgslayertreeregistrybridge.cpp.
|
protectedslot |
Definition at line 113 of file qgslayertreeregistrybridge.cpp.
|
inline |
Definition at line 52 of file qgslayertreeregistrybridge.h.
|
protectedslot |
Definition at line 46 of file qgslayertreeregistrybridge.cpp.
|
protectedslot |
Definition at line 75 of file qgslayertreeregistrybridge.cpp.
|
inline |
Definition at line 55 of file qgslayertreeregistrybridge.h.
|
protectedslot |
Definition at line 147 of file qgslayertreeregistrybridge.cpp.
|
inline |
Definition at line 51 of file qgslayertreeregistrybridge.h.
void QgsLayerTreeRegistryBridge::setLayerInsertionPoint | ( | QgsLayerTreeGroup * | parentGroup, |
int | index | ||
) |
Set where the new layers should be inserted - can be used to follow current selection.
By default it is root group with zero index.
Definition at line 40 of file qgslayertreeregistrybridge.cpp.
|
inline |
Definition at line 54 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 85 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 88 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 89 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 83 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 86 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 82 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 84 of file qgslayertreeregistrybridge.h.
|
protected |
Definition at line 81 of file qgslayertreeregistrybridge.h.