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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
- removeLegendLayerAction() moved to QgisInterface::removeCustomActionForLayerType() - removeLegendLayerAction() moved to QgisInterface::removeCustomActionForLayerType()
- QgsLegendModel was removed. - QgsLegendModel was removed.
- QgsMapCanvasMap. It is an internal class used by map canvas. - 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. - 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. - QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer.
- QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead. - QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.
Expand Down
1 change: 0 additions & 1 deletion python/core/core.sip
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
%Include qgsmaplayerlegend.sip %Include qgsmaplayerlegend.sip
%Include qgsmaplayermodel.sip %Include qgsmaplayermodel.sip
%Include qgsmaplayerproxymodel.sip %Include qgsmaplayerproxymodel.sip
%Include qgsmaplayerregistry.sip
%Include qgsmaplayerrenderer.sip %Include qgsmaplayerrenderer.sip
%Include qgsmaplayerstylemanager.sip %Include qgsmaplayerstylemanager.sip
%Include qgsmaprenderercache.sip %Include qgsmaprenderercache.sip
Expand Down
2 changes: 1 addition & 1 deletion python/core/layertree/qgslayertreelayer.sip
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Layer tree node points to a map layer. * Layer tree node points to a map layer.
* *
* When using with existing QgsMapLayer instance, it is expected that the 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 * 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 * 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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class QgsLayerTreeRegistryBridge : QObject
%End %End


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


void setEnabled( bool enabled ); void setEnabled( bool enabled );
bool isEnabled() const; bool isEnabled() const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmaplayer.sip
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class QgsMapLayer : QObject
*/ */
QgsMapLayer::LayerType type() const; 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; 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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class QgsMapSettings
//! Get list of layer IDs for map rendering //! 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) //! The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top)
QStringList layers() const; 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) //! 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 ); void setLayers( const QStringList& layers );


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


}; };


QgsMapThemeCollection(); QgsMapThemeCollection( QgsProject* project );


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

0 comments on commit d56a97d

Please sign in to comment.