QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
18 #ifndef QGSPOINTDISTANCERENDERER_H
19 #define QGSPOINTDISTANCERENDERER_H
21 #include "qgis_core.h"
72 std::shared_ptr< QgsMarkerSymbol > mSymbol;
85 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props = QVariantMap() )
const override;
87 QSet<QString> usedAttributes( const
QgsRenderContext &context ) const override;
88 bool filterNeedsGeometry() const override;
96 QString legendKeyToExpression( const QString &key,
QgsVectorLayer *layer,
bool &ok ) const override;
104 bool legendSymbolItemsCheckable() const override;
105 bool legendSymbolItemChecked( const QString &key ) override;
106 void checkLegendSymbolItem( const QString &key,
bool state ) override;
118 void setLabelAttributeName( const QString &name ) { mLabelAttributeName = name; }
256 double mMinLabelScale = 0;
294 void printGroupInfo()
const;
297 QString getLabel(
const QgsFeature &feature )
const;
318 #endif // QGSPOINTDISTANCERENDERER_H
QString labelAttributeName() const
Returns the attribute name used for labeling points, or an empty string if no labeling will be done b...
RenderUnit
Rendering size units.
QMap< QgsFeatureId, QgsPointXY > mGroupLocations
Mapping of feature ID to approximate group location.
QgsUnitTypes::RenderUnit mToleranceUnit
Unit for distance tolerance.
Point geometry type, with support for z-dimension and m-values.
QString mLabelAttributeName
Attribute name for labeling. An empty string indicates that no labels should be rendered.
Container of fields for a vector layer.
Contains information about the context of a rendering operation.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
Abstract base class for all rendered symbols.
QFont mLabelFont
Label font.
const QgsMapUnitScale & toleranceMapUnitScale() const
Returns the map unit scale object for the distance tolerance.
A rectangle specified with double values.
std::unique_ptr< QgsFeatureRenderer > mRenderer
Embedded base renderer. This can be used for rendering individual, isolated points.
QList< ClusteredGroup > mClusteredGroups
Groups of features that are considered clustered together.
QgsUnitTypes::RenderUnit toleranceUnit() const
Returns the units for the tolerance distance.
Custom exception class for Coordinate Reference System related exceptions.
void setLabelColor(const QColor &color)
Sets the color to use for for labeling points.
int mLabelIndex
Label attribute index (or -1 if none). This index is not stored, it is requested in the startRender()...
QList< QgsSymbol * > QgsSymbolList
A marker symbol type, for rendering Point and MultiPoint geometries.
QColor mLabelColor
Label text color.
An abstract base class for distance based point renderers (e.g., clusterer and displacement renderers...
QgsMarkerSymbol * symbol() const
Base symbol for rendering feature.
A spatial index for QgsFeature objects.
QgsMapUnitScale mToleranceMapUnitScale
Map unit scale for distance tolerance.
Struct for storing maximum and minimum scales for measurements in map units.
QColor labelColor() const
Returns the color used for for labeling points.
void setToleranceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale object for the distance tolerance.
Single scope for storing variables and functions for use within a QgsExpressionContext....
double tolerance() const
Returns the tolerance distance for grouping points.
QList< QgsPointDistanceRenderer::GroupedFeature > ClusteredGroup
A group of clustered points (ie features within the distance tolerance).
void setToleranceUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the tolerance distance.
Represents a vector layer which manages a vector based data sets.
QString label
Optional label text.
bool mDrawLabels
Whether labels should be drawn for points. This is set internally from startRender() depending on sca...
void setLabelFont(const QFont &font)
Sets the font used for labeling points.
double minimumLabelScale() const
Returns the minimum map scale (i.e.
QFont labelFont() const
Returns the font used for labeling points.
void setMinimumLabelScale(double scale)
Sets the minimum map scale (i.e.
void setTolerance(double distance)
Sets the tolerance distance for grouping points.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
QList< QgsLegendSymbolItem > QgsLegendSymbolList
QMap< QgsFeatureId, int > mGroupIndex
Mapping of feature ID to the feature's group index.
QgsFeature feature
Feature.
double mTolerance
Distance tolerance. Points that are closer together than this distance are considered clustered.
bool isSelected
True if feature is selected and should be rendered in a selected state.
Contains properties for a feature within a clustered group.