Skip to content

Commit 75b23cb

Browse files
committed
update Python bindings
1 parent 2497375 commit 75b23cb

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

python/core/raster/qgscolorrampshader.sip

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,22 @@ class QgsColorRampShader : QgsRasterShaderFunction
4040
/** \brief Get the color ramp type */
4141
QgsColorRampShader::ColorRamp_TYPE colorRampType() const;
4242

43+
/** \brief Get the original color ramp name
44+
* @note added in QGIS 3.0
45+
*/
46+
QString colorRampName() const;
47+
4348
/** \brief Get the color ramp type as a string */
4449
QString colorRampTypeAsQString();
4550

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

54+
/** \brief Set the source color ramp name
55+
* @note added in QGIS 3.0
56+
*/
57+
void setColorRampName( const QString& theName );
58+
4959
/** \brief Set the color ramp type*/
5060
void setColorRampType( QgsColorRampShader::ColorRamp_TYPE theColorRampType );
5161

src/core/raster/qgscolorrampshader.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
7272
//! \brief Get the color ramp type
7373
QgsColorRampShader::ColorRamp_TYPE colorRampType() const {return mColorRampType;}
7474

75-
//! \brief Get the color ramp type as a string
75+
// \brief Get the color ramp type as a string
7676
QString colorRampTypeAsQString();
7777

78-
//! \brief Get the original color ramp name
78+
/** \brief Get the original color ramp name
79+
* @note added in QGIS 3.0
80+
*/
7981
QString colorRampName() const {return mColorRampName;}
8082

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

87-
//! \brief Set the color ramp type
88-
void setColorRampType( const QString& theType );
89-
90-
//! \brief Set the source color ramp name
89+
/** \brief Set the source color ramp name
90+
* @note added in QGIS 3.0
91+
*/
9192
void setColorRampName( const QString& theName );
9293

94+
// \brief Set the color ramp type
95+
void setColorRampType( const QString& theType );
96+
9397
//! \brief Generates and new RGB value based on one input value
9498
bool shade( double, int*, int*, int*, int* ) override;
9599

0 commit comments

Comments
 (0)