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, pointSize: float = 0) Constructor for a new
QgsPointCloudCategory
, with the specifiedvalue
andcolor
.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).QgsPointCloudCategory(
QgsPointCloudCategory
)Methods
Returns the color which will be used to render this category.
Returns the label for this category, which is used to represent the category within legends and the layer tree.
Returns the point size for this category.
Returns
True
if the category is currently enabled and should be rendered.Sets the
color
which will be used to render this category.Sets the
label
for this category, which is used to represent the category within legends and the layer tree.Sets the point size for this category.
Sets whether the category is currently enabled and should be rendered.
Sets the
value
corresponding to this category.Returns the value corresponding to this category.
- color(self) QColor ¶
Returns the color which will be used to render this category.
See also
- 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
- Return type:
str
- pointSize(self) float ¶
Returns the point size for this category.
See also
New in version 3.36.
- Return type:
float
- renderState(self) bool ¶
Returns
True
if the category is currently enabled and should be rendered.See also
- Return type:
bool
- setColor(self, color: QColor | Qt.GlobalColor | QGradient)¶
Sets the
color
which will be used to render this category.See also
- 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
- Parameters:
label (str) –
- setPointSize(self, size: float)¶
Sets the point size for this category.
See also
New in version 3.36.
- Parameters:
size (float) –
- setRenderState(self, render: bool)¶
Sets whether the category is currently enabled and should be rendered.
See also
- Parameters:
render (bool) –
- setValue(self, value: int)¶
Sets the
value
corresponding to this category.See also
- Parameters:
value (int) –
- value(self) int ¶
Returns the value corresponding to this category.
See also
- Return type:
int