Skip to content

Commit

Permalink
Merge pull request #3432 from nyalldawson/ramps
Browse files Browse the repository at this point in the history
Color ramp API improvements, fixes + some style dock inlining
  • Loading branch information
nyalldawson committed Aug 25, 2016
2 parents 1387695 + 5ac5035 commit e71e743
Show file tree
Hide file tree
Showing 83 changed files with 1,730 additions and 1,183 deletions.
54 changes: 43 additions & 11 deletions doc/api_break.dox
Expand Up @@ -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
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion python/core/core.sip
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions python/core/effects/qgsgloweffect.sip
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/core/effects/qgsimageoperation.sip
Expand Up @@ -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
Expand Down

0 comments on commit e71e743

Please sign in to comment.