KDChart::DataDimension Class Reference

#include <KDChartAbstractCoordinatePlane.h>

Collaboration diagram for KDChart::DataDimension:

Collaboration graph
[legend]

List of all members.


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 371 of file KDChartAbstractCoordinatePlane.h.


Public Member Functions

 DataDimension (qreal start_, qreal end_, bool isCalculated_, AbstractCoordinatePlane::AxesCalcMode calcMode_, KDChartEnums::GranularitySequence sequence_, qreal stepWidth_=0.0, qreal subStepWidth_=0.0)
 DataDimension ()
qreal distance () const
 Returns the size of the distance, equivalent to the width() (or height(), resp.
bool operator!= (const DataDimension &other) const
bool operator== (const DataDimension &r) const

Public Attributes

AbstractCoordinatePlane::AxesCalcMode calcMode
qreal end
bool isCalculated
KDChartEnums::GranularitySequence sequence
qreal start
qreal stepWidth
qreal subStepWidth

Constructor & Destructor Documentation

KDChart::DataDimension::DataDimension (  ) 

Definition at line 373 of file KDChartAbstractCoordinatePlane.h.

00373           :
00374         DataDimension()
00375             : start(         1.0 )
00376             , end(          10.0 )
00377             , isCalculated( false )
00378             , calcMode( AbstractCoordinatePlane::Linear )
00379             , sequence( KDChartEnums::GranularitySequence_10_20 )
00380             , stepWidth(    1.0 )
00381             , subStepWidth( 0.0 )
        {}

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

Definition at line 382 of file KDChartAbstractCoordinatePlane.h.

00382         {}
00383         DataDimension( qreal start_,
00384                        qreal end_,
00385                        bool isCalculated_,
00386                        AbstractCoordinatePlane::AxesCalcMode calcMode_,
00387                        KDChartEnums::GranularitySequence sequence_,
00388                        qreal stepWidth_=0.0,
00389                        qreal subStepWidth_=0.0 )
00390             : start(        start_ )
00391             , end(          end_ )
00392             , isCalculated( isCalculated_ )
00393             , calcMode(     calcMode_ )
00394             , sequence(     sequence_ )
00395             , stepWidth(    stepWidth_ )
00396             , subStepWidth( subStepWidth_ )


Member Function Documentation

qreal KDChart::DataDimension::distance (  )  const

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 404 of file KDChartAbstractCoordinatePlane.h.

Referenced by KDChart::CartesianCoordinatePlane::logicalArea(), and KDChart::CartesianAxis::paintCtx().

00406         {
00407             return end-start;

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

Definition at line 421 of file KDChartAbstractCoordinatePlane.h.

References operator==().

00423         { return !operator==( other ); }

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

Definition at line 409 of file KDChartAbstractCoordinatePlane.h.

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

Referenced by operator!=().

00411         {
00412             return
00413                 (start        == r.start) &&
00414                 (end          == r.end) &&
00415                 (sequence     == r.sequence) &&
00416                 (isCalculated == r.isCalculated) &&
00417                 (calcMode     == r.calcMode) &&
00418                 (stepWidth    == r.stepWidth) &&
00419                 (subStepWidth    == r.subStepWidth);


Member Data Documentation

AbstractCoordinatePlane::AxesCalcMode KDChart::DataDimension::calcMode

Definition at line 428 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::end

Definition at line 426 of file KDChartAbstractCoordinatePlane.h.

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

bool KDChart::DataDimension::isCalculated

Definition at line 427 of file KDChartAbstractCoordinatePlane.h.

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

KDChartEnums::GranularitySequence KDChart::DataDimension::sequence

Definition at line 429 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::start

Definition at line 425 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::stepWidth

Definition at line 430 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::subStepWidth

Definition at line 431 of file KDChartAbstractCoordinatePlane.h.

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


The documentation for this class was generated from the following file:
Generated on Thu Mar 4 23:25:49 2010 for KD Chart 2 by  doxygen 1.5.4