Skip to content
Permalink
Browse files
Merge pull request #2857 from nyalldawson/properties2
Properties framework
  • Loading branch information
nyalldawson committed Jan 23, 2017
2 parents 5753576 + 69d10fa commit ea116fd8933b4e9e486c616f57c7439e27bf9593
Showing with 10,240 additions and 5,310 deletions.
  1. +68 −5 doc/api_break.dox
  2. +4 −0 python/core/composer/qgscomposerlegend.sip
  3. +29 −24 python/core/composer/qgscomposerobject.sip
  4. +53 −23 python/core/composer/qgscomposerscalebar.sip
  5. +7 −28 python/core/composer/qgscomposerutils.sip
  6. +19 −16 python/core/composer/qgscomposition.sip
  7. +3 −0 python/core/core.sip
  8. +30 −10 python/core/qgsdiagramrenderer.sip
  9. +11 −145 python/core/qgspallabeling.sip
  10. +135 −0 python/core/qgsproperty.sip
  11. +143 −0 python/core/qgspropertycollection.sip
  12. +140 −0 python/core/qgspropertytransformer.sip
  13. +2 −2 python/core/symbology-ng/qgs25drenderer.sip
  14. +1 −1 python/core/symbology-ng/qgsarrowsymbollayer.sip
  15. +1 −1 python/core/symbology-ng/qgscategorizedsymbolrenderer.sip
  16. +4 −4 python/core/symbology-ng/qgsfillsymbollayer.sip
  17. +1 −1 python/core/symbology-ng/qgsgeometrygeneratorsymbollayer.sip
  18. +1 −1 python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip
  19. +1 −1 python/core/symbology-ng/qgsheatmaprenderer.sip
  20. +1 −1 python/core/symbology-ng/qgsinvertedpolygonrenderer.sip
  21. +2 −2 python/core/symbology-ng/qgslinesymbollayer.sip
  22. +1 −1 python/core/symbology-ng/qgsmarkersymbollayer.sip
  23. +1 −1 python/core/symbology-ng/qgsnullsymbolrenderer.sip
  24. +1 −1 python/core/symbology-ng/qgspointclusterrenderer.sip
  25. +1 −1 python/core/symbology-ng/qgspointdisplacementrenderer.sip
  26. +1 −1 python/core/symbology-ng/qgspointdistancerenderer.sip
  27. +1 −1 python/core/symbology-ng/qgsrenderer.sip
  28. +2 −2 python/core/symbology-ng/qgsrulebasedrenderer.sip
  29. +1 −1 python/core/symbology-ng/qgssinglesymbolrenderer.sip
  30. +7 −7 python/core/symbology-ng/qgssymbol.sip
  31. +81 −69 python/core/symbology-ng/qgssymbollayer.sip
  32. +1 −1 python/core/symbology-ng/qgsvectorfieldsymbollayer.sip
  33. +1 −0 python/gui/gui.sip
  34. +1 −1 python/gui/qgsdatadefinedbutton.sip
  35. +58 −0 python/gui/qgspropertyoverridebutton.sip
  36. +2 −0 python/gui/symbology-ng/qgslayerpropertieswidget.sip
  37. +10 −10 python/gui/symbology-ng/qgsrendererwidget.sip
  38. +1 −1 python/gui/symbology-ng/qgssizescalewidget.sip
  39. +1 −1 python/gui/symbology-ng/qgssymbollayerwidget.sip
  40. +3 −3 src/app/composer/qgscomposerhtmlwidget.cpp
  41. +49 −45 src/app/composer/qgscomposeritemwidget.cpp
  42. +16 −13 src/app/composer/qgscomposeritemwidget.h
  43. +5 −0 src/app/composer/qgscomposerlegendwidget.cpp
  44. +20 −19 src/app/composer/qgscomposermapwidget.cpp
  45. +9 −3 src/app/composer/qgscomposerpicturewidget.cpp
  46. +17 −17 src/app/composer/qgscomposerscalebarwidget.cpp
  47. +18 −69 src/app/composer/qgscompositionwidget.cpp
  48. +1 −5 src/app/composer/qgscompositionwidget.h
  49. +45 −48 src/app/dwg/qgsdwgimportdialog.cpp
  50. +34 −45 src/app/qgsdiagramproperties.cpp
  51. +9 −0 src/app/qgsdiagramproperties.h
  52. +117 −353 src/app/qgslabelinggui.cpp
  53. +10 −4 src/app/qgslabelinggui.h
  54. +22 −40 src/app/qgslabelpropertydialog.cpp
  55. +3 −3 src/app/qgslabelpropertydialog.h
  56. +36 −24 src/app/qgsmaptoollabel.cpp
  57. +2 −2 src/app/qgsmaptoollabel.h
  58. +10 −14 src/app/qgsmaptooloffsetpointsymbol.cpp
  59. +5 −4 src/app/qgsmaptoolrotatepointsymbols.cpp
  60. +1 −1 src/app/qgsmaptoolselectutils.cpp
  61. +6 −0 src/core/CMakeLists.txt
  62. +4 −6 src/core/composer/qgscomposerhtml.cpp
  63. +109 −101 src/core/composer/qgscomposeritem.cpp
  64. +23 −5 src/core/composer/qgscomposeritem.h
  65. +46 −7 src/core/composer/qgscomposerlegend.cpp
  66. +12 −0 src/core/composer/qgscomposerlegend.h
  67. +35 −89 src/core/composer/qgscomposermap.cpp
  68. +66 −82 src/core/composer/qgscomposerobject.cpp
  69. +38 −34 src/core/composer/qgscomposerobject.h
  70. +15 −18 src/core/composer/qgscomposerpicture.cpp
  71. +3 −3 src/core/composer/qgscomposerpicture.h
  72. +66 −27 src/core/composer/qgscomposerscalebar.cpp
  73. +61 −23 src/core/composer/qgscomposerscalebar.h
  74. +21 −81 src/core/composer/qgscomposerutils.cpp
  75. +7 −28 src/core/composer/qgscomposerutils.h
  76. +32 −267 src/core/composer/qgscomposition.cpp
  77. +20 −65 src/core/composer/qgscomposition.h
  78. +4 −4 src/core/dxf/qgsdxfexport.cpp
  79. +75 −34 src/core/qgsdiagramrenderer.cpp
  80. +95 −15 src/core/qgsdiagramrenderer.h
  81. +8 −0 src/core/qgslabelingengine.cpp
  82. +1 −0 src/core/qgsmaprendererjob.cpp
  83. +333 −798 src/core/qgspallabeling.cpp
  84. +64 −101 src/core/qgspallabeling.h
  85. +698 −0 src/core/qgsproperty.cpp
  86. +427 −0 src/core/qgsproperty.h
  87. +90 −0 src/core/qgsproperty_p.h
  88. +514 −0 src/core/qgspropertycollection.cpp
  89. +444 −0 src/core/qgspropertycollection.h
  90. +285 −0 src/core/qgspropertytransformer.cpp
  91. +348 −0 src/core/qgspropertytransformer.h
  92. +3 −3 src/core/qgstextlabelfeature.h
  93. +1 −1 src/core/qgsvectorfilewriter.cpp
  94. +6 −6 src/core/qgsvectorlayer.cpp
  95. +65 −31 src/core/qgsvectorlayerdiagramprovider.cpp
  96. +3 −21 src/core/qgsvectorlayerlabelprovider.cpp
  97. +1 −1 src/core/qgsvectorlayerrenderer.cpp
  98. +7 −7 src/core/symbology-ng/qgs25drenderer.cpp
  99. +2 −2 src/core/symbology-ng/qgs25drenderer.h
  100. +27 −21 src/core/symbology-ng/qgsarrowsymbollayer.cpp
  101. +1 −1 src/core/symbology-ng/qgsarrowsymbollayer.h
  102. +14 −10 src/core/symbology-ng/qgscategorizedsymbolrenderer.cpp
  103. +1 −1 src/core/symbology-ng/qgscategorizedsymbolrenderer.h
  104. +77 −111 src/core/symbology-ng/qgsellipsesymbollayer.cpp
  105. +137 −190 src/core/symbology-ng/qgsfillsymbollayer.cpp
  106. +5 −5 src/core/symbology-ng/qgsfillsymbollayer.h
  107. +4 −6 src/core/symbology-ng/qgsgeometrygeneratorsymbollayer.cpp
  108. +1 −1 src/core/symbology-ng/qgsgeometrygeneratorsymbollayer.h
  109. +14 −10 src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp
  110. +1 −1 src/core/symbology-ng/qgsgraduatedsymbolrenderer.h
  111. +1 −1 src/core/symbology-ng/qgsheatmaprenderer.cpp
  112. +1 −1 src/core/symbology-ng/qgsheatmaprenderer.h
  113. +2 −2 src/core/symbology-ng/qgsinvertedpolygonrenderer.cpp
  114. +1 −1 src/core/symbology-ng/qgsinvertedpolygonrenderer.h
  115. +52 −58 src/core/symbology-ng/qgslinesymbollayer.cpp
  116. +2 −2 src/core/symbology-ng/qgslinesymbollayer.h
  117. +108 −143 src/core/symbology-ng/qgsmarkersymbollayer.cpp
  118. +1 −1 src/core/symbology-ng/qgsmarkersymbollayer.h
  119. +1 −1 src/core/symbology-ng/qgsnullsymbolrenderer.cpp
  120. +1 −1 src/core/symbology-ng/qgsnullsymbolrenderer.h
  121. +5 −5 src/core/symbology-ng/qgspointclusterrenderer.cpp
  122. +1 −1 src/core/symbology-ng/qgspointclusterrenderer.h
  123. +3 −3 src/core/symbology-ng/qgspointdisplacementrenderer.cpp
  124. +1 −1 src/core/symbology-ng/qgspointdisplacementrenderer.h
  125. +2 −2 src/core/symbology-ng/qgspointdistancerenderer.cpp
  126. +1 −1 src/core/symbology-ng/qgspointdistancerenderer.h
  127. +7 −10 src/core/symbology-ng/qgsrenderer.cpp
  128. +1 −1 src/core/symbology-ng/qgsrenderer.h
  129. +10 −10 src/core/symbology-ng/qgsrulebasedrenderer.cpp
  130. +2 −2 src/core/symbology-ng/qgsrulebasedrenderer.h
  131. +7 −7 src/core/symbology-ng/qgssinglesymbolrenderer.cpp
  132. +1 −1 src/core/symbology-ng/qgssinglesymbolrenderer.h
  133. +92 −120 src/core/symbology-ng/qgssymbol.cpp
  134. +25 −28 src/core/symbology-ng/qgssymbol.h
  135. +203 −213 src/core/symbology-ng/qgssymbollayer.cpp
  136. +89 −137 src/core/symbology-ng/qgssymbollayer.h
  137. +12 −0 src/core/symbology-ng/qgssymbollayerutils.cpp
  138. +3 −3 src/core/symbology-ng/qgsvectorfieldsymbollayer.cpp
  139. +1 −1 src/core/symbology-ng/qgsvectorfieldsymbollayer.h
  140. +2 −0 src/gui/CMakeLists.txt
  141. +1 −1 src/gui/qgsdatadefinedbutton.cpp
  142. +4 −4 src/gui/qgsdatadefinedbutton.h
  143. +2 −2 src/gui/qgshighlight.cpp
  144. +658 −0 src/gui/qgspropertyoverridebutton.cpp
  145. +238 −0 src/gui/qgspropertyoverridebutton.h
  146. +3 −4 src/gui/qgstextformatwidget.cpp
  147. +7 −7 src/gui/symbology-ng/qgsarrowsymbollayerwidget.cpp
  148. +12 −12 src/gui/symbology-ng/qgsellipsesymbollayerwidget.cpp
  149. +16 −19 src/gui/symbology-ng/qgslayerpropertieswidget.cpp
  150. +10 −2 src/gui/symbology-ng/qgslayerpropertieswidget.h
  151. +2 −3 src/gui/symbology-ng/qgsrendererpropertiesdialog.cpp
  152. +26 −21 src/gui/symbology-ng/qgsrendererwidget.cpp
  153. +16 −13 src/gui/symbology-ng/qgsrendererwidget.h
  154. +1 −1 src/gui/symbology-ng/qgsrulebasedrendererwidget.cpp
  155. +12 −9 src/gui/symbology-ng/qgssizescalewidget.cpp
  156. +2 −2 src/gui/symbology-ng/qgssizescalewidget.h
  157. +117 −127 src/gui/symbology-ng/qgssymbollayerwidget.cpp
  158. +10 −3 src/gui/symbology-ng/qgssymbollayerwidget.h
  159. +17 −18 src/gui/symbology-ng/qgssymbolselectordialog.cpp
  160. +4 −4 src/gui/symbology-ng/qgssymbolselectordialog.h
  161. +36 −27 src/gui/symbology-ng/qgssymbolslistwidget.cpp
  162. +2 −0 src/gui/symbology-ng/qgssymbolslistwidget.h
  163. +2 −2 src/plugins/grass/qgsgrasseditrenderer.cpp
  164. +1 −1 src/plugins/grass/qgsgrasseditrenderer.h
  165. +3 −3 src/ui/composer/qgscomposerhtmlwidgetbase.ui
  166. +27 −11 src/ui/composer/qgscomposeritemwidgetbase.ui
  167. +71 −48 src/ui/composer/qgscomposerlegendwidgetbase.ui
  168. +11 −11 src/ui/composer/qgscomposermapwidgetbase.ui
  169. +71 −45 src/ui/composer/qgscomposerpicturewidgetbase.ui
  170. +134 −97 src/ui/composer/qgscomposerscalebarwidgetbase.ui
  171. +7 −7 src/ui/composer/qgscompositionwidgetbase.ui
  172. +468 −243 src/ui/qgsdiagrampropertiesbase.ui
  173. +93 −93 src/ui/qgstextformatwidgetbase.ui
  174. +9 −9 src/ui/symbollayer/qgsarrowsymbollayerwidgetbase.ui
  175. +14 −14 src/ui/symbollayer/widget_ellipse.ui
  176. +8 −8 src/ui/symbollayer/widget_filledmarker.ui
  177. +12 −12 src/ui/symbollayer/widget_fontmarker.ui
  178. +14 −14 src/ui/symbollayer/widget_gradientfill.ui
  179. +3 −3 src/ui/symbollayer/widget_layerproperties.ui
  180. +4 −4 src/ui/symbollayer/widget_linepatternfill.ui
  181. +6 −6 src/ui/symbollayer/widget_markerline.ui
  182. +6 −6 src/ui/symbollayer/widget_pointpatternfill.ui
  183. +6 −6 src/ui/symbollayer/widget_rasterfill.ui
  184. +3 −3 src/ui/symbollayer/widget_set_dd_value.ui
  185. +8 −8 src/ui/symbollayer/widget_shapeburstfill.ui
  186. +8 −8 src/ui/symbollayer/widget_simplefill.ui
  187. +9 −9 src/ui/symbollayer/widget_simpleline.ui
  188. +13 −13 src/ui/symbollayer/widget_simplemarker.ui
  189. +8 −8 src/ui/symbollayer/widget_svgfill.ui
  190. +11 −11 src/ui/symbollayer/widget_svgmarker.ui
  191. +5 −5 src/ui/symbollayer/widget_symbolslist.ui
  192. +1 −0 tests/src/core/CMakeLists.txt
  193. +3 −3 tests/src/core/testqgscomposerdd.cpp
  194. +20 −21 tests/src/core/testqgscomposermap.cpp
  195. +7 −59 tests/src/core/testqgscomposerobject.cpp
  196. +5 −8 tests/src/core/testqgscomposerpicture.cpp
  197. +27 −13 tests/src/core/testqgscomposerscalebar.cpp
  198. +37 −100 tests/src/core/testqgscomposerutils.cpp
  199. +348 −7 tests/src/core/testqgsdiagram.cpp
  200. +2 −2 tests/src/core/testqgsellipsemarker.cpp
  201. +5 −5 tests/src/core/testqgsfilledmarker.cpp
  202. +2 −2 tests/src/core/testqgsfontmarker.cpp
  203. +7 −6 tests/src/core/testqgslabelingengine.cpp
  204. +2 −2 tests/src/core/testqgslinefillsymbol.cpp
  205. +3 −3 tests/src/core/testqgsmarkerlinesymbol.cpp
  206. +2 −2 tests/src/core/testqgspointpatternfillsymbol.cpp
  207. +1,168 −0 tests/src/core/testqgsproperty.cpp
  208. +11 −11 tests/src/core/testqgssimplemarker.cpp
  209. +2 −2 tests/src/core/testqgssvgmarker.cpp
  210. +1 −0 tests/src/python/CMakeLists.txt
  211. +8 −7 tests/src/python/test_qgsarrowsymbollayer.py
  212. +66 −0 tests/src/python/test_qgscomposeritem.py
  213. +39 −1 tests/src/python/test_qgscomposerlegend.py
  214. +8 −5 tests/src/python/test_qgspallabeling_placement.py
  215. +4 −3 tests/src/python/test_qgspointclusterrenderer.py
  216. +4 −3 tests/src/python/test_qgspointdisplacementrenderer.py
  217. +5 −4 tests/src/python/test_qgssymbolexpressionvariables.py
  218. +4 −4 tests/src/python/test_qgssymbollayer.py
  219. BIN tests/testdata/control_images/diagrams/expected_piediagram/expected_piediagram.png
  220. BIN tests/testdata/control_images/diagrams/expected_piediagram/expected_piediagram_mask.png
  221. BIN ...iagrams/expected_piediagram_datadefined_alwaysshow/expected_piediagram_datadefined_alwaysshow.png
  222. BIN ...ms/expected_piediagram_datadefined_alwaysshow/expected_piediagram_datadefined_alwaysshow_mask.png
  223. BIN ...es/diagrams/expected_piediagram_datadefined_distance/expected_piediagram_datadefined_distance.png
  224. BIN ...ages/diagrams/expected_piediagram_datadefined_outline/expected_piediagram_datadefined_outline.png
  225. BIN ...diagrams/expected_piediagram_datadefined_outline/expected_piediagram_datadefined_outline_mask.png
  226. BIN ...es/diagrams/expected_piediagram_datadefined_position/expected_piediagram_datadefined_position.png
  227. BIN ...agrams/expected_piediagram_datadefined_position/expected_piediagram_datadefined_position_mask.png
  228. BIN ...es/diagrams/expected_piediagram_datadefined_priority/expected_piediagram_datadefined_priority.png
  229. BIN ...agrams/expected_piediagram_datadefined_priority/expected_piediagram_datadefined_priority_mask.png
  230. BIN ...rol_images/diagrams/expected_piediagram_datadefined_show/expected_piediagram_datadefined_show.png
  231. BIN ...mages/diagrams/expected_piediagram_datadefined_show/expected_piediagram_datadefined_show_mask.png
  232. BIN ...iagrams/expected_piediagram_datadefined_startangle/expected_piediagram_datadefined_startangle.png
  233. BIN ...ms/expected_piediagram_datadefined_startangle/expected_piediagram_datadefined_startangle_mask.png
  234. BIN ...images/diagrams/expected_piediagram_datadefined_zindex/expected_piediagram_datadefined_zindex.png
  235. BIN ...s/diagrams/expected_piediagram_datadefined_zindex/expected_piediagram_datadefined_zindex_mask.png
  236. BIN ...estdata/control_images/diagrams/expected_piediagram_expression/expected_piediagram_expression.png
  237. BIN ...ta/control_images/diagrams/expected_piediagram_expression/expected_piediagram_expression_mask.png
  238. BIN ...grams/expected_textdiagram_datadefined_background/expected_textdiagram_datadefined_background.png
  239. BIN .../expected_textdiagram_datadefined_background/expected_textdiagram_datadefined_background_mask.png
  240. BIN tests/testdata/control_images/expected_piediagram/expected_piediagram.png
  241. BIN tests/testdata/control_images/expected_piediagram/expected_piediagram_mask.png
  242. BIN tests/testdata/control_images/expected_piediagram_expression/expected_piediagram_expression.png
  243. BIN tests/testdata/control_images/expected_piediagram_expression/expected_piediagram_expression_mask.png
