Class: QgsRendererRange¶
Methods
Dumps a string representation of the range.  | 
|
Returns the label used for the range.  | 
|
Returns the lower bound of the range.  | 
|
Returns   | 
|
Sets the label used for the range.  | 
|
Sets the lower bound of the range.  | 
|
Sets whether the range should be rendered.  | 
|
Sets the symbol used for the range.  | 
|
Sets the upper bound of the range.  | 
|
Returns the symbol used for the range.  | 
|
Creates a DOM element representing the range in SLD format.  | 
|
Returns the upper bound of the range.  | 
|
Returns the unique identifier for this range.  | 
- class qgis.core.QgsRendererRange[source]¶
 Bases:
object- __init__(range: QgsClassificationRange, symbol: QgsSymbol | None, render: bool = True, uuid: str | None = '')
 Creates a renderer symbol range
- Parameters:
 range (QgsClassificationRange) – The classification range
symbol (Optional[QgsSymbol]) – The symbol for this renderer range
render (bool = True) – If
True, it will be renderereduuid (Optional[str] = '') – Optional parameter to manually set the UUID key identifier for the this range (since QGIS 3.34).
- __init__(lowerValue: float, upperValue: float, symbol: QgsSymbol | None, label: str | None, render: bool = True, uuid: str | None = '')
 Creates a renderer symbol range
- Parameters:
 lowerValue (float) – The lower bound of the range
upperValue (float) – The upper bound of the range
symbol (Optional[QgsSymbol]) – The symbol for this renderer range
label (Optional[str]) – The label used for the range
render (bool = True) – If
True, it will be renderereduuid (Optional[str] = '') – Optional parameter to manually set the UUID key identifier for the this range (since QGIS 3.34).
- __init__(range: QgsRendererRange)
 - Parameters:
 range (QgsRendererRange)
- lowerValue(self) float[source]¶
 Returns the lower bound of the range.
See also
See also
- Return type:
 float
- renderState(self) bool[source]¶
 Returns
Trueif the range should be rendered.See also
- Return type:
 bool
- setLabel(self, label: str | None)[source]¶
 Sets the label used for the range.
See also
- Parameters:
 label (Optional[str])
- setLowerValue(self, lowerValue: float)[source]¶
 Sets the lower bound of the range.
See also
See also
- Parameters:
 lowerValue (float)
- setRenderState(self, render: bool)[source]¶
 Sets whether the range should be rendered.
See also
- Parameters:
 render (bool)
- setSymbol(self, s: QgsSymbol | None)[source]¶
 Sets the symbol used for the range.
Ownership of the symbol is transferred.
See also
- Parameters:
 s (Optional[QgsSymbol])
- setUpperValue(self, upperValue: float)[source]¶
 Sets the upper bound of the range.
See also
See also
- Parameters:
 upperValue (float)
- symbol(self) QgsSymbol | None[source]¶
 Returns the symbol used for the range.
See also
- Return type:
 Optional[QgsSymbol]
- toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any], firstRange: bool = False)[source]¶
 Creates a DOM element representing the range in SLD format.
- Parameters:
 doc (QDomDocument) – DOM document
element (QDomElement) – destination DOM element
props (Dict[str, Any]) – graduated renderer properties
firstRange (bool = False) – set to
Trueif the range is the first range, where the lower value uses a <= test rather than a < test.