Class: QgsPointCloudCategory

class qgis.core.QgsPointCloudCategory

Bases: sip.wrapper

Represents an individual category (class) from a QgsPointCloudClassifiedRenderer.

New in version 3.18.

QgsPointCloudCategory() Constructor for QgsPointCloudCategory.

QgsPointCloudCategory(value: int, color: Union[QColor, Qt.GlobalColor, QGradient], label: str, render: bool = True) Constructor for a new QgsPointCloudCategory, with the specified value and color.

The label argument specifies the label used for this category in legends and the layer tree.

The render argument indicates whether the category should initially be rendered and appear checked in the layer tree.

QgsPointCloudCategory(QgsPointCloudCategory)

Methods

color

Returns the color which will be used to render this category.

label

Returns the label for this category, which is used to represent the category within legends and the layer tree.

renderState

Returns True if the category is currently enabled and should be rendered.

setColor

Sets the color which will be used to render this category.

setLabel

Sets the label for this category, which is used to represent the category within legends and the layer tree.

setRenderState

Sets whether the category is currently enabled and should be rendered.

setValue

Sets the value corresponding to this category.

value

Returns the value corresponding to this category.

color(self) QColor

Returns the color which will be used to render this category.

See also

setColor()

Return type

QColor

label(self) str

Returns the label for this category, which is used to represent the category within legends and the layer tree.

See also

setLabel()

Return type

str

renderState(self) bool

Returns True if the category is currently enabled and should be rendered.

See also

setRenderState()

Return type

bool

setColor(self, color: Union[QColor, Qt.GlobalColor, QGradient])

Sets the color which will be used to render this category.

See also

color()

Parameters

color (Union[QColor) –

setLabel(self, label: str)

Sets the label for this category, which is used to represent the category within legends and the layer tree.

See also

label()

Parameters

label (str) –

setRenderState(self, render: bool)

Sets whether the category is currently enabled and should be rendered.

See also

renderState()

Parameters

render (bool) –

setValue(self, value: int)

Sets the value corresponding to this category.

See also

value()

Parameters

value (int) –

value(self) int

Returns the value corresponding to this category.

See also

setValue()

Return type

int