@@ -67,49 +67,41 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
67
67
QgsMapLayer * addMapLayer (QgsMapLayer * theMapLayer, bool theEmitSignal = TRUE );
68
68
69
69
/* * Remove a layer from qgis
70
-
71
70
@note
72
-
73
71
As a side-effect QgsProject is made dirty.
74
-
75
72
Any canvases using that layer will need to remove it
76
-
77
73
theEmitSignal - see addMapLayer()
74
+ The layer being removed is deleted as well as the registry
75
+ table entry.
78
76
*/
79
77
void removeMapLayer (QString theLayerId, bool theEmitSignal = TRUE );
80
78
81
79
/* * Remove all registered layers
82
-
83
80
@note raises removedAll()
84
-
85
81
As a side-effect QgsProject is made dirty.
86
-
82
+ @note The layers are deleted as the registry is cleared!
87
83
*/
88
84
void removeAllMapLayers ();
89
85
90
86
signals:
91
87
92
88
/* * emitted when a layer is removed from the registry
93
-
94
89
connected to main map canvas and overview map canvas remove()
95
90
*/
96
91
void layerWillBeRemoved (QString theLayerId);
97
92
98
93
/* * emitted when a layer is added to the registry
99
-
100
94
connected to main map canvas and overview map canvas addLayer()
101
95
*/
102
96
void layerWasAdded (QgsMapLayer * theMapLayer);
103
97
104
98
/* * emitted when ALL layers are removed at once
105
-
106
99
This could have been implemented by iteratively signalling
107
100
layerWillBeRemoved() for each layer as it is removed. However, this
108
101
generally causes a cascade of effects that are unnecessary if we're
109
102
ultimately removing all layers. E.g., removing the legend item
110
103
corresponding to the layer. Why bother doing that when you're just going
111
104
to clear everything anyway?
112
-
113
105
*/
114
106
void removedAll ();
115
107
0 commit comments