Skip to content
Permalink
Browse files
Merge pull request #3855 from wonder-sk/project-refactoring-part1
Project refactoring - part I
  • Loading branch information
wonder-sk committed Dec 11, 2016
2 parents 6eb330e + 04f8704 commit 20cdd4f
Show file tree
Hide file tree
Showing 290 changed files with 2,590 additions and 2,682 deletions.
@@ -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.
@@ -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.
@@ -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()


@@ -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++
@@ -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();

@@ -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
@@ -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.
@@ -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
@@ -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;