![]() |
KD Chart API Documentation
3.1
|
#include <KDChartTernaryGrid.h>
Public Member Functions | |
TernaryGrid () | |
~TernaryGrid () override | |
DataDimensionsList | calculateGrid (const DataDimensionsList &rawDataDimensions) const override |
Calculates the grid start/end/step width values. More... | |
void | drawGrid (PaintContext *context) override |
QPair< QSizeF, QSizeF > | requiredMargins () const |
const QVector< TickInfo > & | tickInfo () const |
![]() | |
virtual | ~AbstractGrid () |
void | setNeedRecalculate () |
DataDimensionsList | updateData (AbstractCoordinatePlane *plane) |
Returns the cached result of data calculation. More... | |
Additional Inherited Members | |
![]() | |
static const DataDimension | adjustedLowerUpperRange (const DataDimension &dim, bool adjustLower, bool adjustUpper) |
static void | adjustLowerUpperRange (qreal &start, qreal &end, qreal stepWidth, bool adjustLower, bool adjustUpper) |
static bool | isBoundariesValid (const DataDimensionsList &l) |
static bool | isBoundariesValid (const QPair< QPointF, QPointF > &b) |
static bool | isBoundariesValid (const QRectF &r) |
static bool | isValueValid (const qreal &r) |
![]() | |
GridAttributes | gridAttributes |
![]() | |
AbstractGrid () | |
![]() | |
DataDimensionsList | mDataDimensions |
AbstractCoordinatePlane * | mPlane = nullptr |
Definition at line 33 of file KDChartTernaryGrid.h.
TernaryGrid::TernaryGrid | ( | ) |
Definition at line 43 of file KDChartTernaryGrid.cpp.
|
override |
Definition at line 48 of file KDChartTernaryGrid.cpp.
|
overridevirtual |
Calculates the grid start/end/step width values.
Gets the raw data dimensions - e.g. the data model's boundaries, together with their isCalculated flags.
Returns the calculated start/end values for the grid, and their respective step widths. If at least one of the step widths is Zero, all dimensions of the returned list are considered invalid!
Implements KDChart::AbstractGrid.
Definition at line 184 of file KDChartTernaryGrid.cpp.
|
overridevirtual |
Doing the actual drawing.
Every derived class must implement this.
Implements KDChart::AbstractGrid.
Definition at line 52 of file KDChartTernaryGrid.cpp.
References AxisVector_B_A, AxisVector_C_A, KDChart::PaintContext::coordinatePlane(), KDChart::TickInfo::depth, FullMarkerDistanceAC, FullMarkerDistanceBA, FullMarkerDistanceBC, KDChart::PaintContext::painter(), KDChart::PrintingParameters::scalePen(), translate(), TriangleBottomLeft, TriangleBottomRight, and TriangleTop.
QPair< QSizeF, QSizeF > TernaryGrid::requiredMargins | ( | ) | const |
Returns two QSizeF objects specifying the dimension of the margins needed between each corner of the diagram and the border of the drawing area. Margins are required because the tick marks are placed outside of the triangles containing rectangle. The margins are returned in diagram coordinates, since the grid does not know about widget coordinates.
Definition at line 189 of file KDChartTernaryGrid.cpp.
References FullMarkerDistanceBA, and FullMarkerDistanceBC.
Referenced by KDChart::TernaryCoordinatePlane::layoutDiagrams().
const QVector< TickInfo > & TernaryGrid::tickInfo | ( | ) | const |
Return the locations of the grid lines, so that axes can draw axis rulers at the correct positions. This information is valid after the grid has been painted (that is, the axes need to be painted after the grid.
Definition at line 206 of file KDChartTernaryGrid.cpp.