File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,15 @@ class QgsVectorColorRampV2
6
6
7
7
%ConvertToSubClassCode
8
8
if (sipCpp->type() == "gradient")
9
- {
10
9
sipClass = sipClass_QgsVectorGradientColorRampV2;
11
- }
10
+ else if (sipCpp->type() == "random")
11
+ sipClass = sipClass_QgsVectorRandomColorRampV2;
12
+ else if (sipCpp->type() == "randomcolors")
13
+ sipClass = sipClass_QgsRandomColorsV2;
14
+ else if (sipCpp->type() == "colorbrewer")
15
+ sipClass = sipClass_QgsVectorColorBrewerColorRampV2;
16
+ else if (sipCpp->type() == "cpt-city")
17
+ sipClass = sipClass_QgsCptCityColorRampV2;
12
18
else
13
19
sipClass = 0;
14
20
%End
@@ -110,6 +116,13 @@ class QgsVectorRandomColorRampV2 : QgsVectorColorRampV2
110
116
111
117
virtual QgsStringMap properties() const;
112
118
119
+ /** Get a list of random colors
120
+ * @note added in 2.4 */
121
+ static QList<QColor> randomColors( int count,
122
+ int hueMax = DEFAULT_RANDOM_HUE_MAX, int hueMin = DEFAULT_RANDOM_HUE_MIN,
123
+ int satMax = DEFAULT_RANDOM_SAT_MAX, int satMin = DEFAULT_RANDOM_SAT_MIN,
124
+ int valMax = DEFAULT_RANDOM_VAL_MAX, int valMin = DEFAULT_RANDOM_VAL_MIN );
125
+
113
126
void updateColors();
114
127
115
128
int count() const;
You can’t perform that action at this time.
0 commit comments