Skip to content
Permalink
Browse files

Merge pull request #3432 from nyalldawson/ramps

Color ramp API improvements, fixes + some style dock inlining
  • Loading branch information
nyalldawson committed Aug 25, 2016
2 parents 1387695 + 5ac5035 commit e71e743c9d1323c2f337e1f7301b737a4f0c829e
Showing with 1,730 additions and 1,183 deletions.
  1. +43 −11 doc/api_break.dox
  2. +1 −1 python/core/core.sip
  3. +4 −4 python/core/effects/qgsgloweffect.sip
  4. +1 −1 python/core/effects/qgsimageoperation.sip
  5. +54 −44 python/core/{symbology-ng/qgsvectorcolorramp.sip → qgscolorramp.sip}
  6. +3 −3 python/core/symbology-ng/qgscategorizedsymbolrenderer.sip
  7. +7 −7 python/core/symbology-ng/qgsfillsymbollayer.sip
  8. +4 −4 python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip
  9. +2 −2 python/core/symbology-ng/qgsheatmaprenderer.sip
  10. +10 −9 python/core/symbology-ng/qgsstyle.sip
  11. +4 −4 python/core/symbology-ng/qgssymbollayerutils.sip
  12. +3 −3 python/gui/gui.sip
  13. +73 −0 python/gui/qgscolorbrewercolorrampdialog.sip
  14. +50 −0 python/gui/qgsgradientcolorrampdialog.sip
  15. +3 −3 python/gui/qgsgradientstopeditor.sip
  16. +91 −0 python/gui/qgslimitedrandomcolorrampdialog.sip
  17. +1 −1 python/gui/symbology-ng/qgscategorizedsymbolrendererwidget.sip
  18. +11 −4 python/gui/symbology-ng/qgscolorrampcombobox.sip
  19. +30 −25 python/gui/symbology-ng/qgscptcitycolorrampdialog.sip
  20. +0 −19 python/gui/symbology-ng/qgsvectorcolorbrewercolorrampdialog.sip
  21. +0 −19 python/gui/symbology-ng/qgsvectorgradientcolorrampdialog.sip
  22. +0 −22 python/gui/symbology-ng/qgsvectorrandomcolorrampdialog.sip
  23. +2 −2 src/app/qgsidentifyresultsdialog.cpp
  24. +3 −4 src/app/qgsprojectproperties.cpp
  25. +2 −2 src/core/CMakeLists.txt
  26. +5 −5 src/core/effects/qgsgloweffect.cpp
  27. +6 −6 src/core/effects/qgsgloweffect.h
  28. +1 −1 src/core/effects/qgsimageoperation.cpp
  29. +2 −2 src/core/effects/qgsimageoperation.h
  30. +55 −52 src/core/{symbology-ng/qgsvectorcolorramp.cpp → qgscolorramp.cpp}
  31. +162 −59 src/core/{symbology-ng/qgsvectorcolorramp.h → qgscolorramp.h}
  32. +2 −2 src/core/qgsexpression.cpp
  33. +5 −5 src/core/symbology-ng/qgscategorizedsymbolrenderer.cpp
  34. +5 −5 src/core/symbology-ng/qgscategorizedsymbolrenderer.h
  35. +1 −1 src/core/symbology-ng/qgscptcityarchive.h
  36. +9 −9 src/core/symbology-ng/qgsfillsymbollayer.cpp
  37. +25 −14 src/core/symbology-ng/qgsfillsymbollayer.h
  38. +5 −5 src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp
  39. +17 −6 src/core/symbology-ng/qgsgraduatedsymbolrenderer.h
  40. +3 −3 src/core/symbology-ng/qgsheatmaprenderer.cpp
  41. +4 −4 src/core/symbology-ng/qgsheatmaprenderer.h
  42. +14 −13 src/core/symbology-ng/qgsstyle.cpp
  43. +12 −11 src/core/symbology-ng/qgsstyle.h
  44. +8 −8 src/core/symbology-ng/qgssymbollayerutils.cpp
  45. +29 −5 src/core/symbology-ng/qgssymbollayerutils.h
  46. +6 −6 src/gui/CMakeLists.txt
  47. +2 −2 src/gui/effects/qgspainteffectwidget.cpp
  48. +47 −20 src/gui/{symbology-ng/qgsvectorcolorbrewercolorrampdialog.cpp → qgscolorbrewercolorrampdialog.cpp}
  49. +113 −0 src/gui/qgscolorbrewercolorrampdialog.h
  50. +74 −59 src/gui/{symbology-ng/qgsvectorgradientcolorrampdialog.cpp → qgsgradientcolorrampdialog.cpp}
  51. +44 −17 src/gui/{symbology-ng/qgsvectorgradientcolorrampdialog.h → qgsgradientcolorrampdialog.h}
  52. +2 −2 src/gui/qgsgradientstopeditor.cpp
  53. +5 −5 src/gui/qgsgradientstopeditor.h
  54. +130 −0 src/gui/qgslimitedrandomcolorrampdialog.cpp
  55. +124 −0 src/gui/qgslimitedrandomcolorrampdialog.h
  56. +4 −4 src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
  57. +9 −8 src/gui/symbology-ng/qgscategorizedsymbolrendererwidget.cpp
  58. +1 −1 src/gui/symbology-ng/qgscategorizedsymbolrendererwidget.h
  59. +82 −39 src/gui/symbology-ng/qgscolorrampcombobox.cpp
  60. +17 −6 src/gui/symbology-ng/qgscolorrampcombobox.h
  61. +68 −64 src/gui/symbology-ng/qgscptcitycolorrampdialog.cpp
  62. +38 −6 src/gui/symbology-ng/qgscptcitycolorrampdialog.h
  63. +6 −8 src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.cpp
  64. +2 −2 src/gui/symbology-ng/qgsheatmaprendererwidget.cpp
  65. +4 −5 src/gui/symbology-ng/qgsstyleexportimportdialog.cpp
  66. +37 −46 src/gui/symbology-ng/qgsstylemanagerdialog.cpp
  67. +4 −4 src/gui/symbology-ng/qgssymbollayerwidget.cpp
  68. +0 −48 src/gui/symbology-ng/qgsvectorcolorbrewercolorrampdialog.h
  69. +0 −97 src/gui/symbology-ng/qgsvectorrandomcolorrampdialog.cpp
  70. +0 −51 src/gui/symbology-ng/qgsvectorrandomcolorrampdialog.h
  71. +31 −86 src/ui/{qgsvectorcolorbrewercolorrampv2dialogbase.ui → qgscolorbrewercolorrampwidgetbase.ui}
  72. +9 −9 src/ui/{qgsvectorgradientcolorrampv2dialogbase.ui → qgsgradientcolorrampdialogbase.ui}
  73. +42 −121 src/ui/{qgsvectorrandomcolorrampv2dialogbase.ui → qgslimitedrandomcolorrampwidgetbase.ui}
  74. +2 −2 tests/src/core/testqgsgradients.cpp
  75. +5 −5 tests/src/core/testqgsimageoperation.cpp
  76. +2 −2 tests/src/core/testqgspainteffect.cpp
  77. +7 −7 tests/src/core/testqgsrasterlayer.cpp
  78. +1 −1 tests/src/core/testqgsrastersublayer.cpp
  79. +2 −2 tests/src/core/testqgsshapeburst.cpp
  80. +9 −9 tests/src/core/testqgsstyle.cpp
  81. +1 −1 tests/src/core/testqgssymbol.cpp
  82. +2 −2 tests/src/python/test_qgsgraduatedsymbolrenderer.py
  83. +26 −26 tests/src/python/test_qgsvectorcolorramp.py
