KChart::AbstractGrid
#include <KChartAbstractGrid.h>
Public Member Functions | |
virtual void | drawGrid (PaintContext *context)=0 |
void | setNeedRecalculate () |
DataDimensionsList | updateData (AbstractCoordinatePlane *plane) |
Static Public Member Functions | |
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 | |
GridAttributes | gridAttributes |
Protected Attributes | |
DataDimensionsList | mDataDimensions |
AbstractCoordinatePlane * | mPlane |
Detailed Description
Abstract base class for grid classes: cartesian, polar, ...
The AbstractGrid interface is the base class used by AbstractCoordinatePlane, for calculating and for drawing the grid lines of the plane.
Definition at line 33 of file KChartAbstractGrid.h.
Constructor & Destructor Documentation
◆ ~AbstractGrid()
|
virtual |
Definition at line 33 of file KChartAbstractGrid.cpp.
◆ AbstractGrid()
|
protected |
Definition at line 27 of file KChartAbstractGrid.cpp.
Member Function Documentation
◆ adjustedLowerUpperRange()
|
static |
Adjusts dim so that dim.start
and/or dim.end
are a multiple of dim.stepWidth
.
- See also
- adjustLowerUpperRange
Definition at line 95 of file KChartAbstractGrid.cpp.
◆ adjustLowerUpperRange()
|
static |
Adjusts start and/or end so that they are a multiple of stepWidth.
Definition at line 82 of file KChartAbstractGrid.cpp.
◆ drawGrid()
|
pure virtual |
Doing the actual drawing.
Every derived class must implement this.
- Note
- When implementing drawGrid(): Before you start drawing, make sure to call updateData(), to get the data boundaries recalculated. For an example, see the implementation of CartesianGrid:drawGrid().
Implemented in KChart::CartesianGrid, KChart::LeveyJenningsGrid, KChart::PolarGrid, and KChart::RadarGrid.
◆ isBoundariesValid() [1/3]
|
static |
Checks whether all start and end properties of every DataDimension in the list l are valid according to isValueValid().
- See also
- isValueValid
Definition at line 69 of file KChartAbstractGrid.cpp.
◆ isBoundariesValid() [2/3]
Checks whether both coordinates of both points are valid according to isValueValid.
- See also
- isValueValid
Definition at line 63 of file KChartAbstractGrid.cpp.
◆ isBoundariesValid() [3/3]
|
static |
Checks whether both coordinates of r are valid according to isValueValid.
- See also
- isValueValid
Definition at line 58 of file KChartAbstractGrid.cpp.
◆ isValueValid()
|
static |
Checks if r is neither NaN nor infinity.
Definition at line 77 of file KChartAbstractGrid.cpp.
◆ setNeedRecalculate()
void AbstractGrid::setNeedRecalculate | ( | ) |
Causes grid to be recalculated upon the next call of updateData().
- See also
- calculateGrid
Definition at line 38 of file KChartAbstractGrid.cpp.
◆ updateData()
DataDimensionsList AbstractGrid::updateData | ( | AbstractCoordinatePlane * | plane | ) |
Returns the cached result of data calculation.
For this, all derived classes need to implement the pure-virtual calculateGrid() method.
Definition at line 43 of file KChartAbstractGrid.cpp.
Member Data Documentation
◆ gridAttributes
GridAttributes KChart::AbstractGrid::gridAttributes |
Definition at line 118 of file KChartAbstractGrid.h.
◆ mDataDimensions
|
protected |
Definition at line 121 of file KChartAbstractGrid.h.
◆ mPlane
|
protected |
Definition at line 122 of file KChartAbstractGrid.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.