Skip to content

Commit

Permalink
Merge QgsMapLayerRegistry into QgsProject
Browse files Browse the repository at this point in the history
All methods/signals of QgsMapLayerRegistry moved verbatim to QgsProject.
  • Loading branch information
wonder-sk committed Dec 10, 2016
1 parent 8ec3eaf commit d56a97d
Show file tree
Hide file tree
Showing 277 changed files with 1,795 additions and 2,009 deletions.
1 change: 1 addition & 0 deletions doc/api_break.dox
Expand Up @@ -250,6 +250,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
- removeLegendLayerAction() moved to QgisInterface::removeCustomActionForLayerType()
- QgsLegendModel was removed.
- QgsMapCanvasMap. It is an internal class used by map canvas.
- QgsMapLayerRegistry. Its functionality has been moved to QgsProject.
- QgsMapRenderer. It has been replaced by QgsMapRendererJob with subclasses and QgsMapSettings.
- QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer.
- QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.
Expand Down
1 change: 0 additions & 1 deletion python/core/core.sip
Expand Up @@ -83,7 +83,6 @@
%Include qgsmaplayerlegend.sip
%Include qgsmaplayermodel.sip
%Include qgsmaplayerproxymodel.sip
%Include qgsmaplayerregistry.sip
%Include qgsmaplayerrenderer.sip
%Include qgsmaplayerstylemanager.sip
%Include qgsmaprenderercache.sip
Expand Down
2 changes: 1 addition & 1 deletion python/core/layertree/qgslayertreelayer.sip
Expand Up @@ -2,7 +2,7 @@
* Layer tree node points to a map layer.
*
* When using with existing QgsMapLayer instance, it is expected that the layer
* has been registered in QgsMapLayerRegistry earlier.
* has been registered in QgsProject earlier.
*
* The node can exist also without a valid instance of a layer (just ID). That
* means the referenced layer does not need to be loaded in order to use it
Expand Down
2 changes: 1 addition & 1 deletion python/core/layertree/qgslayertreeregistrybridge.sip
Expand Up @@ -17,7 +17,7 @@ class QgsLayerTreeRegistryBridge : QObject
%End

public:
explicit QgsLayerTreeRegistryBridge( QgsLayerTreeGroup* root, QObject *parent /TransferThis/ = 0 );
explicit QgsLayerTreeRegistryBridge( QgsLayerTreeGroup* root, QgsProject* project, QObject *parent /TransferThis/ = 0 );

void setEnabled( bool enabled );
bool isEnabled() const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmaplayer.sip
Expand Up @@ -54,7 +54,7 @@ class QgsMapLayer : QObject
*/
QgsMapLayer::LayerType type() const;

/** Returns the layer's unique ID, which is used to access this layer from QgsMapLayerRegistry. */
/** Returns the layer's unique ID, which is used to access this layer from QgsProject. */
QString id() const;

/**
Expand Down
297 changes: 0 additions & 297 deletions python/core/qgsmaplayerregistry.sip

This file was deleted.

2 changes: 1 addition & 1 deletion python/core/qgsmapsettings.sip
Expand Up @@ -55,7 +55,7 @@ class QgsMapSettings
//! Get list of layer IDs for map rendering
//! The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top)
QStringList layers() const;
//! Set list of layer IDs for map rendering. The layers must be registered in QgsMapLayerRegistry.
//! Set list of layer IDs for map rendering. The layers must be registered in QgsProject.
//! The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top)
void setLayers( const QStringList& layers );

Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmapthemecollection.sip
Expand Up @@ -61,7 +61,7 @@ class QgsMapThemeCollection : QObject

};

QgsMapThemeCollection();
QgsMapThemeCollection( QgsProject* project );

/**
* Returns whether a map theme with a matching name exists.
Expand Down

0 comments on commit d56a97d

Please sign in to comment.