Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Cleanup comments and note that layers are deleted when removed from t…
…he registry

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8253 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 19, 2008
1 parent 1abef89 commit 6ad1474
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/core/qgsmaplayerregistry.h
Expand Up @@ -67,49 +67,41 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
QgsMapLayer * addMapLayer(QgsMapLayer * theMapLayer, bool theEmitSignal = TRUE);

/** Remove a layer from qgis
@note
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();

signals:

/** 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();

Expand Down

0 comments on commit 6ad1474

Please sign in to comment.