Skip to content
Browse files
Cleanup comments and note that layers are deleted when removed from t…
…he registry

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 19, 2008
1 parent 1da19fa commit 6209b6b1adb912375153eabdf649f832b263a25c
Showing with 3 additions and 11 deletions.
  1. +3 −11 src/core/qgsmaplayerregistry.h
@@ -67,49 +67,41 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
QgsMapLayer * addMapLayer(QgsMapLayer * theMapLayer, bool theEmitSignal = TRUE);

/** Remove a layer from qgis
As a side-effect QgsProject is made dirty.
Any canvases using that layer will need to remove it
theEmitSignal - see addMapLayer()
The layer being removed is deleted as well as the registry
table entry.
void removeMapLayer(QString theLayerId, bool theEmitSignal = TRUE);

/** Remove all registered layers
@note raises removedAll()
As a side-effect QgsProject is made dirty.
@note The layers are deleted as the registry is cleared!
void removeAllMapLayers();


/** emitted when a layer is removed from the registry
connected to main map canvas and overview map canvas remove()
void layerWillBeRemoved(QString theLayerId);

/** emitted when a layer is added to the registry
connected to main map canvas and overview map canvas addLayer()
void layerWasAdded(QgsMapLayer * theMapLayer);

/** emitted when ALL layers are removed at once
This could have been implemented by iteratively signalling
layerWillBeRemoved() for each layer as it is removed. However, this
generally causes a cascade of effects that are unnecessary if we're
ultimately removing all layers. E.g., removing the legend item
corresponding to the layer. Why bother doing that when you're just going
to clear everything anyway?
void removedAll();

0 comments on commit 6209b6b

Please sign in to comment.