Skip to content
Permalink
Browse files
Added convenience constructor for color ramp shader
git-svn-id: http://svn.osgeo.org/qgis/trunk@14023 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Aug 7, 2010
1 parent 84003c0 commit 1f6ffcb027ad344d3ff549e97ebac502220239fc
Showing with 10 additions and 0 deletions.
  1. +5 −0 python/core/qgsrastershaderfunction.sip
  2. +5 −0 src/core/raster/qgscolorrampshader.h
@@ -52,6 +52,11 @@ class QgsColorRampShader : QgsRasterShaderFunction
//not a color but a quantity, e.g. temperature or elevation
struct ColorRampItem
{
//! default constructor
ColorRampItem();
//! convenience constructor - added in v1.6
ColorRampItem( double val, QColor col, QString lbl = QString() );

QString label;
double value;
QColor color;
@@ -41,6 +41,11 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
//not a color but a quantity, e.g. temperature or elevation
struct ColorRampItem
{
//! default constructor
ColorRampItem() {}
//! convenience constructor - added in v1.6
ColorRampItem( double val, QColor col, QString lbl = QString() ) : label(lbl), value(val), color(col) {}

QString label;
double value;
QColor color;

0 comments on commit 1f6ffcb

Please sign in to comment.