@@ -596,6 +596,13 @@ QgsComposerNodesItem {#qgis_api_break_3_0_QgsComposerNodesItem}
- _writeXMLStyle() has been renamed to _writeXMLStyle()
- unselectNode() has been renamed to deselectNode() <!--#spellok-->

QgsComposerObject {#qgis_api_break_3_0_QgsComposerObject}
-----------------

- dataDefinedProperty() and setDataDefinedProperty() no longer use QgsDataDefined objects.
Instead these methods have been ported to the QgsProperty framework.
- dataDefinedEvaluate() was removed. Use the QgsProperty evaluation methods instead.


QgsComposerPicture {#qgis_api_break_3_0_QgsComposerPicture}
------------------
@@ -610,6 +617,13 @@ QgsComposerObject::dataDefinedProperty instead.
QgsComposerObject::setDataDefinedProperty() instead.
- updatePictureExpression() was removed.

QgsComposerScaleBar {#qgis_api_break_3_0_QgsComposerScaleBar}
-------------------

- setBrush() was removed. Use setFillColor() instead.
- setBrush2() was removed. Use setFillColor2() instead.
- setPen() was removed. Use setLineColor() and setLineWidth() instead.


QgsComposerTable {#qgis_api_break_3_0_QgsComposerTable}
----------------
@@ -633,6 +647,16 @@ QgsComposerTableV2 {#qgis_api_break_3_0_QgsComposerTableV2}
- unselectNode() has been renamed to deselectNode() <!--#spellok-->


QgsComposerUtils {#qgis_api_break_3_0_QgsComposerUtils}
-----------------

- readDataDefinedPropertyMap() was renamed to readOldDataDefinedPropertyMap() and the signature has changed
to use a QgsPropertyCollection object.
- readDataDefinedProperty() was renamed to readOldDataDefinedProperty() and the signature has changed
to use the QgsProperty framework objects.
- writeDataDefinedPropertyMap() was removed. This is now handled by QgsPropertyCollection::writeXml()


QgsComposition {#qgis_api_break_3_0_QgsComposition}
--------------

@@ -648,6 +672,8 @@ were removed. Use setSnapTolerance() and snapTolerance() instead.
- addComposerTable(), composerTableAdded() were removed.
- setAllUnselected() has been renamed to setAllDeselected. <!--#spellok-->
- worldFileMap() and setWorldFileMap() have been renamed to referenceMap() and setReferenceMap()
- dataDefinedProperty() and setDataDefinedProperty() now use the QgsProperty framework instead
of QgsDataDefined objects.


QgsCoordinateReferenceSystem {#qgis_api_break_3_0_QgsCoordinateReferenceSystem}
@@ -751,14 +777,19 @@ QgsDataDefinedButton {#qgis_api_break_3_0_QgsDataDefinedButton}
- registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator



QgsDataDefinedSymbolDialog {#qgis_api_break_3_0_QgsDataDefinedSymbolDialog}
--------------------------

- QgsDataDefinedSymbolDialog was removed. Code using this dialog should be reworked to use QgsDataDefinedButton
instead.


QgsDataDefinedValueDialog {#qgis_api_break_3_0_QgsDataDefinedValueDialog}
--------------------------

- These classes and subclasses now use QgsProperty objects instead of QgsDataDefined.


QgsDataItem {#qgis_api_break_3_0_QgsDataItem}
-----------

@@ -813,6 +844,7 @@ QgsDiagramRenderer {#qgis_api_break_3_0_QgsDiagramRenderer}
------------------
- xform, fields were no longer required and are removed.
- referencedFields() no longer takes a QgsFields argument.
- renderDiagram() now takes an optional data defined overrides collection argument.


QgsDiagramLayerSettings {#qgis_api_break_3_0_QgsDiagramLayerSettings}
@@ -832,6 +864,18 @@ place of a null pointer.
- The dist member variable was removed. setDistance() and distance() should be used instead.
- The renderer member variable was removed, and getRenderer() was renamed to renderer()
- The showAll member variable was removed. setShowAllDiagrams() and showAllDiagrams() should be used instead.
- The xPosColumn, yPosColumn and showColumn attributes were removed. Use setDataDefinedProperties() for
setting data defined properties instead.
- The LinePlacementFlags enum was renamed to LinePlacementFlag
- The placement member variable was removed, and getPlacement() was renamed to placement()
- The placementFlags member variable was removed
- The priority member variable was removed, and getPriority() was renamed to priority()
- The zIndex member variable was removed, and getZIndex() was renamed to zIndex()
- The obstacle member variable was removed. setIsObstacle() and isObstacle() should be used instead.
- The dist member variable was removed. setDistance() and distance() should be used instead.
- The renderer member variable was removed, and getRenderer() was renamed to renderer()
- The showAll member variable was removed. setShowAllDiagrams() and showAllDiagrams() should be used instead.
- referencedFields() no longer requires a QgsFields argument.

QgsDiagramSettings {#qgis_api_break_3_0_QgsDiagramSettings}
------------------
@@ -957,6 +1001,8 @@ QgsFeatureRendererV2 {#qgis_api_break_3_0_QgsFeatureRendererV2}
- symbolsForFeature( QgsFeature& feat ) has been removed. The symbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) method should be used instead (previously available as symbolsForFeature2 in PyQGIS bindings).
- originalSymbolsForFeature( QgsFeature& feat ) has been removed. The originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) method should be used instead (previously available as originalSymbolsForFeature2 in PyQGIS bindings).
- copyPaintEffect() was removed. copyRendererData() should be used instead.
- usedAttributes() now requires a QgsRenderContext argument.


QgsFeatureRequest {#qgis_api_break_3_0_QgsFeatureRequest}
-----------------
@@ -1406,6 +1452,13 @@ QgsPalLayerSettings {#qgis_api_break_3_0_QgsPalLayerSettings}
- ct is now a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be used instead of a null pointer if no transformation is required.
- prepareGeometry() and geometryRequiresPreparation() now take a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required.
- The DataDefinedProperties enum was renamed to Property
- dataDefinedProperty(), setDataDefinedProperty(), removeDataDefinedProperty(),
removeAllDataDefinedProperties(), updateDataDefinedString(), dataDefinedMap(),
dataDefinedValue(), dataDefinedEvaluate(), dataDefinedIsActive(),
dataDefinedUseExpression(), dataDefinedProperties() and dataDefinedNames()
members were removed. Use the QgsProperty framework through dataDefinedProperties()
and setDataDefinedProperties() instead.


QgsPanelWidgetStack {#qgis_api_break_3_0_QgsPanelWidgetStack}
@@ -1678,17 +1731,26 @@ parameters or QgsSymbol::OutputUnitList parameters now take QgsUnitTypes::Render
data defined rotation.
- setRenderHints() and renderHints() now accept and return a QgsSymbol::RenderHints flag rather
than an integer value
- usedAttributes() now requires a QgsRenderContext argument.
- setDataDefinedAngle(), dataDefinedAngle(), setDataDefinedSize(), dataDefinedSize(), setDataDefinedWidth() and dataDefinedWidth()
now work with QgsProperty objects instead of QgsDataDefined.


QgsSymbolLayer (renamed from QgsSymbolLayerV2) {#qgis_api_break_3_0_QgsSymbolLayer}
----------------------------------------------

- The deprecated prepareExpressions( const QgsFields* fields, double scale = -1.0 ) method has been removed. Use
the variant which takes QgsSymbolRenderContext instead.
- The deprecated methods dataDefinedProperty( const QString& property ) and dataDefinedPropertyString() were removed. Use getDataDefinedProperty() instead.
- setDataDefinedProperty( const QString& property, const QString& expressionString ) was removed. Use setDataDefinedProperty( const QString& property, QgsDataDefined* dataDefined ) instead.
- evaluateDataDefinedProperty( const QString& property, const QgsFeature* feature ) was removed. Use the variant which takes QgsSymbolRenderContext instead.
- expression() was removed. Use getDataDefinedProperty or evaluateDataDefinedProperty instead.
- The deprecated methods dataDefinedProperty( const QString& property ) and dataDefinedPropertyString() were removed. Use dataDefinedProperties() instead.
- setDataDefinedProperty now requires a QgsSymbolLayer.Property argument instead of the string based key.
- removeDataDefinedProperty(), removeDataDefinedProperties(), hasDataDefinedProperties(), hasDataDefinedProperty(), evaluateDataDefinedProperty()
were removed. Use the QgsProperty/QgsPropertyCollection methods instead.
- getDataDefinedProperty() was removed. Use dataDefinedProperties() instead.
- expression() was removed.
- usedAttributes() now requires a QgsRenderContext argument
- saveDataDefinedProperties() was removed. This is no longer required.
- restoreDataDefinedProperties() was renamed to restoreOldDataDefinedProperties()


QgsSymbolLayerRegistry {#qgis_api_break_3_0_QgsSymbolLayerRegistry}
----------------------
@@ -1729,6 +1791,7 @@ QgsSymbolSelectorWidget {#qgis_api_break_3_0_QgsSymbolSelectorWidget}
-----------------------

- saveSymbol() was removed.
- registerDataDefinedButton now works with QgsPropertyOverrideButton and QgsProperty keys


QgsSymbolSelectorDialog {#qgis_api_break_3_0_QgsSymbolSelectorDialog}
@@ -242,9 +242,13 @@ class QgsComposerLegend : QgsComposerItem
//Overridden to show legend title
virtual QString displayName() const;

const QgsLegendSettings& legendSettings() const;

public slots:
/** Data changed*/
void synchronizeWithModel();
/** Sets mCompositionMap to 0 if the map is deleted*/
void invalidateCurrentMap();
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext* context = nullptr );

};
@@ -32,6 +32,8 @@ class QgsComposerObject : QObject, QgsExpressionContextGenerator
Transparency, /*!< item transparency */
BlendMode, /*!< item blend mode */
ExcludeFromExports, /*!< exclude item from exports */
FrameColor, //!< Item frame color
BackgroundColor, //!< Item background color
//composer map
MapRotation, /*!< map rotation */
MapScale, /*!< map scale */
@@ -44,10 +46,22 @@ class QgsComposerObject : QObject, QgsExpressionContextGenerator
MapStylePreset, /*!< layer and style visibility preset */
//composer picture
PictureSource, /*!< picture source url */
PictureSvgBackgroundColor, //!< SVG background color
PictureSvgOutlineColor, //!< SVG outline color
PictureSvgOutlineWidth, //!< SVG outline width
//html item
SourceUrl /*!< html source url */
//legend item
LegendTitle, //!< Legend title
LegendColumnCount, //!< Legend column count
ScalebarFillColor, //!< Scalebar fill color
ScalebarFillColor2, //!< Scalebar secondary fill color
ScalebarLineColor, //!< Scalebar line color
ScalebarLineWidth, //!< Scalebar line width
};

static const QgsPropertiesDefinition PROPERTY_DEFINITIONS;

/** Specifies whether the value returned by a function should be the original, user
* set value, or the current evaluated value for the property. This may differ if
* a property has a data defined expression active.
@@ -84,21 +98,24 @@ class QgsComposerObject : QObject, QgsExpressionContextGenerator
*/
virtual bool readXml( const QDomElement& itemElem, const QDomDocument& doc );

/** Returns a reference to the data defined settings for one of the item's data defined properties.
* @param property data defined property to return
* @note this method was added in version 2.5
/** Returns a reference to the object's property collection, used for data defined overrides.
* @note added in QGIS 3.0
* @see setDataDefinedProperties()
*/
QgsDataDefined* dataDefinedProperty( const DataDefinedProperty property ) const;
QgsPropertyCollection& dataDefinedProperties();

/** Sets parameters for a data defined property for the item
* @param property data defined property to set
* @param active true if data defined property is active, false if it is disabled
* @param useExpression true if the expression should be used
* @param expression expression for data defined property
* @param field field name if the data defined property should take its value from a field
* @note this method was added in version 2.5
/** Returns a reference to the object's property collection, used for data defined overrides.
* @note added in QGIS 3.0
* @see setDataDefinedProperties()
*/
//const QgsPropertyCollection& dataDefinedProperties() const;

/** Sets the objects's property collection, used for data defined overrides.
* @param collection property collection. Existing properties will be replaced.
* @note added in QGIS 3.0
* @see dataDefinedProperties()
*/
void setDataDefinedProperty( const DataDefinedProperty property, const bool active, const bool useExpression, const QString &expression, const QString &field );
void setDataDefinedProperties( const QgsPropertyCollection& collection );

/** Set a custom property for the object.
* @param key property key. If a property with the same key already exists it will be overwritten.
@@ -159,18 +176,6 @@ class QgsComposerObject : QObject, QgsExpressionContextGenerator
*/
virtual void refreshDataDefinedProperty( const DataDefinedProperty property = AllProperties, const QgsExpressionContext* context = 0 );

protected:

/** Evaluate a data defined property and return the calculated value
* @returns true if data defined property could be successfully evaluated
* @param property data defined property to evaluate
* @param expressionValue QVariant for storing the evaluated value
* @param context expression context for evaluating expressions. Must have feature and fields set to current
* atlas feature and coverage layer fields prior to calling this method.
* @note this method was added in version 2.5
*/
bool dataDefinedEvaluate( const QgsComposerObject::DataDefinedProperty property, QVariant &expressionValue, const QgsExpressionContext& context = QgsExpressionContext() ) const;

signals:
/** Emitted when the item changes. Signifies that the item widgets must update the
* gui elements.
@@ -134,20 +134,65 @@ class QgsComposerScaleBar: QgsComposerItem
*/
void setFontColor( const QColor& c );

/** Returns the color used for fills in the scalebar.
* @see setFillColor()
* @see fillColor2()
* @note added in QGIS 3.0
*/
QColor fillColor() const;

/** Sets the color used for fills in the scalebar.
* @see fillColor()
* @see setFillColor2()
* @note added in QGIS 3.0
*/
void setFillColor( const QColor& color );

/** Returns the secondary color used for fills in the scalebar.
* @see setFillColor2()
* @see fillColor()
* @note added in QGIS 3.0
*/
QColor fillColor2() const;

/** Sets the secondary color used for fills in the scalebar.
* @see fillColor2()
* @see setFillColor2()
* @note added in QGIS 3.0
*/
void setFillColor2( const QColor& color );

/** Returns the color used for lines in the scalebar.
* @see setLineColor()
* @note added in QGIS 3.0
*/
QColor lineColor() const;

/** Sets the color used for lines in the scalebar.
* @see lineColor()
* @note added in QGIS 3.0
*/
void setLineColor( const QColor& color );

/** Returns the line width in millimeters for lines in the scalebar.
* @see setLineWidth()
* @note added in QGIS 3.0
*/
double lineWidth() const;

/** Sets the line width in millimeters for lines in the scalebar.
* @see lineWidth()
* @note added in QGIS 3.0
*/
void setLineWidth( double width );

/** Returns the pen used for drawing the scalebar.
* @returns QPen used for drawing the scalebar outlines.
* @see setPen
* @see brush
*/
QPen pen() const;

/** Sets the pen used for drawing the scalebar.
* @param pen QPen to use for drawing the scalebar outlines.
* @see pen
* @see setBrush
*/
void setPen( const QPen& pen );

/** Returns the primary brush for the scalebar.
* @returns QBrush used for filling the scalebar
* @see setBrush
@@ -156,14 +201,6 @@ class QgsComposerScaleBar: QgsComposerItem
*/
QBrush brush() const;

/** Sets primary brush for the scalebar.
* @param brush QBrush to use for filling the scalebar
* @see brush
* @see setBrush2
* @see setPen
*/
void setBrush( const QBrush& brush );

/** Returns the secondary brush for the scalebar. This is used for alternating color style scalebars, such
* as single and double box styles.
* @returns QBrush used for secondary color areas
@@ -172,14 +209,6 @@ class QgsComposerScaleBar: QgsComposerItem
*/
QBrush brush2() const;

/** Sets secondary brush for the scalebar. This is used for alternating color style scalebars, such
* as single and double box styles.
* @param brush QBrush to use for secondary color areas
* @see brush2
* @see setBrush
*/
void setBrush2( const QBrush& brush );

double height() const;
void setHeight( double h );

@@ -280,6 +309,7 @@ class QgsComposerScaleBar: QgsComposerItem
void updateSegmentSize();
/** Sets mCompositionMap to 0 if the map is deleted*/
void invalidateCurrentMap();
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext* context = nullptr );

protected:
/** Calculates with of a segment in mm and stores it in mSegmentMillimeters*/

0 comments on commit ea116fd

Please sign in to comment.