KD Chart API Documentation 3.1
|
#include <KDChartAbstractGrid.h>
Public Member Functions | |
virtual | ~AbstractGrid () |
virtual void | drawGrid (PaintContext *context)=0 |
void | setNeedRecalculate () |
DataDimensionsList | updateData (AbstractCoordinatePlane *plane) |
Returns the cached result of data calculation. | |
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 Member Functions | |
AbstractGrid () | |
Protected Attributes | |
DataDimensionsList | mDataDimensions |
AbstractCoordinatePlane * | mPlane = nullptr |
Definition at line 34 of file KDChartAbstractGrid.h.
|
virtual |
Definition at line 31 of file KDChartAbstractGrid.cpp.
|
protected |
Definition at line 26 of file KDChartAbstractGrid.cpp.
|
static |
Adjusts dim so that dim.start
and/or dim.end
are a multiple of dim.stepWidth
.
Definition at line 92 of file KDChartAbstractGrid.cpp.
References adjustLowerUpperRange(), KDChart::DataDimension::end, KDChart::DataDimension::start, and KDChart::DataDimension::stepWidth.
|
static |
Adjusts start and/or end so that they are a multiple of stepWidth
Definition at line 79 of file KDChartAbstractGrid.cpp.
References _trunc().
Referenced by adjustedLowerUpperRange(), calculateSteps(), calculateSteps(), and KDChart::CartesianGrid::drawGrid().
|
pure virtual |
Doing the actual drawing.
Every derived class must implement this.
Implemented in KDChart::CartesianGrid, KDChart::LeveyJenningsGrid, KDChart::PolarGrid, KDChart::RadarGrid, and KDChart::TernaryGrid.
|
static |
Checks whether all start and end properties of every DataDimension in the list l are valid according to isValueValid().
Definition at line 66 of file KDChartAbstractGrid.cpp.
References QList::at(), isValueValid(), and QList::size().
Checks whether both coordinates of both points are valid according to isValueValid
Definition at line 61 of file KDChartAbstractGrid.cpp.
References isValueValid().
|
static |
Checks whether both coordinates of r are valid according to isValueValid
Definition at line 56 of file KDChartAbstractGrid.cpp.
References QRectF::bottomRight(), isBoundariesValid(), and QRectF::topLeft().
Referenced by KDChart::CartesianGrid::drawGrid(), KDChart::LeveyJenningsGrid::drawGrid(), isBoundariesValid(), KDChart::BarDiagram::paint(), KDChart::LeveyJenningsDiagram::paint(), KDChart::LineDiagram::paint(), and KDChart::Plotter::paint().
|
static |
Checks if r is neither NaN nor infinity.
Definition at line 74 of file KDChartAbstractGrid.cpp.
Referenced by isBoundariesValid(), and isBoundariesValid().
void AbstractGrid::setNeedRecalculate | ( | ) |
Causes grid to be recalculated upon the next call of updateData().
Definition at line 36 of file KDChartAbstractGrid.cpp.
References QList::clear().
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 41 of file KDChartAbstractGrid.cpp.
References QList::empty(), KDChart::AbstractCoordinatePlane::getDataDimensionsList(), mDataDimensions, and mPlane.
Referenced by KDChart::CartesianGrid::drawGrid(), and KDChart::LeveyJenningsGrid::drawGrid().
GridAttributes KDChart::AbstractGrid::gridAttributes |
Definition at line 119 of file KDChartAbstractGrid.h.
|
protected |
Definition at line 122 of file KDChartAbstractGrid.h.
Referenced by KDChart::CartesianGrid::drawGrid(), KDChart::LeveyJenningsGrid::drawGrid(), and updateData().
|
protected |
Definition at line 123 of file KDChartAbstractGrid.h.
Referenced by KDChart::LeveyJenningsGrid::drawGrid(), and updateData().