Skip to content

Commit

Permalink
update Python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Nov 2, 2016
1 parent 2497375 commit 75b23cb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
10 changes: 10 additions & 0 deletions python/core/raster/qgscolorrampshader.sip
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,22 @@ class QgsColorRampShader : QgsRasterShaderFunction
/** \brief Get the color ramp type */
QgsColorRampShader::ColorRamp_TYPE colorRampType() const;

/** \brief Get the original color ramp name
* @note added in QGIS 3.0
*/
QString colorRampName() const;

/** \brief Get the color ramp type as a string */
QString colorRampTypeAsQString();

/** \brief Set custom colormap */
void setColorRampItemList( const QList<QgsColorRampShader::ColorRampItem>& theList ); //TODO: sort on set

/** \brief Set the source color ramp name
* @note added in QGIS 3.0
*/
void setColorRampName( const QString& theName );

/** \brief Set the color ramp type*/
void setColorRampType( QgsColorRampShader::ColorRamp_TYPE theColorRampType );

Expand Down
16 changes: 10 additions & 6 deletions src/core/raster/qgscolorrampshader.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
//! \brief Get the color ramp type
QgsColorRampShader::ColorRamp_TYPE colorRampType() const {return mColorRampType;}

//! \brief Get the color ramp type as a string
// \brief Get the color ramp type as a string
QString colorRampTypeAsQString();

//! \brief Get the original color ramp name
/** \brief Get the original color ramp name
* @note added in QGIS 3.0
*/
QString colorRampName() const {return mColorRampName;}

//! \brief Set custom colormap
Expand All @@ -84,12 +86,14 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
//! \brief Set the color ramp type
void setColorRampType( QgsColorRampShader::ColorRamp_TYPE theColorRampType );

//! \brief Set the color ramp type
void setColorRampType( const QString& theType );

//! \brief Set the source color ramp name
/** \brief Set the source color ramp name
* @note added in QGIS 3.0
*/
void setColorRampName( const QString& theName );

// \brief Set the color ramp type
void setColorRampType( const QString& theType );

//! \brief Generates and new RGB value based on one input value
bool shade( double, int*, int*, int*, int* ) override;

Expand Down

0 comments on commit 75b23cb

Please sign in to comment.