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

00351             : start(         1.0 )
00352             , end(          10.0 )
00353             , isCalculated( false )
00354             , calcMode( AbstractCoordinatePlane::Linear )
00355             , sequence( KDChartEnums::GranularitySequence_10_20 )
00356             , stepWidth(    1.0 )
00357             , subStepWidth( 0.0 )
00358         {}

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

00366             : start(        start_ )
00367             , end(          end_ )
00368             , isCalculated( isCalculated_ )
00369             , calcMode(     calcMode_ )
00370             , sequence(     sequence_ )
00371             , stepWidth(    stepWidth_ )
00372             , subStepWidth( subStepWidth_ )
00373         {}


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

References end, and start.

Referenced by KDChart::CartesianCoordinatePlane::layoutDiagrams().

00382         {
00383             return end-start;
00384         }

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

Definition at line 398 of file KDChartAbstractCoordinatePlane.h.

References operator==().

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

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

Definition at line 386 of file KDChartAbstractCoordinatePlane.h.

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

Referenced by operator!=().

00387         {
00388             return
00389                 (start        == r.start) &&
00390                 (end          == r.end) &&
00391                 (sequence     == r.sequence) &&
00392                 (isCalculated == r.isCalculated) &&
00393                 (calcMode     == r.calcMode) &&
00394                 (stepWidth    == r.stepWidth) &&
00395                 (subStepWidth    == r.subStepWidth);
00396         }


Member Data Documentation

AbstractCoordinatePlane::AxesCalcMode KDChart::DataDimension::calcMode

Definition at line 405 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::end

Definition at line 403 of file KDChartAbstractCoordinatePlane.h.

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

bool KDChart::DataDimension::isCalculated

Definition at line 404 of file KDChartAbstractCoordinatePlane.h.

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

KDChartEnums::GranularitySequence KDChart::DataDimension::sequence

Definition at line 406 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::start

Definition at line 402 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::stepWidth

Definition at line 407 of file KDChartAbstractCoordinatePlane.h.

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

qreal KDChart::DataDimension::subStepWidth

Definition at line 408 of file KDChartAbstractCoordinatePlane.h.

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


The documentation for this class was generated from the following file:
Generated on Mon Sep 17 16:18:15 2007 for KD Chart 2 by  doxygen 1.5.1