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

Helper class for one dimension of data, e.g. for the rows in a data model, or for the labels of an axis, or for the vertical lines in a grid. More...

#include <KDChartAbstractCoordinatePlane.h>

Public Member Functions

 DataDimension ()
 
 DataDimension (qreal start_, qreal end_, bool isCalculated_, AbstractCoordinatePlane::AxesCalcMode calcMode_, KDChartEnums::GranularitySequence sequence_, qreal stepWidth_=0.0, qreal subStepWidth_=0.0)
 
qreal distance () const
 
bool operator!= (const DataDimension &other) const
 
bool operator== (const DataDimension &r) const
 

Public Attributes

AbstractCoordinatePlane::AxesCalcMode calcMode = AbstractCoordinatePlane::Linear
 
qreal end = 10.0
 
bool isCalculated = false
 
KDChartEnums::GranularitySequence sequence = KDChartEnums::GranularitySequence_10_20
 
qreal start = 1.0
 
qreal stepWidth = 1.0
 
qreal subStepWidth = 0.0
 

Detailed Description

Helper class for one dimension of data, e.g. for the rows in a data model, or for the labels of an axis, or for the vertical lines in a grid.

isCalculated specifies whether this dimension's values are calculated or counted. (counted == "Item 1", "Item 2", "Item 3" ...)

sequence is the GranularitySequence, as specified at for the respective coordinate plane.

Step width is an optional parameter, to be omitted (or set to Zero, resp.) if the step width is unknown.

The default c'tor just gets you counted values from 1..10, using step width 1, used by the CartesianGrid, when showing an empty plane without any diagrams.

Definition at line 391 of file KDChartAbstractCoordinatePlane.h.

Constructor & Destructor Documentation

◆ DataDimension() [1/2]

KDChart::DataDimension::DataDimension ( )
inline

Definition at line 394 of file KDChartAbstractCoordinatePlane.h.

◆ DataDimension() [2/2]

KDChart::DataDimension::DataDimension ( qreal  start_,
qreal  end_,
bool  isCalculated_,
AbstractCoordinatePlane::AxesCalcMode  calcMode_,
KDChartEnums::GranularitySequence  sequence_,
qreal  stepWidth_ = 0.0,
qreal  subStepWidth_ = 0.0 
)
inline

Definition at line 397 of file KDChartAbstractCoordinatePlane.h.

Member Function Documentation

◆ distance()

qreal KDChart::DataDimension::distance ( ) const
inline

Returns the size of the distance, equivalent to the width() (or height(), resp.) of a QRectF.

Note that this value can be negative, e.g. indicating axis labels going in reversed direction.

Definition at line 420 of file KDChartAbstractCoordinatePlane.h.

References end, and start.

◆ operator!=()

bool KDChart::DataDimension::operator!= ( const DataDimension other) const
inline

Definition at line 430 of file KDChartAbstractCoordinatePlane.h.

References operator==().

◆ operator==()

bool KDChart::DataDimension::operator== ( const DataDimension r) const
inline

Definition at line 425 of file KDChartAbstractCoordinatePlane.h.

References calcMode, end, isCalculated, sequence, start, stepWidth, and subStepWidth.

Referenced by operator!=().

Member Data Documentation

◆ calcMode

◆ end

qreal KDChart::DataDimension::end = 10.0

◆ isCalculated

bool KDChart::DataDimension::isCalculated = false

◆ sequence

Definition at line 439 of file KDChartAbstractCoordinatePlane.h.

Referenced by KDChart::operator<<(), and operator==().

◆ start

qreal KDChart::DataDimension::start = 1.0

◆ stepWidth

qreal KDChart::DataDimension::stepWidth = 1.0

◆ subStepWidth

qreal KDChart::DataDimension::subStepWidth = 0.0

Definition at line 441 of file KDChartAbstractCoordinatePlane.h.

Referenced by KDChart::operator<<(), and operator==().


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

© 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