Class: QgsPointCloudCategory

Represents an individual category (class) from a QgsPointCloudClassifiedRenderer.

Added in version 3.18.

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.

pointSize

Returns the point size for this category.

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.

setPointSize

Sets the point size for this category.

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.

class qgis.core.QgsPointCloudCategory[source]

Bases: object

__init__()
__init__(value: int, color: QColor | Qt.GlobalColor, label: str | None, render: bool = True, pointSize: float = 0)

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.

A positive pointSize argument overrides the layer’s point size setting for this category (added in QGIS 3.36).

Parameters:
  • value (int)

  • color (Union[QColor, Qt.GlobalColor])

  • label (Optional[str])

  • render (bool = True)

  • pointSize (float = 0)

__init__(a0: QgsPointCloudCategory)
Parameters:

a0 (QgsPointCloudCategory)

color(self) QColor[source]

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

See also

setColor()

Return type:

QColor

label(self) str[source]

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

pointSize(self) float[source]

Returns the point size for this category.

See also

setPointSize()

Added in version 3.36.

Return type:

float

renderState(self) bool[source]

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

See also

setRenderState()

Return type:

bool

setColor(self, color: QColor | Qt.GlobalColor)[source]

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

See also

color()

Parameters:

color (Union[QColor, Qt.GlobalColor])

setLabel(self, label: str | None)[source]

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

See also

label()

Parameters:

label (Optional[str])

setPointSize(self, size: float)[source]

Sets the point size for this category.

See also

pointSize()

Added in version 3.36.

Parameters:

size (float)

setRenderState(self, render: bool)[source]

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

See also

renderState()

Parameters:

render (bool)

setValue(self, value: int)[source]

Sets the value corresponding to this category.

See also

value()

Parameters:

value (int)

value(self) int[source]

Returns the value corresponding to this category.

See also

setValue()

Return type:

int