Class: QgsRendererRange

class qgis.core.QgsRendererRange

Bases: sip.wrapper

Constructor for QgsRendererRange.

QgsRendererRange(range: QgsClassificationRange, symbol: QgsSymbol, render: bool = True) Creates a renderer symbol range

Parameters
  • range – The classification range

  • symbol – The symbol for this renderer range

  • render – If true, it will be renderered

QgsRendererRange(lowerValue: float, upperValue: float, symbol: QgsSymbol, label: str, render: bool = True)

QgsRendererRange(range: QgsRendererRange)

Methods

dump

rtype

str

label

rtype

str

lowerValue

rtype

float

renderState

rtype

bool

setLabel

param label

setLowerValue

param lowerValue

setRenderState

param render

setSymbol

param s

setUpperValue

param upperValue

swap

param other

symbol

rtype

QgsSymbol

toSld

Creates a DOM element representing the range in SLD format.

upperValue

rtype

float

dump(self) → str
Return type

str

label(self) → str
Return type

str

lowerValue(self) → float
Return type

float

renderState(self) → bool
Return type

bool

setLabel(self, label: str)
Parameters

label (str) –

setLowerValue(self, lowerValue: float)
Parameters

lowerValue (float) –

setRenderState(self, render: bool)
Parameters

render (bool) –

setSymbol(self, s: QgsSymbol)
Parameters

s (QgsSymbol) –

setUpperValue(self, upperValue: float)
Parameters

upperValue (float) –

swap(self, other: QgsRendererRange)
Parameters

other (QgsRendererRange) –

symbol(self) → QgsSymbol
Return type

QgsSymbol

toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str], firstRange: bool = False)

Creates a DOM element representing the range in SLD format.

Parameters
  • doc (QDomDocument) – DOM document

  • element (QDomElement) – destination DOM element

  • props (Dict[str) – graduated renderer properties

  • firstRange (bool = False) – set to True if the range is the first range, where the lower value uses a <= test rather than a < test.

upperValue(self) → float
Return type

float