@@ -72,7 +72,7 @@ This page tries to maintain a list with incompatible changes that happened in pr
<tr><td>QgsMultiLineStringV2<td>QgsMultiLineString
<tr><td>QgsMultiSurfaceV2<td>QgsMultiSurface
<tr><td>QgsPointSequenceV2<td>QgsPointSequence
<tr><td>QgsRandomColorsV2<td>QgsRandomColors
<tr><td>QgsRandomColorsV2<td>QgsRandomColorRamp
<tr><td>QgsRendererCategoryV2<td>QgsRendererCategory
<tr><td>QgsRendererRangeV2<td>QgsRendererRange
<tr><td>QgsRendererRangeV2LabelFomat<td>QgsRendererRangeLabelFomat
@@ -125,19 +125,19 @@ This page tries to maintain a list with incompatible changes that happened in pr
<tr><td>QgsSymbolV2SelectorDialog<td>QgsSymbolSelectorDialog
<tr><td>QgsSymbolV2SelectorWidget<td>QgsSymbolSelectorWidget
<tr><td>QgsSymbologyV2Conversion<td>QgsSymbologyConversion
<tr><td>QgsVectorColorBrewerColorRampV2<td>QgsVectorColorBrewerColorRamp
<tr><td>QgsVectorColorBrewerColorRampV2Dialog<td>QgsVectorColorBrewerColorRampDialog
<tr><td>QgsVectorColorBrewerColorRampV2DialogBase<td>QgsVectorColorBrewerColorRampDialogBase
<tr><td>QgsVectorColorRampV2<td>QgsVectorColorRamp
<tr><td>QgsVectorColorBrewerColorRampV2<td>QgsColorBrewerColorRamp
<tr><td>QgsVectorColorBrewerColorRampV2Dialog<td>QgsColorBrewerColorRampDialog
<tr><td>QgsVectorColorBrewerColorRampV2DialogBase<td>QgsColorBrewerColorRampDialogBase
<tr><td>QgsVectorColorRampV2<td>QgsColorRamp
<tr><td>QgsVectorColorRampV2Map<td>QgsVectorColorRampMap
<tr><td>QgsVectorGradientColorRampV2<td>QgsVectorGradientColorRamp
<tr><td>QgsVectorGradientColorRampV2Dialog<td>QgsVectorGradientColorRampDialog
<tr><td>QgsVectorGradientColorRampV2DialogBase<td>QgsVectorGradientColorRampDialogBase
<tr><td>QgsVectorGradientColorRampV2<td>QgsGradientColorRamp
<tr><td>QgsVectorGradientColorRampV2Dialog<td>QgsGradientColorRampDialog
<tr><td>QgsVectorGradientColorRampV2DialogBase<td>QgsGradientColorRampDialogBase
<tr><td>QgsVectorGradientRampV2<td>QgsVectorGradientRamp
<tr><td>QgsVectorLayersetRendererV2<td>QgsVectorLayersetRenderer
<tr><td>QgsVectorRandomColorRampV2<td>QgsVectorRandomColorRamp
<tr><td>QgsVectorRandomColorRampV2Dialog<td>QgsVectorRandomColorRampDialog
<tr><td>QgsVectorRandomColorRampV2DialogBase<td>QgsVectorRandomColorRampDialogBase
<tr><td>QgsVectorRandomColorRampV2<td>QgsLimitedRandomColorRamp
<tr><td>QgsVectorRandomColorRampV2Dialog<td>QgsLimitedRandomColorRampDialog
<tr><td>QgsVectorRandomColorRampV2DialogBase<td>QgsLimitedRandomColorRampDialogBase
<tr><th>QgsSymbolV2<th>QgsSymbol
</table>

