Skip to content
Permalink
Browse files

Add missing color ramp methods and conversions to sip

(cherry-picked from 56a48ed)
  • Loading branch information
nyalldawson committed Aug 5, 2015
1 parent 877b7d9 commit abd4d1d8b6d445fc41b2a9a5e68f2202db0a6705
Showing with 15 additions and 2 deletions.
  1. +15 −2 python/core/symbology-ng/qgsvectorcolorrampv2.sip
@@ -6,9 +6,15 @@ class QgsVectorColorRampV2

%ConvertToSubClassCode
if (sipCpp->type() == "gradient")
{
sipClass = sipClass_QgsVectorGradientColorRampV2;
}
else if (sipCpp->type() == "random")
sipClass = sipClass_QgsVectorRandomColorRampV2;
else if (sipCpp->type() == "randomcolors")
sipClass = sipClass_QgsRandomColorsV2;
else if (sipCpp->type() == "colorbrewer")
sipClass = sipClass_QgsVectorColorBrewerColorRampV2;
else if (sipCpp->type() == "cpt-city")
sipClass = sipClass_QgsCptCityColorRampV2;
else
sipClass = 0;
%End
@@ -110,6 +116,13 @@ class QgsVectorRandomColorRampV2 : QgsVectorColorRampV2

virtual QgsStringMap properties() const;

/** Get a list of random colors
* @note added in 2.4 */
static QList<QColor> randomColors( int count,
int hueMax = DEFAULT_RANDOM_HUE_MAX, int hueMin = DEFAULT_RANDOM_HUE_MIN,
int satMax = DEFAULT_RANDOM_SAT_MAX, int satMin = DEFAULT_RANDOM_SAT_MIN,
int valMax = DEFAULT_RANDOM_VAL_MAX, int valMin = DEFAULT_RANDOM_VAL_MIN );

void updateColors();

int count() const;

0 comments on commit abd4d1d

Please sign in to comment.
You can’t perform that action at this time.