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.
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::PolarGrid, KChart::RadarGrid, and KChart::LeveyJenningsGrid.
◆ 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.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Dec 8 2023 03:53:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.