Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project refactoring - part I #3855

Merged
merged 7 commits into from
Dec 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
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 Expand Up @@ -526,6 +527,7 @@ QgsComposerLegendItem {#qgis_api_break_3_0_QgsComposerLegendItem}
QgsComposerMap {#qgis_api_break_3_0_QgsComposerMap}
--------------

- layerSet() and setLayerSet() have been replaced by layers() and setLayers() which work with list of layers instead of layer IDs
- containsWMSLayer() has been renamed to containsWmsLayer()
- mapRenderer() has been removed. Use mapSettings() instead.
- All grid style and format enums were moved to QgsComposerMapGrid.
Expand Down Expand Up @@ -1120,6 +1122,7 @@ QgsMapLayerRegistry {#qgis_api_break_3_0_QgsMapLayerRegistry}
QgsMapOverviewCanvas {#qgis_api_break_3_0_QgsMapOverviewCanvas}
--------------------

- layerSet() and setLayerSet() have been replaced by layers() and setLayers() which work with list of layers instead of layer IDs
- destinationSrsChanged() was renamed to destinationCrsChanged()


Expand Down Expand Up @@ -1173,6 +1176,7 @@ The whole class has been refactored to stop using WKB and to use QgsAbstractGeom
QgsMapSettings {#qgis_api_break_3_0_QgsMapSettings}
--------------

- layers() and setLayers() now work with list of layers instead of layer IDs
- layerTransform() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned instead of a null pointer if no transformation is required.
- destinationCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgscomposermap.sip
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ class QgsComposerMap : QgsComposerItem
void setKeepLayerSet( bool enabled );

/** Getter for stored layer set that is used if mKeepLayerSet is true */
QStringList layerSet() const;
QList<QgsMapLayer*> layers() const;
/** Setter for stored layer set that is used if mKeepLayerSet is true */
void setLayerSet( const QStringList& layerSet );
void setLayers( const QList<QgsMapLayer*> layers );
/** Stores the current layer set of the qgis mapcanvas in mLayerSet*/
void storeCurrentLayerSet();

Expand Down
1 change: 0 additions & 1 deletion python/core/core.sip
Original file line number Diff line number Diff line change
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
3 changes: 3 additions & 0 deletions python/core/layertree/qgslayertreegroup.sip
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class QgsLayerTreeGroup : QgsLayerTreeNode
//! Remove all child nodes. The nodes will be deleted.
void removeAllChildren();

//! Find layer node representing the map layer. Searches recursively the whole sub-tree.
//! @note added in 3.0
QgsLayerTreeLayer* findLayer( QgsMapLayer* layer ) const;
//! Find layer node representing the map layer specified by its ID. Searches recursively the whole sub-tree.
QgsLayerTreeLayer* findLayer( const QString& layerId );
//! Find all layer nodes. Searches recursively the whole sub-tree.
Expand Down
2 changes: 1 addition & 1 deletion python/core/layertree/qgslayertreelayer.sip
Original file line number Diff line number Diff line change
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
3 changes: 2 additions & 1 deletion python/core/layertree/qgslayertreeregistrybridge.sip
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class QgsLayerTreeRegistryBridge : QObject
%End

public:
explicit QgsLayerTreeRegistryBridge( QgsLayerTreeGroup* root, QObject *parent /TransferThis/ = 0 );
//! Create the instance that synchronizes given project with a layer tree root
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
Original file line number Diff line number Diff line change
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.

Loading