@@ -295,6 +295,14 @@ variant instead.</li>
<li>GenericDataSourceURI has been renamed to GenericDataSourceUri</li>
</ul>

\subsection qgis_api_break_3_0_QgsColorBrewerColorRampDialog QgsColorBrewerColorRampDialog

<ul>
<li>The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().</li>
<li>Some internal methods which were previously public or protected were made private.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerLabel QgsComposerLabel

<ul>
@@ -389,6 +397,14 @@ plugins calling these methods will need to be updated.</li>
be returned in place of a null pointer.</li>
</ul>

\subsection qgis_api_break_3_0_QgsCptCityColorRampDialog QgsCptCityColorRampDialog

<ul>
<li>The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().</li>
<li>Some internal methods which were previously public or protected were made private.</li>
</ul>

\subsection qgis_api_break_3_0_QgsCptCitySelectionItem QgsCptCitySelectionItem

<ul>
@@ -559,6 +575,14 @@ method to determine if a geometry is valid.</li>
a QgsGeometry value rather than a pointer.</li>
</ul>

\subsection qgis_api_break_3_0_QgsGradientColorRampDialog QgsGradientColorRampDialog

<ul>
<li>The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().</li>
<li>Some internal methods which were previously public or protected were made private.</li>
</ul>

\subsection qgis_api_break_3_0_QgsGraphBuilderInterface QgsGraphBuilderInterface

