QGIS API Documentation 4.3.0-Master (2b7e6c9893e)
Loading...
Searching...
No Matches
QgsLabelFeatureDetails Class Reference

Encapsulates details for an individual feature to label. More...

#include <qgsvectorlayerlabelprovider.h>

Public Member Functions

bool isSelected () const
 Returns true if the feature associated with the label is currently selected.
QgsGeometry obstacleGeometry () const
 Returns the (optional) obstacle geometry for the label.
void setIsSelected (bool selected)
 Sets whether the feature associated with the label is currently selected.
void setObstacleGeometry (const QgsGeometry &geometry)
 Sets the (optional) obstacle geometry for the label.
void setSymbol (const QgsSymbol *symbol)
 Sets the (optional) symbol associated with the feature to label.
const QgsSymbolsymbol () const
 Returns the (optional) symbol associated with the feature to label.

Detailed Description

Encapsulates details for an individual feature to label.

Note
not available in Python bindings
Since
QGIS 4.4

Definition at line 38 of file qgsvectorlayerlabelprovider.h.

Member Function Documentation

◆ isSelected()

bool QgsLabelFeatureDetails::isSelected ( ) const

Returns true if the feature associated with the label is currently selected.

See also
setIsSelected()

Definition at line 75 of file qgsvectorlayerlabelprovider.cpp.

◆ obstacleGeometry()

QgsGeometry QgsLabelFeatureDetails::obstacleGeometry ( ) const

Returns the (optional) obstacle geometry for the label.

This geometry is used when a different geometry to the feature's geometry should be used as an obstacle for labels (e.g., if the feature has been rendered with an offset point symbol, the obstacle geometry should represent the bounds of the offset symbol).

If not set, the feature's original geometry will be used as an obstacle for labels.

See also
setObstacleGeometry()

Definition at line 55 of file qgsvectorlayerlabelprovider.cpp.

◆ setIsSelected()

void QgsLabelFeatureDetails::setIsSelected ( bool selected)

Sets whether the feature associated with the label is currently selected.

See also
isSelected()

Definition at line 80 of file qgsvectorlayerlabelprovider.cpp.

◆ setObstacleGeometry()

void QgsLabelFeatureDetails::setObstacleGeometry ( const QgsGeometry & geometry)

Sets the (optional) obstacle geometry for the label.

This geometry is used when a different geometry to the feature's geometry should be used as an obstacle for labels (e.g., if the feature has been rendered with an offset point symbol, the obstacle geometry should represent the bounds of the offset symbol).

If not set, the feature's original geometry will be used as an obstacle for labels.

See also
obstacleGeometry()

Definition at line 60 of file qgsvectorlayerlabelprovider.cpp.

◆ setSymbol()

void QgsLabelFeatureDetails::setSymbol ( const QgsSymbol * symbol)

Sets the (optional) symbol associated with the feature to label.

Warning
ownership is not transferred - the symbol must exist until after labeling is complete.
See also
setSymbol()

Definition at line 70 of file qgsvectorlayerlabelprovider.cpp.

◆ symbol()

const QgsSymbol * QgsLabelFeatureDetails::symbol ( ) const

Returns the (optional) symbol associated with the feature to label.

See also
setSymbol()

Definition at line 65 of file qgsvectorlayerlabelprovider.cpp.


The documentation for this class was generated from the following files: