QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
|
Stores the settings for rendering a single diagram. More...
#include <qgsdiagramrenderer.h>
Public Types | |
enum | DiagramOrientation { Up , Down , Left , Right } |
Orientation of histogram. More... | |
enum | Direction { Clockwise , Counterclockwise } |
Angular directions. More... | |
enum | LabelPlacementMethod { Height , XHeight } |
Public Member Functions | |
QgsDiagramSettings () | |
Constructor for QgsDiagramSettings. | |
QgsDiagramSettings (const QgsDiagramSettings &other) | |
Copy constructor. | |
~QgsDiagramSettings () | |
QgsLineSymbol * | axisLineSymbol () const |
Returns the line symbol to use for rendering axis in diagrams. | |
Direction | direction () const |
Returns the chart's angular direction. | |
QList< QgsLayerTreeModelLegendNode * > | legendItems (QgsLayerTreeLayer *nodeLayer) const |
Returns list of legend nodes for the diagram. | |
QgsDiagramSettings & | operator= (const QgsDiagramSettings &other) |
QgsPaintEffect * | paintEffect () const |
Returns the paint effect to use while rendering diagrams. | |
void | readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext()) |
Reads diagram settings from XML. | |
void | setAxisLineSymbol (QgsLineSymbol *symbol) |
Sets the line symbol to use for rendering axis in diagrams. | |
void | setDirection (Direction direction) |
Sets the chart's angular direction. | |
void | setPaintEffect (QgsPaintEffect *effect) |
Sets the paint effect to use while rendering diagrams. | |
void | setShowAxis (bool showAxis) |
Sets whether the diagram axis should be shown. | |
void | setSpacing (double spacing) |
Sets the spacing between diagram contents. | |
void | setSpacingMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale for the content spacing. | |
void | setSpacingUnit (Qgis::RenderUnit unit) |
Sets the unit for the content spacing. | |
bool | showAxis () const |
Returns true if the diagram axis should be shown. | |
double | spacing () const |
Returns the spacing between diagram contents. | |
const QgsMapUnitScale & | spacingMapUnitScale () const |
Returns the map unit scale for the content spacing. | |
Qgis::RenderUnit | spacingUnit () const |
Returns the units for the content spacing. | |
void | writeXml (QDomElement &rendererElem, QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const |
Writes diagram settings to XML. | |
Public Attributes | |
QColor | backgroundColor |
double | barWidth = 5.0 |
QList< QString > | categoryAttributes |
QList< QColor > | categoryColors |
QList< QString > | categoryLabels |
DiagramOrientation | diagramOrientation = QgsDiagramSettings::Up |
bool | enabled = true |
QFont | font |
LabelPlacementMethod | labelPlacementMethod = QgsDiagramSettings::Height |
QgsMapUnitScale | lineSizeScale |
Line unit scale. | |
Qgis::RenderUnit | lineSizeUnit = Qgis::RenderUnit::Millimeters |
Line unit index. | |
double | maximumScale = 0 |
The maximum map scale (i.e. | |
double | minimumScale = 0 |
The minimum map scale (i.e. | |
double | minimumSize = 0.0 |
Scale diagrams smaller than mMinimumSize to mMinimumSize. | |
double | opacity = 1.0 |
Opacity, from 0 (transparent) to 1.0 (opaque) | |
QColor | penColor |
double | penWidth = 0.0 |
double | rotationOffset = 270 |
Rotation offset, in degrees clockwise from horizontal. | |
bool | scaleBasedVisibility = false |
bool | scaleByArea = true |
QSizeF | size |
QgsMapUnitScale | sizeScale |
Diagram size unit scale. | |
Qgis::RenderUnit | sizeType = Qgis::RenderUnit::Millimeters |
Diagram size unit. | |
Stores the settings for rendering a single diagram.
QgsDiagramSettings stores the settings related to rendering the individual diagrams themselves, while QgsDiagramLayerSettings stores settings which control how ALL diagrams within a layer are rendered.
Definition at line 356 of file qgsdiagramrenderer.h.
Orientation of histogram.
Enumerator | |
---|---|
Up | |
Down | |
Left | |
Right |
Definition at line 367 of file qgsdiagramrenderer.h.
Angular directions.
Enumerator | |
---|---|
Clockwise | Clockwise orientation. |
Counterclockwise | Counter-clockwise orientation. |
Definition at line 379 of file qgsdiagramrenderer.h.
Enumerator | |
---|---|
Height | |
XHeight |
Definition at line 360 of file qgsdiagramrenderer.h.
QgsDiagramSettings::QgsDiagramSettings | ( | ) |
Constructor for QgsDiagramSettings.
Definition at line 852 of file qgsdiagramrenderer.cpp.
|
default |
QgsDiagramSettings::QgsDiagramSettings | ( | const QgsDiagramSettings & | other | ) |
Copy constructor.
Definition at line 859 of file qgsdiagramrenderer.cpp.
QgsLineSymbol * QgsDiagramSettings::axisLineSymbol | ( | ) | const |
Returns the line symbol to use for rendering axis in diagrams.
Definition at line 820 of file qgsdiagramrenderer.cpp.
QgsDiagramSettings::Direction QgsDiagramSettings::direction | ( | ) | const |
Returns the chart's angular direction.
Definition at line 929 of file qgsdiagramrenderer.cpp.
QList< QgsLayerTreeModelLegendNode * > QgsDiagramSettings::legendItems | ( | QgsLayerTreeLayer * | nodeLayer | ) | const |
Returns list of legend nodes for the diagram.
Definition at line 807 of file qgsdiagramrenderer.cpp.
QgsDiagramSettings & QgsDiagramSettings::operator= | ( | const QgsDiagramSettings & | other | ) |
Definition at line 894 of file qgsdiagramrenderer.cpp.
QgsPaintEffect * QgsDiagramSettings::paintEffect | ( | ) | const |
Returns the paint effect to use while rendering diagrams.
Definition at line 841 of file qgsdiagramrenderer.cpp.
void QgsDiagramSettings::readXml | ( | const QDomElement & | elem, |
const QgsReadWriteContext & | context = QgsReadWriteContext() |
||
) |
Reads diagram settings from XML.
Definition at line 177 of file qgsdiagramrenderer.cpp.
void QgsDiagramSettings::setAxisLineSymbol | ( | QgsLineSymbol * | symbol | ) |
Sets the line symbol to use for rendering axis in diagrams.
Ownership of symbol is transferred to the settings.
Definition at line 825 of file qgsdiagramrenderer.cpp.
void QgsDiagramSettings::setDirection | ( | Direction | direction | ) |
Sets the chart's angular direction.
Definition at line 934 of file qgsdiagramrenderer.cpp.
void QgsDiagramSettings::setPaintEffect | ( | QgsPaintEffect * | effect | ) |
Sets the paint effect to use while rendering diagrams.
Ownership of effect is transferred to the settings.
Definition at line 846 of file qgsdiagramrenderer.cpp.
void QgsDiagramSettings::setShowAxis | ( | bool | showAxis | ) |
Sets whether the diagram axis should be shown.
Definition at line 836 of file qgsdiagramrenderer.cpp.
|
inline |
Sets the spacing between diagram contents.
Spacing units are set via setSpacingUnit().
Definition at line 483 of file qgsdiagramrenderer.h.
|
inline |
Sets the map unit scale for the content spacing.
Definition at line 512 of file qgsdiagramrenderer.h.
|
inline |
Sets the unit for the content spacing.
Definition at line 493 of file qgsdiagramrenderer.h.
bool QgsDiagramSettings::showAxis | ( | ) | const |
Returns true
if the diagram axis should be shown.
Definition at line 831 of file qgsdiagramrenderer.cpp.
|
inline |
Returns the spacing between diagram contents.
Spacing units can be retrieved by calling spacingUnit().
Definition at line 470 of file qgsdiagramrenderer.h.
|
inline |
Returns the map unit scale for the content spacing.
Definition at line 522 of file qgsdiagramrenderer.h.
|
inline |
Returns the units for the content spacing.
Definition at line 502 of file qgsdiagramrenderer.h.
void QgsDiagramSettings::writeXml | ( | QDomElement & | rendererElem, |
QDomDocument & | doc, | ||
const QgsReadWriteContext & | context = QgsReadWriteContext() |
||
) | const |
Writes diagram settings to XML.
Definition at line 346 of file qgsdiagramrenderer.cpp.
QColor QgsDiagramSettings::backgroundColor |
Definition at line 421 of file qgsdiagramrenderer.h.
double QgsDiagramSettings::barWidth = 5.0 |
Definition at line 426 of file qgsdiagramrenderer.h.
QList< QString > QgsDiagramSettings::categoryAttributes |
Definition at line 397 of file qgsdiagramrenderer.h.
QList< QColor > QgsDiagramSettings::categoryColors |
Definition at line 396 of file qgsdiagramrenderer.h.
QList< QString > QgsDiagramSettings::categoryLabels |
Definition at line 398 of file qgsdiagramrenderer.h.
DiagramOrientation QgsDiagramSettings::diagramOrientation = QgsDiagramSettings::Up |
Definition at line 425 of file qgsdiagramrenderer.h.
bool QgsDiagramSettings::enabled = true |
Definition at line 394 of file qgsdiagramrenderer.h.
QFont QgsDiagramSettings::font |
Definition at line 395 of file qgsdiagramrenderer.h.
LabelPlacementMethod QgsDiagramSettings::labelPlacementMethod = QgsDiagramSettings::Height |
Definition at line 424 of file qgsdiagramrenderer.h.
QgsMapUnitScale QgsDiagramSettings::lineSizeScale |
Line unit scale.
Definition at line 419 of file qgsdiagramrenderer.h.
Qgis::RenderUnit QgsDiagramSettings::lineSizeUnit = Qgis::RenderUnit::Millimeters |
Line unit index.
Definition at line 414 of file qgsdiagramrenderer.h.
double QgsDiagramSettings::maximumScale = 0 |
The maximum map scale (i.e.
most "zoomed in" scale) at which the diagrams will be visible. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no maximum scale visibility.
Definition at line 446 of file qgsdiagramrenderer.h.
double QgsDiagramSettings::minimumScale = 0 |
The minimum map scale (i.e.
most "zoomed out" scale) at which the diagrams will be visible. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no minimum scale visibility.
Definition at line 454 of file qgsdiagramrenderer.h.
double QgsDiagramSettings::minimumSize = 0.0 |
Scale diagrams smaller than mMinimumSize to mMinimumSize.
Definition at line 457 of file qgsdiagramrenderer.h.
double QgsDiagramSettings::opacity = 1.0 |
Opacity, from 0 (transparent) to 1.0 (opaque)
Definition at line 429 of file qgsdiagramrenderer.h.
QColor QgsDiagramSettings::penColor |
Definition at line 422 of file qgsdiagramrenderer.h.
double QgsDiagramSettings::penWidth = 0.0 |
Definition at line 423 of file qgsdiagramrenderer.h.
double QgsDiagramSettings::rotationOffset = 270 |
Rotation offset, in degrees clockwise from horizontal.
Definition at line 436 of file qgsdiagramrenderer.h.
bool QgsDiagramSettings::scaleBasedVisibility = false |
Definition at line 438 of file qgsdiagramrenderer.h.
bool QgsDiagramSettings::scaleByArea = true |
Definition at line 431 of file qgsdiagramrenderer.h.
QSizeF QgsDiagramSettings::size |
Definition at line 399 of file qgsdiagramrenderer.h.
QgsMapUnitScale QgsDiagramSettings::sizeScale |
Diagram size unit scale.
Definition at line 409 of file qgsdiagramrenderer.h.
Qgis::RenderUnit QgsDiagramSettings::sizeType = Qgis::RenderUnit::Millimeters |
Diagram size unit.
Definition at line 404 of file qgsdiagramrenderer.h.