QGIS API Documentation  2.99.0-Master (7d4f81d)
Public Types | Public Member Functions | Public Attributes | List of all members
QgsDiagramSettings Class Reference

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  LabelPlacementMethod { Height, XHeight }
 

Public Member Functions

 QgsDiagramSettings ()
 
QList< QgsLayerTreeModelLegendNode *> legendItems (QgsLayerTreeLayer *nodeLayer) const
 Returns list of legend nodes for the diagram. More...
 
void readXml (const QDomElement &elem)
 Reads diagram settings from XML. More...
 
void writeXml (QDomElement &rendererElem, QDomDocument &doc) const
 Writes diagram settings to XML. More...
 

Public Attributes

QColor backgroundColor
 
double barWidth
 
QList< QString > categoryAttributes
 
QList< QColor > categoryColors
 
QList< QString > categoryLabels
 
DiagramOrientation diagramOrientation
 
bool enabled
 
QFont font
 
LabelPlacementMethod labelPlacementMethod
 
QgsMapUnitScale lineSizeScale
 Line unit scale. More...
 
QgsUnitTypes::RenderUnit lineSizeUnit
 Line unit index. More...
 
double maximumScale = 0
 The maximum map scale (i.e. More...
 
double minimumScale = 0
 The minimum map scale (i.e. More...
 
double minimumSize
 Scale diagrams smaller than mMinimumSize to mMinimumSize. More...
 
double opacity
 Opacity, from 0 (transparent) to 1.0 (opaque) More...
 
QColor penColor
 
double penWidth
 
double rotationOffset
 Rotation offset, in degrees clockwise from horizontal. More...
 
bool scaleBasedVisibility
 
bool scaleByArea
 
QSizeF size
 
QgsMapUnitScale sizeScale
 Diagram size unit scale. More...
 
QgsUnitTypes::RenderUnit sizeType
 Diagram size unit. More...
 

Detailed Description

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 349 of file qgsdiagramrenderer.h.

Member Enumeration Documentation

◆ DiagramOrientation

Orientation of histogram.

Enumerator
Up 
Down 
Left 
Right 

Definition at line 360 of file qgsdiagramrenderer.h.

◆ LabelPlacementMethod

Enumerator
Height 
XHeight 

Definition at line 353 of file qgsdiagramrenderer.h.

Constructor & Destructor Documentation

◆ QgsDiagramSettings()

QgsDiagramSettings::QgsDiagramSettings ( )
inline

Definition at line 368 of file qgsdiagramrenderer.h.

Member Function Documentation

◆ legendItems()

QList< QgsLayerTreeModelLegendNode *> QgsDiagramSettings::legendItems ( QgsLayerTreeLayer nodeLayer) const

Returns list of legend nodes for the diagram.

Note
caller is responsible for deletion of QgsLayerTreeModelLegendNodes
Since
QGIS 2.10

Definition at line 749 of file qgsdiagramrenderer.cpp.

◆ readXml()

void QgsDiagramSettings::readXml ( const QDomElement &  elem)

Reads diagram settings from XML.

Definition at line 168 of file qgsdiagramrenderer.cpp.

◆ writeXml()

void QgsDiagramSettings::writeXml ( QDomElement &  rendererElem,
QDomDocument &  doc 
) const

Writes diagram settings to XML.

Definition at line 312 of file qgsdiagramrenderer.cpp.

Member Data Documentation

◆ backgroundColor

QColor QgsDiagramSettings::backgroundColor

Definition at line 409 of file qgsdiagramrenderer.h.

◆ barWidth

double QgsDiagramSettings::barWidth

Definition at line 414 of file qgsdiagramrenderer.h.

◆ categoryAttributes

QList< QString > QgsDiagramSettings::categoryAttributes

Definition at line 385 of file qgsdiagramrenderer.h.

◆ categoryColors

QList< QColor > QgsDiagramSettings::categoryColors

Definition at line 384 of file qgsdiagramrenderer.h.

◆ categoryLabels

QList< QString > QgsDiagramSettings::categoryLabels
Since
QGIS 2.10

Definition at line 387 of file qgsdiagramrenderer.h.

◆ diagramOrientation

DiagramOrientation QgsDiagramSettings::diagramOrientation

Definition at line 413 of file qgsdiagramrenderer.h.

◆ enabled

bool QgsDiagramSettings::enabled

Definition at line 382 of file qgsdiagramrenderer.h.

◆ font

QFont QgsDiagramSettings::font

Definition at line 383 of file qgsdiagramrenderer.h.

◆ labelPlacementMethod

LabelPlacementMethod QgsDiagramSettings::labelPlacementMethod

Definition at line 412 of file qgsdiagramrenderer.h.

◆ lineSizeScale

QgsMapUnitScale QgsDiagramSettings::lineSizeScale

Line unit scale.

Since
QGIS 2.16

Definition at line 407 of file qgsdiagramrenderer.h.

◆ lineSizeUnit

QgsUnitTypes::RenderUnit QgsDiagramSettings::lineSizeUnit

Line unit index.

Since
QGIS 2.16

Definition at line 402 of file qgsdiagramrenderer.h.

◆ maximumScale

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.

See also
minimumScale

Definition at line 435 of file qgsdiagramrenderer.h.

◆ minimumScale

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.

See also
maximumScale

Definition at line 443 of file qgsdiagramrenderer.h.

◆ minimumSize

double QgsDiagramSettings::minimumSize

Scale diagrams smaller than mMinimumSize to mMinimumSize.

Definition at line 446 of file qgsdiagramrenderer.h.

◆ opacity

double QgsDiagramSettings::opacity

Opacity, from 0 (transparent) to 1.0 (opaque)

Definition at line 417 of file qgsdiagramrenderer.h.

◆ penColor

QColor QgsDiagramSettings::penColor

Definition at line 410 of file qgsdiagramrenderer.h.

◆ penWidth

double QgsDiagramSettings::penWidth

Definition at line 411 of file qgsdiagramrenderer.h.

◆ rotationOffset

double QgsDiagramSettings::rotationOffset

Rotation offset, in degrees clockwise from horizontal.

Since
QGIS 3.0

Definition at line 425 of file qgsdiagramrenderer.h.

◆ scaleBasedVisibility

bool QgsDiagramSettings::scaleBasedVisibility

Definition at line 427 of file qgsdiagramrenderer.h.

◆ scaleByArea

bool QgsDiagramSettings::scaleByArea

Definition at line 419 of file qgsdiagramrenderer.h.

◆ size

QSizeF QgsDiagramSettings::size

Definition at line 388 of file qgsdiagramrenderer.h.

◆ sizeScale

QgsMapUnitScale QgsDiagramSettings::sizeScale

Diagram size unit scale.

Since
QGIS 2.16

Definition at line 397 of file qgsdiagramrenderer.h.

◆ sizeType

QgsUnitTypes::RenderUnit QgsDiagramSettings::sizeType

Diagram size unit.

Definition at line 392 of file qgsdiagramrenderer.h.


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