15 #ifndef QGSDIAGRAMRENDERERV2_H 16 #define QGSDIAGRAMRENDERERV2_H 23 #include <QDomDocument> 336 , scaleByArea( true )
337 , angleOffset( 90 * 16 )
338 , scaleBasedVisibility( false )
339 , minScaleDenominator( -1 )
340 , maxScaleDenominator( -1 )
439 virtual QString rendererName()
const = 0;
534 static int dpiPaintDevice(
const QPainter* );
608 void setLowerValue(
double val ) { mInterpolationSettings.lowerValue = val; }
609 double lowerValue()
const {
return mInterpolationSettings.lowerValue; }
611 void setUpperValue(
double val ) { mInterpolationSettings.upperValue = val; }
612 double upperValue()
const {
return mInterpolationSettings.upperValue; }
644 #endif // QGSDIAGRAMRENDERERV2_H void setClassificationAttributeIsExpression(bool isExpression)
double zIndex
Z-index of diagrams, where diagrams with a higher z-index are drawn on top of diagrams with a lower z...
void setLinePlacementFlags(unsigned int flags)
Sets the the diagram placement flags.
QgsDiagram * diagram() const
double minimumSize
Scale diagrams smaller than mMinimumSize to mMinimumSize.
OutputUnit
The unit of the output.
void setClassificationAttributeExpression(const QString &expression)
double minScaleDenominator
bool showAll
Whether to show all diagrams, including overlapping diagrams.
bool isObstacle() const
Returns whether the feature associated with a diagram acts as an obstacle for other labels or diagram...
double getZIndex() const
Returns the diagram z-index.
Renders the diagrams for all features with the same settings.
void setAttributeLegend(bool enabled)
Sets whether the renderer will show legend items for diagram attributes.
QList< QString > categoryAttributes
int yPosColumn
Attribute index for y coordinate (or -1 if position not data defined)
bool classificationAttributeIsExpression
A set of features which influence the labelling process.
void setSizeLegend(bool enabled)
Sets whether the renderer will show legend items for diagram sizes.
unsigned int placementFlags
Diagram placement flags.
bool scaleBasedVisibility
QgsMarkerSymbolV2 * sizeLegendSymbol() const
Returns the marker symbol used for rendering the diagram size legend.
const QgsCoordinateTransform * coordinateTransform() const
Returns the coordinate transform associated with the layer.
Container of fields for a vector layer.
bool mShowAttributeLegend
Whether to show an attribute legend for the diagrams.
QgsCoordinateTransform * coordinateTransform()
Returns the coordinate transform associated with the layer.
void setZIndex(double index)
Sets the diagram z-index.
int classificationAttribute() const
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
bool mShowSizeLegend
Whether to show a size legend for the diagrams.
QgsCoordinateTransform * ct
Associated coordinate transform. Owned by this object.
QString classificationAttributeExpression() const
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
bool classificationAttributeIsExpression() const
Perform transforms between map coordinates and device coordinates.
DiagramOrientation diagramOrientation
int xPosColumn
Attribute index for x coordinate (or -1 if position not data defined)
QgsSymbolV2::OutputUnit sizeType
Diagram size unit.
QList< QString > diagramAttributes() const override
Returns attribute indices needed for diagram rendering.
void setShowAllDiagrams(bool showAllDiagrams)
Sets whether the layer should show all diagrams, including overlapping diagrams.
bool obstacle
Whether associated feature acts as an obstacle for other labels or diagrams.
void setDiagramSettings(const QgsDiagramSettings &s)
QScopedPointer< QgsMarkerSymbolV2 > mSizeLegendSymbol
Marker symbol to use in size legends.
QString classificationAttributeExpression
double lowerValue() const
double upperValue() const
void setLowerValue(double val)
bool attributeLegend() const
Returns true if renderer will show legend items for diagram attributes.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
LinePlacementFlags
Line placement flags for controlling line based placements.
QgsMapUnitScale sizeScale
Diagram size unit scale.
DiagramOrientation
Orientation of histogram.
unsigned int linePlacementFlags() const
Returns the diagram placement flags.
Q_DECL_DEPRECATED QgsFields fields
QgsDiagramRendererV2 * renderer
Associated diagram renderer. Owned by this object.
Placement placement
Diagram placement.
void setSizeLegendSymbol(QgsMarkerSymbolV2 *symbol)
Sets the marker symbol used for rendering the diagram size legend.
QString rendererName() const override
Base class for all diagram types.
double dist
Distance between diagram and the feature (in mm)
void setUpperSize(QSizeF s)
QgsDiagramRendererV2 * getRenderer()
Returns the diagram renderer associated with the layer.
Stores the settings for rendering of all diagrams for a layer.
QString rendererName() const override
void setPriority(int value)
Sets the diagram priority.
double distance() const
Returns the distance between the diagram and the feature (in mm).
Additional diagram settings for interpolated size rendering.
Contains information about the context of a rendering operation.
Struct for storing maximum and minimum scales for measurements in map units.
Placement getPlacement() const
Returns the diagram placement.
double maxScaleDenominator
int getPriority() const
Returns the diagram priority.
void setPlacement(Placement value)
Sets the diagram placement.
int showColumn
Attribute index for visibility (or -1 if visibility not data defined)
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
bool sizeLegend() const
Returns true if renderer will show legend items for diagram sizes.
int priority
Placement priority, where 0 = low and 10 = high.
QList< QString > categoryLabels
void setClassificationAttribute(int index)
int classificationAttribute
Index of the classification attribute.
Q_DECL_DEPRECATED const QgsMapToPixel * xform
QgsMapUnitScale lineSizeScale
Line unit scale.
void setDiagramSettings(const QgsDiagramSettings &s)
Represents a vector layer which manages a vector based data sets.
QList< QColor > categoryColors
QgsDiagram * mDiagram
Reference to the object that does the real diagram rendering.
void setLowerSize(QSizeF s)
Stores the settings for rendering a single diagram.
LabelPlacementMethod labelPlacementMethod
bool showAllDiagrams() const
Returns whether the layer should show all diagrams, including overlapping diagrams.
QgsSymbolV2::OutputUnit lineSizeUnit
Line unit index.
Layer tree node points to a map layer.
const QgsDiagramRendererV2 * getRenderer() const
Returns the diagram renderer associated with the layer.
void setIsObstacle(bool isObstacle)
Sets whether the feature associated with a diagram acts as an obstacle for other labels or diagrams...
void setDistance(double distance)
Sets the distance between the diagram and the feature.
void setUpperValue(double val)