Skip to content
Permalink
Browse files

Merge QgsMapLayerRegistry into QgsProject

All methods/signals of QgsMapLayerRegistry moved verbatim to QgsProject.
  • Loading branch information
wonder-sk committed Dec 10, 2016
1 parent 8ec3eaf commit d56a97d4fe21f593746f176ceb6f553eca1d4c2e
Showing with 1,795 additions and 2,009 deletions.
  1. +1 −0 doc/api_break.dox
  2. +0 −1 python/core/core.sip
  3. +1 −1 python/core/layertree/qgslayertreelayer.sip
  4. +1 −1 python/core/layertree/qgslayertreeregistrybridge.sip
  5. +1 −1 python/core/qgsmaplayer.sip
  6. +0 −297 python/core/qgsmaplayerregistry.sip
  7. +1 −1 python/core/qgsmapsettings.sip
  8. +1 −1 python/core/qgsmapthemecollection.sip
  9. +280 −0 python/core/qgsproject.sip
  10. +1 −1 python/core/qgssnappingconfig.sip
  11. +4 −4 python/plugins/GdalTools/tools/GdalTools_utils.py
  12. +2 −2 python/plugins/GdalTools/tools/doProjection.py
  13. +2 −2 python/plugins/GdalTools/tools/inOutSelector.py
  14. +4 −4 python/plugins/db_manager/db_manager_plugin.py
  15. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py
  16. +4 −4 python/plugins/db_manager/db_plugins/vlayers/connector.py
  17. +2 −2 python/plugins/db_manager/db_plugins/vlayers/plugin.py
  18. +2 −2 python/plugins/db_manager/db_tree.py
  19. +2 −2 python/plugins/db_manager/dlg_import_vector.py
  20. +3 −4 python/plugins/db_manager/dlg_sql_layer_window.py
  21. +3 −4 python/plugins/db_manager/dlg_sql_window.py
  22. +3 −3 python/plugins/db_manager/layer_preview.py
  23. +0 −1 python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
  24. +2 −2 python/plugins/processing/algs/lidar/lastools/lasquery.py
  25. +3 −3 python/plugins/processing/gui/AlgorithmDialog.py
  26. +5 −5 python/plugins/processing/gui/AlgorithmDialogBase.py
  27. +1 −1 python/plugins/processing/gui/CommanderWindow.py
  28. +1 −1 python/plugins/processing/gui/ParametersPanel.py
  29. +2 −2 python/plugins/processing/gui/Postprocessing.py
  30. +3 −3 python/plugins/processing/tests/AlgorithmsTestBase.py
  31. +3 −3 python/plugins/processing/tools/dataobjects.py
  32. +2 −2 python/plugins/processing/tools/vector.py
  33. +0 −1 src/app/composer/qgsatlascompositionwidget.cpp
  34. +0 −1 src/app/composer/qgscomposer.cpp
  35. +0 −1 src/app/composer/qgscomposerattributetablewidget.cpp
  36. +0 −1 src/app/composer/qgscomposerlegendwidget.cpp
  37. +0 −1 src/app/composer/qgscomposermapwidget.cpp
  38. +2 −3 src/app/main.cpp
  39. +3 −3 src/app/openstreetmap/qgsosmdownloaddialog.cpp
  40. +2 −2 src/app/openstreetmap/qgsosmexportdialog.cpp
  41. +26 −27 src/app/qgisapp.cpp
  42. +0 −1 src/app/qgisappinterface.cpp
  43. +3 −3 src/app/qgsalignrasterdialog.cpp
  44. +3 −4 src/app/qgsapplayertreeviewmenuprovider.cpp
  45. +1 −1 src/app/qgsattributeactiondialog.cpp
  46. +0 −1 src/app/qgsattributetypedialog.cpp
  47. +0 −1 src/app/qgsbrowserdockwidget.cpp
  48. +0 −1 src/app/qgsfieldsproperties.cpp
  49. +2 −2 src/app/qgsjoindialog.cpp
  50. +2 −2 src/app/qgslabelpropertydialog.cpp
  51. +1 −2 src/app/qgslayerstylingwidget.cpp
  52. +0 −1 src/app/qgsmapthemes.cpp
  53. +1 −2 src/app/qgsmaptooladdfeature.cpp
  54. +0 −1 src/app/qgsmaptoolfeatureaction.cpp
  55. +0 −1 src/app/qgsmaptoolidentifyaction.cpp
  56. +2 −2 src/app/qgsmaptoollabel.cpp
  57. +0 −1 src/app/qgsmaptoolmovelabel.cpp
  58. +2 −2 src/app/qgsmaptooloffsetcurve.cpp
  59. +2 −2 src/app/qgsmaptoolpinlabels.cpp
  60. +0 −1 src/app/qgsmaptoolrotatelabel.cpp
  61. +2 −2 src/app/qgsnewspatialitelayerdialog.cpp
  62. +5 −6 src/app/qgsprojectproperties.cpp
  63. +2 −2 src/app/qgsrastercalcdialog.cpp
  64. +0 −1 src/app/qgsrasterlayerproperties.cpp
  65. +1 −0 src/app/qgssnappingwidget.cpp
  66. +2 −2 src/app/qgsstatisticalsummarydockwidget.cpp
  67. +5 −6 src/app/qgsvectorlayerproperties.cpp
  68. +4 −4 src/browser/qgsbrowser.cpp
  69. +0 −2 src/core/CMakeLists.txt
  70. +2 −3 src/core/composer/qgsatlascomposition.cpp
  71. +3 −4 src/core/composer/qgscomposerattributetablev2.cpp
  72. +1 −2 src/core/composer/qgscomposerlegend.cpp
  73. +2 −2 src/core/composer/qgscomposerlegenditem.cpp
  74. +9 −10 src/core/composer/qgscomposermap.cpp
  75. +0 −1 src/core/dxf/qgsdxfexport.cpp
  76. +0 −2 src/core/geometry/qgsgeometry.cpp
  77. +1 −2 src/core/geometry/qgsgeometryeditutils.cpp
  78. +3 −3 src/core/layertree/qgslayertreegroup.cpp
  79. +9 −9 src/core/layertree/qgslayertreelayer.cpp
  80. +1 −1 src/core/layertree/qgslayertreelayer.h
  81. +6 −7 src/core/layertree/qgslayertreeregistrybridge.cpp
  82. +3 −1 src/core/layertree/qgslayertreeregistrybridge.h
  83. +3 −3 src/core/qgsapplication.cpp
  84. +6 −7 src/core/qgsexpression.cpp
  85. +1 −2 src/core/qgsjsonutils.cpp
  86. +0 −1 src/core/qgslayerdefinition.cpp
  87. +0 −1 src/core/qgslegendrenderer.cpp
  88. +2 −2 src/core/qgsmaphittest.cpp
  89. +3 −4 src/core/qgsmaplayer.cpp
  90. +1 −1 src/core/qgsmaplayer.h
  91. +5 −5 src/core/qgsmaplayermodel.cpp
  92. +2 −2 src/core/qgsmaplayerproxymodel.cpp
  93. +0 −211 src/core/qgsmaplayerregistry.cpp
  94. +0 −367 src/core/qgsmaplayerregistry.h
  95. +4 −4 src/core/qgsmaprenderercache.cpp
  96. +2 −2 src/core/qgsmaprenderercustompainterjob.cpp
  97. +2 −2 src/core/qgsmaprendererjob.cpp
  98. +2 −3 src/core/qgsmapsettings.cpp
  99. +1 −1 src/core/qgsmapsettings.h
  100. +8 −8 src/core/qgsmapthemecollection.cpp
  101. +4 −1 src/core/qgsmapthemecollection.h
  102. +10 −11 src/core/qgsofflineediting.cpp
  103. +1 −2 src/core/qgspallabeling.cpp
  104. +3 −3 src/core/qgspluginlayerregistry.cpp
  105. +186 −14 src/core/qgsproject.cpp
  106. +312 −0 src/core/qgsproject.h
  107. +2 −2 src/core/qgsproviderregistry.cpp
  108. +3 −3 src/core/qgsrelation.cpp
  109. +1 −2 src/core/qgsrelationmanager.cpp
  110. +15 −15 src/core/qgssnappingconfig.cpp
  111. +4 −1 src/core/qgssnappingconfig.h
  112. +3 −3 src/core/qgssnappingutils.cpp
  113. +2 −2 src/core/qgstaskmanager.cpp
  114. +4 −4 src/core/qgstransaction.cpp
  115. +5 −6 src/core/qgsvectorlayer.cpp
  116. +1 −2 src/core/qgsvectorlayerfeatureiterator.cpp
  117. +7 −7 src/core/qgsvectorlayerjoinbuffer.cpp
  118. +2 −2 src/core/qgsvirtuallayerdefinitionutils.cpp
  119. +0 −1 src/core/raster/qgsrasterlayer.cpp
  120. +0 −1 src/gui/attributetable/qgsattributetablemodel.cpp
  121. +2 −3 src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
  122. +0 −1 src/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.cpp
  123. +2 −2 src/gui/editorwidgets/qgsvaluerelationconfigdlg.cpp
  124. +0 −1 src/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.cpp
  125. +0 −1 src/gui/editorwidgets/qgsvaluerelationwidgetfactory.cpp
  126. +2 −2 src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
  127. +3 −3 src/gui/layertree/qgscustomlayerorderwidget.cpp
  128. +2 −2 src/gui/layertree/qgslayertreeviewdefaultactions.cpp
  129. +5 −5 src/gui/qgsattributetypeloaddialog.cpp
  130. +2 −2 src/gui/qgsformannotationitem.cpp
  131. +2 −2 src/gui/qgshtmlannotationitem.cpp
  132. +4 −5 src/gui/qgsmapcanvas.cpp
  133. +1 −2 src/gui/qgsmapcanvassnapper.cpp
  134. +2 −2 src/gui/qgsmapcanvastracer.cpp
  135. +3 −3 src/gui/qgsmapoverviewcanvas.cpp
  136. +0 −1 src/gui/qgsmaptoolidentify.cpp
  137. +2 −2 src/gui/qgsnewgeopackagelayerdialog.cpp
  138. +0 −1 src/gui/symbology-ng/qgsellipsesymbollayerwidget.cpp
  139. +2 −2 src/gui/symbology-ng/qgssizescalewidget.cpp
  140. +5 −5 src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.cpp
  141. +7 −7 src/plugins/geometry_checker/ui/qgsgeometrycheckersetuptab.cpp
  142. +2 −2 src/plugins/georeferencer/qgsgcpcanvasitem.cpp
  143. +3 −4 src/plugins/georeferencer/qgsgeorefplugingui.cpp
  144. +3 −4 src/plugins/globe/globe_plugin.cpp
  145. +2 −2 src/plugins/globe/qgsglobefeatureidentify.cpp
  146. +2 −3 src/plugins/globe/qgsglobewidget.cpp
  147. +2 −3 src/plugins/gps_importer/qgsgpsplugin.cpp
  148. +0 −1 src/plugins/grass/qgsgrassmoduleinput.cpp
  149. +3 −3 src/plugins/grass/qgsgrassmoduleoptions.cpp
  150. +1 −1 src/plugins/grass/qgsgrassmoduleoptions.h
  151. +10 −10 src/plugins/grass/qgsgrassmoduleparam.cpp
  152. +4 −5 src/plugins/grass/qgsgrassplugin.cpp
  153. +3 −3 src/plugins/interpolation/qgsinterpolationdialog.cpp
  154. +3 −4 src/plugins/offline_editing/offline_editing_plugin.cpp
  155. +0 −1 src/plugins/offline_editing/offline_editing_plugin_gui.cpp
  156. +3 −3 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.cpp
  157. +0 −1 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp
  158. +4 −4 src/plugins/roadgraph/exportdlg.cpp
  159. +1 −2 src/plugins/roadgraph/roadgraphplugin.cpp
  160. +7 −8 src/plugins/spatialquery/qgsspatialquerydialog.cpp
  161. +0 −1 src/plugins/spatialquery/qgsspatialqueryplugin.cpp
  162. +7 −8 src/plugins/topology/checkDock.cpp
  163. +0 −2 src/plugins/topology/checkDock.h
  164. +12 −18 src/plugins/topology/rulesDialog.cpp
  165. +3 −3 src/plugins/topology/rulesDialog.h
  166. +1 −1 src/providers/gdal/qgsgdalprovider.cpp
  167. +3 −3 src/providers/virtual/qgsvirtuallayerprovider.cpp
  168. +5 −5 src/providers/virtual/qgsvirtuallayersourceselect.cpp
  169. +2 −2 src/providers/virtual/qgsvirtuallayersqlitemodule.cpp
  170. +1 −1 src/providers/wcs/URI
  171. +2 −5 src/server/qgsmaprenderer.cpp
  172. +4 −4 src/server/qgsmslayercache.cpp
  173. +0 −1 src/server/qgsowsserver.cpp
  174. +2 −2 src/server/qgsserver.cpp
  175. +9 −10 src/server/qgsserverprojectparser.cpp
  176. +2 −2 src/server/qgswfsprojectparser.cpp
  177. +2 −3 src/server/qgswfsserver.cpp
  178. +3 −3 src/server/qgswmsconfigparser.cpp
  179. +4 −4 src/server/qgswmsprojectparser.cpp
  180. +17 −18 src/server/qgswmsserver.cpp
  181. +1 −3 tests/bench/qgsbench.cpp
  182. +2 −2 tests/src/analysis/testqgsrastercalculator.cpp
  183. +2 −2 tests/src/analysis/testqgszonalstatistics.cpp
  184. +0 −1 tests/src/app/testqgisappclipboard.cpp
  185. +6 −6 tests/src/core/testmaprendererjob.cpp
  186. +2 −2 tests/src/core/testqgs25drenderer.cpp
  187. +4 −4 tests/src/core/testqgsatlascomposition.cpp
  188. +6 −6 tests/src/core/testqgsblendmodes.cpp
  189. +2 −2 tests/src/core/testqgscentroidfillsymbol.cpp
  190. +2 −2 tests/src/core/testqgscomposerdd.cpp
  191. +2 −3 tests/src/core/testqgscomposerhtml.cpp
  192. +1 −2 tests/src/core/testqgscomposerlabel.cpp
  193. +4 −5 tests/src/core/testqgscomposermap.cpp
  194. +0 −1 tests/src/core/testqgscomposermapgrid.cpp
  195. +2 −2 tests/src/core/testqgscomposermapoverview.cpp
  196. +2 −2 tests/src/core/testqgscomposerrotation.cpp
  197. +1 −2 tests/src/core/testqgscomposerscalebar.cpp
  198. +5 −6 tests/src/core/testqgscomposertablev2.cpp
  199. +1 −2 tests/src/core/testqgsdiagram.cpp
  200. +2 −2 tests/src/core/testqgsellipsemarker.cpp
  201. +5 −6 tests/src/core/testqgsexpression.cpp
  202. +2 −2 tests/src/core/testqgsfilledmarker.cpp
  203. +2 −2 tests/src/core/testqgsfontmarker.cpp
  204. +2 −2 tests/src/core/testqgsgradients.cpp
  205. +3 −3 tests/src/core/testqgsinvertedpolygonrenderer.cpp
  206. +5 −5 tests/src/core/testqgslabelingengine.cpp
  207. +9 −9 tests/src/core/testqgslayertree.cpp
  208. +17 −17 tests/src/core/testqgslegendrenderer.cpp
  209. +2 −2 tests/src/core/testqgslinefillsymbol.cpp
  210. +3 −3 tests/src/core/testqgsmaplayerstylemanager.cpp
  211. +4 −4 tests/src/core/testqgsmaprendererjob.cpp
  212. +2 −2 tests/src/core/testqgsmaprotation.cpp
  213. +2 −2 tests/src/core/testqgsmarkerlinesymbol.cpp
  214. +7 −7 tests/src/core/testqgspainteffect.cpp
  215. +2 −2 tests/src/core/testqgspointlocator.cpp
  216. +2 −2 tests/src/core/testqgspointpatternfillsymbol.cpp
  217. +2 −2 tests/src/core/testqgsrasterfill.cpp
  218. +4 −4 tests/src/core/testqgsrasterlayer.cpp
  219. +0 −1 tests/src/core/testqgsrastersublayer.cpp
  220. +4 −4 tests/src/core/testqgsrenderers.cpp
  221. +2 −2 tests/src/core/testqgsshapeburst.cpp
  222. +2 −2 tests/src/core/testqgssimplemarker.cpp
  223. +2 −2 tests/src/core/testqgssnappingutils.cpp
  224. +0 −1 tests/src/core/testqgsstyle.cpp
  225. +2 −2 tests/src/core/testqgssvgmarker.cpp
  226. +4 −4 tests/src/core/testqgssymbol.cpp
  227. +5 −5 tests/src/core/testqgstaskmanager.cpp
  228. +0 −1 tests/src/core/testqgstracer.cpp
  229. +5 −5 tests/src/core/testqgsvectorlayer.cpp
  230. +15 −16 tests/src/core/testqgsvectorlayerjoinbuffer.cpp
  231. +3 −3 tests/src/gui/testprojectionissues.cpp
  232. +2 −3 tests/src/gui/testqgseditorwidgetregistry.cpp
  233. +8 −9 tests/src/gui/testqgsfieldexpressionwidget.cpp
  234. +3 −3 tests/src/gui/testqgsmapcanvas.cpp
  235. +4 −4 tests/src/gui/testqgsquickprint.cpp
  236. +1 −2 tests/src/gui/testrenderergui.cpp
  237. +3 −3 tests/src/providers/testqgswcspublicservers.cpp
  238. +0 −1 tests/src/python/acceptable_missing_doc.py
  239. +2 −2 tests/src/python/offlineditingtestbase.py
  240. +2 −2 tests/src/python/qgis_interface.py
  241. +6 −6 tests/src/python/test_layer_dependencies.py
  242. +0 −1 tests/src/python/test_offline_editing_wfs.py
  243. +4 −5 tests/src/python/test_provider_spatialite.py
  244. +41 −42 tests/src/python/test_provider_virtual.py
  245. +3 −3 tests/src/python/test_qgsarrowsymbollayer.py
  246. +4 −4 tests/src/python/test_qgsatlascomposition.py
  247. +2 −2 tests/src/python/test_qgsblendmodes.py
  248. +2 −2 tests/src/python/test_qgscomposerlabel.py
  249. +9 −9 tests/src/python/test_qgscomposerlegend.py
  250. +2 −2 tests/src/python/test_qgscomposermap.py
  251. +2 −2 tests/src/python/test_qgscomposition.py
  252. +11 −11 tests/src/python/test_qgseditwidgets.py
  253. +7 −7 tests/src/python/test_qgsfeatureiterator.py
  254. +2 −2 tests/src/python/test_qgsgeometry_avoid_intersections.py
  255. +5 −5 tests/src/python/test_qgsgeometrygeneratorsymbollayer.py
  256. +1 −2 tests/src/python/test_qgsjsonutils.py
  257. +4 −5 tests/src/python/test_qgslayerdefinition.py
  258. +34 −34 tests/src/python/test_qgsmaplayermodel.py
  259. +170 −170 tests/src/python/test_qgsmaplayerregistry.py
  260. +8 −8 tests/src/python/test_qgsnewgeopackagelayerdialog.py
  261. +3 −3 tests/src/python/test_qgsnullsymbolrenderer.py
  262. +3 −3 tests/src/python/test_qgspallabeling_base.py
  263. +3 −3 tests/src/python/test_qgspointclusterrenderer.py
  264. +3 −3 tests/src/python/test_qgspointdisplacementrenderer.py
  265. +3 −3 tests/src/python/test_qgsrasterlayer.py
  266. +3 −3 tests/src/python/test_qgsrelation.py
  267. +3 −4 tests/src/python/test_qgsrelationeditwidget.py
  268. +3 −3 tests/src/python/test_qgsrelationmanager.py
  269. +3 −3 tests/src/python/test_qgsrulebasedrenderer.py
  270. +2 −2 tests/src/python/test_qgssearchwidgetwrapper.py
  271. +2 −2 tests/src/python/test_qgssinglesymbolrenderer.py
  272. +3 −3 tests/src/python/test_qgssymbolexpressionvariables.py
  273. +7 −7 tests/src/python/test_qgssymbollayer.py
  274. +2 −3 tests/src/python/test_qgsvectorlayer.py
  275. +0 −1 tests/src/python/test_qgsvectorlayereditbuffer.py
  276. +2 −2 tests/src/python/test_qgsvectorlayertools.py
  277. +2 −2 tests/src/python/utilities.py
@@ -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.
@@ -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
@@ -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,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;
@@ -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;

/**

This file was deleted.

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

@@ -61,7 +61,7 @@ class QgsMapThemeCollection : QObject

};

QgsMapThemeCollection();
QgsMapThemeCollection( QgsProject* project );

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

0 comments on commit d56a97d

Please sign in to comment.
You can’t perform that action at this time.