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 98f68a4 commit 1207e384975fbee053e94c28deeec8ee0b4a4fe3
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 1207e38

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