Skip to content

Commit

Permalink
Merge pull request qgis#59591 from nyalldawson/color_ramp_ne
Browse files Browse the repository at this point in the history
Add != operator for QgsColorRampShader
  • Loading branch information
alexbruy authored Nov 26, 2024
2 parents 5ed3627 + 6b468bc commit 1b8df45
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Creates a new color ramp shader.

bool operator==( const QgsColorRampShader &other ) const;

bool operator!=( const QgsColorRampShader &other ) const;

struct ColorRampItem
{

Expand Down
2 changes: 2 additions & 0 deletions python/core/auto_generated/raster/qgscolorrampshader.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Creates a new color ramp shader.

bool operator==( const QgsColorRampShader &other ) const;

bool operator!=( const QgsColorRampShader &other ) const;

struct ColorRampItem
{

Expand Down
5 changes: 5 additions & 0 deletions src/core/raster/qgscolorrampshader.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
return true;
}

bool operator!=( const QgsColorRampShader &other ) const
{
return !( *this == other );
}

//An entry for classification based upon value.
//Such a classification is typically used for
//single band layers where a pixel value represents
Expand Down

0 comments on commit 1b8df45

Please sign in to comment.