|
QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Stores the settings for rendering of all diagrams for a layer. More...
#include <qgsdiagramrendererv2.h>
Public Types | |
| enum | LinePlacementFlags { OnLine = 1, AboveLine = 2, BelowLine = 4, MapOrientation = 8 } |
| Line placement flags for controlling line based placements. More... | |
| enum | Placement { AroundPoint = 0, OverPoint, Line, Curved, Horizontal, Free } |
Public Member Functions | |
| QgsDiagramLayerSettings () | |
| QgsDiagramLayerSettings (const QgsDiagramLayerSettings &rh) | |
| Copy constructor. More... | |
| ~QgsDiagramLayerSettings () | |
| QgsCoordinateTransform * | coordinateTransform () |
| Returns the coordinate transform associated with the layer. More... | |
| const QgsCoordinateTransform * | coordinateTransform () const |
| Returns the coordinate transform associated with the layer. More... | |
| double | distance () const |
| Returns the distance between the diagram and the feature (in mm). More... | |
| Placement | getPlacement () const |
| Returns the diagram placement. More... | |
| int | getPriority () const |
| Returns the diagram priority. More... | |
| QgsDiagramRendererV2 * | getRenderer () |
| Returns the diagram renderer associated with the layer. More... | |
| const QgsDiagramRendererV2 * | getRenderer () const |
| Returns the diagram renderer associated with the layer. More... | |
| double | getZIndex () const |
| Returns the diagram z-index. More... | |
| bool | isObstacle () const |
| Returns whether the feature associated with a diagram acts as an obstacle for other labels or diagrams. More... | |
| unsigned int | linePlacementFlags () const |
| Returns the diagram placement flags. More... | |
| QgsDiagramLayerSettings & | operator= (const QgsDiagramLayerSettings &rh) |
| void | readXML (const QDomElement &elem, const QgsVectorLayer *layer) |
| QSet< QString > | referencedFields (const QgsExpressionContext &context=QgsExpressionContext(), const QgsFields &fields=QgsFields()) const |
| Returns the set of any fields referenced by the layer's diagrams. More... | |
| void | setCoordinateTransform (QgsCoordinateTransform *transform) |
| Sets the coordinate transform associated with the layer. More... | |
| void | setDistance (double distance) |
| Sets the distance between the diagram and the feature. More... | |
| void | setIsObstacle (bool isObstacle) |
| Sets whether the feature associated with a diagram acts as an obstacle for other labels or diagrams. More... | |
| void | setLinePlacementFlags (unsigned int flags) |
| Sets the the diagram placement flags. More... | |
| void | setPlacement (Placement value) |
| Sets the diagram placement. More... | |
| void | setPriority (int value) |
| Sets the diagram priority. More... | |
| void | setRenderer (QgsDiagramRendererV2 *diagramRenderer) |
| Sets the diagram renderer associated with the layer. More... | |
| void | setShowAllDiagrams (bool showAllDiagrams) |
| Sets whether the layer should show all diagrams, including overlapping diagrams. More... | |
| void | setZIndex (double index) |
| Sets the diagram z-index. More... | |
| bool | showAllDiagrams () const |
| Returns whether the layer should show all diagrams, including overlapping diagrams. More... | |
| void | writeXML (QDomElement &layerElem, QDomDocument &doc, const QgsVectorLayer *layer) const |
Public Attributes | |
| QgsCoordinateTransform * | ct |
| Associated coordinate transform. Owned by this object. More... | |
| double | dist |
| Distance between diagram and the feature (in mm) More... | |
| Q_DECL_DEPRECATED QgsFields | fields |
| bool | obstacle |
| Whether associated feature acts as an obstacle for other labels or diagrams. More... | |
| Placement | placement |
| Diagram placement. More... | |
| unsigned int | placementFlags |
| Diagram placement flags. More... | |
| int | priority |
| Placement priority, where 0 = low and 10 = high. More... | |
| QgsDiagramRendererV2 * | renderer |
| Associated diagram renderer. Owned by this object. More... | |
| bool | showAll |
| Whether to show all diagrams, including overlapping diagrams. More... | |
| int | showColumn |
| Attribute index for visibility (or -1 if visibility not data defined) More... | |
| Q_DECL_DEPRECATED const QgsMapToPixel * | xform |
| int | xPosColumn |
| Attribute index for x coordinate (or -1 if position not data defined) More... | |
| int | yPosColumn |
| Attribute index for y coordinate (or -1 if position not data defined) More... | |
| double | zIndex |
| Z-index of diagrams, where diagrams with a higher z-index are drawn on top of diagrams with a lower z-index. More... | |
Stores the settings for rendering of all diagrams for a layer.
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 50 of file qgsdiagramrendererv2.h.
Line placement flags for controlling line based placements.
| Enumerator | |
|---|---|
| OnLine | |
| AboveLine | |
| BelowLine | |
| MapOrientation | |
Definition at line 66 of file qgsdiagramrendererv2.h.
| Enumerator | |
|---|---|
| AroundPoint | |
| OverPoint | |
| Line | |
| Curved | |
| Horizontal | |
| Free | |
Definition at line 55 of file qgsdiagramrendererv2.h.
| Q_NOWARN_DEPRECATED_PUSH QgsDiagramLayerSettings::QgsDiagramLayerSettings | ( | ) |
Definition at line 30 of file qgsdiagramrendererv2.cpp.
| Q_NOWARN_DEPRECATED_POP Q_NOWARN_DEPRECATED_PUSH QgsDiagramLayerSettings::QgsDiagramLayerSettings | ( | const QgsDiagramLayerSettings & | rh | ) |
Copy constructor.
Definition at line 49 of file qgsdiagramrendererv2.cpp.
| Q_NOWARN_DEPRECATED_POP Q_NOWARN_DEPRECATED_PUSH QgsDiagramLayerSettings::~QgsDiagramLayerSettings | ( | ) |
Definition at line 90 of file qgsdiagramrendererv2.cpp.
|
inline |
Returns the coordinate transform associated with the layer.
Definition at line 229 of file qgsdiagramrendererv2.h.
|
inline |
Returns the coordinate transform associated with the layer.
Definition at line 235 of file qgsdiagramrendererv2.h.
|
inline |
Returns the distance between the diagram and the feature (in mm).
Definition at line 187 of file qgsdiagramrendererv2.h.
|
inline |
Returns the diagram placement.
Definition at line 88 of file qgsdiagramrendererv2.h.
|
inline |
Returns the diagram priority.
Definition at line 128 of file qgsdiagramrendererv2.h.
|
inline |
Returns the diagram renderer associated with the layer.
Definition at line 205 of file qgsdiagramrendererv2.h.
|
inline |
Returns the diagram renderer associated with the layer.
Definition at line 212 of file qgsdiagramrendererv2.h.
|
inline |
Returns the diagram z-index.
Diagrams (or labels) with a higher z-index are drawn over diagrams with a lower z-index.
Definition at line 151 of file qgsdiagramrendererv2.h.
|
inline |
Returns whether the feature associated with a diagram acts as an obstacle for other labels or diagrams.
Definition at line 170 of file qgsdiagramrendererv2.h.
|
inline |
Returns the diagram placement flags.
These are only used if the diagram placement is set to a line type.
Definition at line 106 of file qgsdiagramrendererv2.h.
| Q_NOWARN_DEPRECATED_POP Q_NOWARN_DEPRECATED_PUSH QgsDiagramLayerSettings & QgsDiagramLayerSettings::operator= | ( | const QgsDiagramLayerSettings & | rh | ) |
Definition at line 69 of file qgsdiagramrendererv2.cpp.
| void QgsDiagramLayerSettings::readXML | ( | const QDomElement & | elem, |
| const QgsVectorLayer * | layer | ||
| ) |
Definition at line 112 of file qgsdiagramrendererv2.cpp.
| QSet< QString > QgsDiagramLayerSettings::referencedFields | ( | const QgsExpressionContext & | context = QgsExpressionContext(), |
| const QgsFields & | fields = QgsFields() |
||
| ) | const |
Returns the set of any fields referenced by the layer's diagrams.
| context | expression context the diagrams will be drawn using |
| fields | layer fields |
Definition at line 146 of file qgsdiagramrendererv2.cpp.
| void QgsDiagramLayerSettings::setCoordinateTransform | ( | QgsCoordinateTransform * | transform | ) |
Sets the coordinate transform associated with the layer.
| transform | coordinate transform. Ownership is transferred to the object. |
Definition at line 106 of file qgsdiagramrendererv2.cpp.
|
inline |
Sets the distance between the diagram and the feature.
| distance | distance in mm |
Definition at line 194 of file qgsdiagramrendererv2.h.
|
inline |
Sets whether the feature associated with a diagram acts as an obstacle for other labels or diagrams.
| isObstacle | set to true for feature to act as obstacle |
Definition at line 177 of file qgsdiagramrendererv2.h.
|
inline |
Sets the the diagram placement flags.
These are only used if the diagram placement is set to a line type.
| flags | placement value |
Definition at line 114 of file qgsdiagramrendererv2.h.
|
inline |
Sets the diagram placement.
| value | placement value |
Definition at line 95 of file qgsdiagramrendererv2.h.
|
inline |
Sets the diagram priority.
| value | priority, where 0 = low and 10 = high |
Definition at line 135 of file qgsdiagramrendererv2.h.
| Q_NOWARN_DEPRECATED_POP void QgsDiagramLayerSettings::setRenderer | ( | QgsDiagramRendererV2 * | diagramRenderer | ) |
Sets the diagram renderer associated with the layer.
| diagramRenderer | diagram renderer. Ownership is transferred to the object. |
Definition at line 97 of file qgsdiagramrendererv2.cpp.
|
inline |
Sets whether the layer should show all diagrams, including overlapping diagrams.
| showAllDiagrams | set to true to show all diagrams |
Definition at line 274 of file qgsdiagramrendererv2.h.
|
inline |
Sets the diagram z-index.
Diagrams (or labels) with a higher z-index are drawn over diagrams with a lower z-index.
| index | diagram z-index |
Definition at line 159 of file qgsdiagramrendererv2.h.
|
inline |
Returns whether the layer should show all diagrams, including overlapping diagrams.
Definition at line 267 of file qgsdiagramrendererv2.h.
| void QgsDiagramLayerSettings::writeXML | ( | QDomElement & | layerElem, |
| QDomDocument & | doc, | ||
| const QgsVectorLayer * | layer | ||
| ) | const |
Definition at line 128 of file qgsdiagramrendererv2.cpp.
| QgsCoordinateTransform* QgsDiagramLayerSettings::ct |
Associated coordinate transform. Owned by this object.
Definition at line 246 of file qgsdiagramrendererv2.h.
| double QgsDiagramLayerSettings::dist |
Distance between diagram and the feature (in mm)
Definition at line 198 of file qgsdiagramrendererv2.h.
| Q_DECL_DEPRECATED QgsFields QgsDiagramLayerSettings::fields |
Definition at line 252 of file qgsdiagramrendererv2.h.
| bool QgsDiagramLayerSettings::obstacle |
Whether associated feature acts as an obstacle for other labels or diagrams.
Definition at line 181 of file qgsdiagramrendererv2.h.
| Placement QgsDiagramLayerSettings::placement |
Diagram placement.
Definition at line 99 of file qgsdiagramrendererv2.h.
| unsigned int QgsDiagramLayerSettings::placementFlags |
Diagram placement flags.
Definition at line 118 of file qgsdiagramrendererv2.h.
| int QgsDiagramLayerSettings::priority |
Placement priority, where 0 = low and 10 = high.
Definition at line 141 of file qgsdiagramrendererv2.h.
| QgsDiagramRendererV2* QgsDiagramLayerSettings::renderer |
Associated diagram renderer. Owned by this object.
Definition at line 223 of file qgsdiagramrendererv2.h.
| bool QgsDiagramLayerSettings::showAll |
Whether to show all diagrams, including overlapping diagrams.
Definition at line 278 of file qgsdiagramrendererv2.h.
| int QgsDiagramLayerSettings::showColumn |
Attribute index for visibility (or -1 if visibility not data defined)
Definition at line 261 of file qgsdiagramrendererv2.h.
| Q_DECL_DEPRECATED const QgsMapToPixel* QgsDiagramLayerSettings::xform |
Definition at line 249 of file qgsdiagramrendererv2.h.
| int QgsDiagramLayerSettings::xPosColumn |
Attribute index for x coordinate (or -1 if position not data defined)
Definition at line 255 of file qgsdiagramrendererv2.h.
| int QgsDiagramLayerSettings::yPosColumn |
Attribute index for y coordinate (or -1 if position not data defined)
Definition at line 258 of file qgsdiagramrendererv2.h.
| double QgsDiagramLayerSettings::zIndex |
Z-index of diagrams, where diagrams with a higher z-index are drawn on top of diagrams with a lower z-index.
Definition at line 163 of file qgsdiagramrendererv2.h.
1.8.13