<ul>
@@ -604,6 +628,14 @@ plugins calling this method will need to be updated.</li>
<li>writeCommonXML() has been renamed to writeCommonXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsLimitedRandomRampDialog QgsLimitedRandomColorRampDialog

<ul>
<li>The dialog no longer edits a color ramp in place. Instead, a copy of the ramp is edited
and the new ramp can be retrieved after executing the dialog by calling ramp().</li>
<li>Some internal methods which were previously public or protected were made private.</li>
</ul>

\subsection qgis_api_break_3_0_QgsMapCanvas QgsMapCanvas

<ul>
@@ -27,6 +27,7 @@
%Include qgsattributeeditorelement.sip
%Include qgsbrowsermodel.sip
%Include qgsclipper.sip
%Include qgscolorramp.sip
%Include qgscolorscheme.sip
%Include qgscolorschemeregistry.sip
%Include qgsconditionalstyle.sip
@@ -290,7 +291,6 @@
%Include symbology-ng/qgsstyle.sip
%Include symbology-ng/qgssvgcache.sip
%Include symbology-ng/qgssymbol.sip
%Include symbology-ng/qgsvectorcolorramp.sip

%Include symbology-ng/qgs25drenderer.sip
%Include symbology-ng/qgscategorizedsymbolrenderer.sip
@@ -129,15 +129,15 @@ class QgsGlowEffect : QgsPaintEffect
* @see ramp
* @see setColorType
*/
void setRamp( QgsVectorColorRamp* ramp /Transfer/ );
void setRamp( QgsColorRamp* ramp /Transfer/ );

/** Returns the color ramp used for the glow. This only applies if the @link colorType @endlink
* is set to ColorRamp. The glow will utilise colors from the ramp.
* @returns color ramp for glow
* @see setRamp
* @see colorType
*/
QgsVectorColorRamp* ramp() const;
QgsColorRamp* ramp() const;

/** Sets the blend mode for the effect
* @param mode blend mode used for drawing the effect on to a destination
@@ -153,7 +153,7 @@ class QgsGlowEffect : QgsPaintEffect
*/
QPainter::CompositionMode blendMode() const;

/** Sets the color mode to use for the glow. The glow can either be drawn using a QgsVectorColorRamp
/** Sets the color mode to use for the glow. The glow can either be drawn using a QgsColorRamp
* color ramp or by simply specificing a single color. setColorType is used to specify which mode to use
* for the glow.
* @param colorType color type to use for glow
@@ -163,7 +163,7 @@ class QgsGlowEffect : QgsPaintEffect
*/
void setColorType( GlowColorType colorType );

/** Returns the color mode used for the glow. The glow can either be drawn using a QgsVectorColorRamp
/** Returns the color mode used for the glow. The glow can either be drawn using a QgsColorRamp
* color ramp or by specificing a single color.
* @returns current color mode used for the glow
* @see setColorType
@@ -96,7 +96,7 @@ class QgsImageOperation
double spread;
/** Color ramp to use for shading the distance transform
*/
QgsVectorColorRamp* ramp;
QgsColorRamp* ramp;
};

/** Performs a distance transform on the source image and shades the result

0 comments on commit e71e743

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