KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDChart::TernaryGrid Class Reference

#include <KDChartTernaryGrid.h>

Inheritance diagram for KDChart::TernaryGrid:
Inheritance graph
[legend]
Collaboration diagram for KDChart::TernaryGrid:
Collaboration graph
[legend]

Public Member Functions

 TernaryGrid ()
 
 ~TernaryGrid () override
 
DataDimensionsList calculateGrid (const DataDimensionsList &rawDataDimensions) const override
 Calculates the grid start/end/step width values.
 
void drawGrid (PaintContext *context) override
 
QPair< QSizeF, QSizeFrequiredMargins () const
 
const QVector< TickInfo > & tickInfo () const
 
- Public Member Functions inherited from KDChart::AbstractGrid
virtual ~AbstractGrid ()
 
void setNeedRecalculate ()
 
DataDimensionsList updateData (AbstractCoordinatePlane *plane)
 Returns the cached result of data calculation.
 

Additional Inherited Members

- Static Public Member Functions inherited from KDChart::AbstractGrid
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)
 
- Public Attributes inherited from KDChart::AbstractGrid
GridAttributes gridAttributes
 
- Protected Member Functions inherited from KDChart::AbstractGrid
 AbstractGrid ()
 
- Protected Attributes inherited from KDChart::AbstractGrid
DataDimensionsList mDataDimensions
 
AbstractCoordinatePlanemPlane = nullptr
 

Detailed Description

Definition at line 33 of file KDChartTernaryGrid.h.

Constructor & Destructor Documentation

◆ TernaryGrid()

TernaryGrid::TernaryGrid ( )

Definition at line 43 of file KDChartTernaryGrid.cpp.

◆ ~TernaryGrid()

TernaryGrid::~TernaryGrid ( )
override

Definition at line 48 of file KDChartTernaryGrid.cpp.

Member Function Documentation

◆ calculateGrid()

DataDimensionsList TernaryGrid::calculateGrid ( const DataDimensionsList rawDataDimensions) const
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!

Note
This function needs to be implemented by all derived classes, like CartesianGrid, PolarGrid, ...

Implements KDChart::AbstractGrid.

Definition at line 184 of file KDChartTernaryGrid.cpp.

◆ drawGrid()

void TernaryGrid::drawGrid ( PaintContext context)
overridevirtual

◆ requiredMargins()

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 trianges 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, FullMarkerDistanceBC, QPointF::x(), and QPointF::y().

Referenced by KDChart::TernaryCoordinatePlane::layoutDiagrams().

◆ tickInfo()

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.


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

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Fri Apr 26 2024 00:04:57 for KD Chart API Documentation by doxygen 1.9.8