From 75b23cb55c654d073680992e082c718bcf1cc29e Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Thu, 15 Sep 2016 17:00:21 +0300 Subject: [PATCH] update Python bindings --- python/core/raster/qgscolorrampshader.sip | 10 ++++++++++ src/core/raster/qgscolorrampshader.h | 16 ++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/python/core/raster/qgscolorrampshader.sip b/python/core/raster/qgscolorrampshader.sip index ddad2fe1e967..77728130447d 100644 --- a/python/core/raster/qgscolorrampshader.sip +++ b/python/core/raster/qgscolorrampshader.sip @@ -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& 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 ); diff --git a/src/core/raster/qgscolorrampshader.h b/src/core/raster/qgscolorrampshader.h index 02730d4ebc25..74ccd982c241 100644 --- a/src/core/raster/qgscolorrampshader.h +++ b/src/core/raster/qgscolorrampshader.h @@ -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 @@ -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;