KD Chart 2 [rev.2.4]

KDChart::GridAttributes Class Reference

A set of attributes controlling the appearance of grids. More...

#include <KDChartGridAttributes.h>

List of all members.

Public Member Functions

bool adjustLowerBoundToGrid () const
bool adjustUpperBoundToGrid () const
 GridAttributes (const GridAttributes &)
 GridAttributes ()
KDChartEnums::GranularitySequence gridGranularitySequence () const
 Returns the granularity sequence to be used for calculating the grid lines.
QPen gridPen () const
qreal gridStepWidth () const
 Returns the step width to be used for calculating the grid lines.
qreal gridSubStepWidth () const
 Returns the sub-step width to be used for calculating the sub-grid lines.
bool isGridVisible () const
bool isOuterLinesVisible () const
bool isSubGridVisible () const
bool operator!= (const GridAttributes &other) const
GridAttributesoperator= (const GridAttributes &)
bool operator== (const GridAttributes &) const
void setAdjustBoundsToGrid (bool adjustLower, bool adjustUpper)
 By default visible bounds of the data area are adjusted to match a main grid line.
void setGridGranularitySequence (KDChartEnums::GranularitySequence sequence)
 Specify which granularity sequence is to be used to find a matching grid granularity.
void setGridPen (const QPen &pen)
void setGridStepWidth (qreal stepWidth=0.0)
 Specifies the step width to be used for calculating the grid lines.
void setGridSubStepWidth (qreal subStepWidth=0.0)
 Specifies the sub-step width to be used for calculating the grid sub-lines.
void setGridVisible (bool visible)
void setOuterLinesVisible (bool visible)
void setSubGridPen (const QPen &pen)
void setSubGridVisible (bool visible)
void setZeroLinePen (const QPen &pen)
QPen subGridPen () const
QPen zeroLinePen () const
 ~GridAttributes ()

Detailed Description

A set of attributes controlling the appearance of grids.

Definition at line 37 of file KDChartGridAttributes.h.


Constructor & Destructor Documentation

GridAttributes::GridAttributes ( )

Definition at line 72 of file KDChartGridAttributes.cpp.

GridAttributes::GridAttributes ( const GridAttributes r)

Definition at line 78 of file KDChartGridAttributes.cpp.

GridAttributes::~GridAttributes ( )

Definition at line 93 of file KDChartGridAttributes.cpp.


Member Function Documentation

bool GridAttributes::adjustLowerBoundToGrid ( ) const

Definition at line 226 of file KDChartGridAttributes.cpp.

References d.

Referenced by operator==().

bool GridAttributes::adjustUpperBoundToGrid ( ) const

Definition at line 230 of file KDChartGridAttributes.cpp.

References d.

Referenced by operator==().

KDChartEnums::GranularitySequence GridAttributes::gridGranularitySequence ( ) const

Returns the granularity sequence to be used for calculating the grid lines.

See also:
setGridGranularitySequence

Definition at line 216 of file KDChartGridAttributes.cpp.

References d.

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

QPen GridAttributes::gridPen ( ) const

Definition at line 241 of file KDChartGridAttributes.cpp.

References d.

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

qreal GridAttributes::gridStepWidth ( ) const

Returns the step width to be used for calculating the grid lines.

See also:
setGridStepWidth

Definition at line 152 of file KDChartGridAttributes.cpp.

References d.

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

qreal GridAttributes::gridSubStepWidth ( ) const

Returns the sub-step width to be used for calculating the sub-grid lines.

See also:
setGridStepWidth

Definition at line 183 of file KDChartGridAttributes.cpp.

References d.

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

bool GridAttributes::isGridVisible ( ) const

Definition at line 118 of file KDChartGridAttributes.cpp.

References d.

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

bool GridAttributes::isOuterLinesVisible ( ) const

Definition at line 272 of file KDChartGridAttributes.cpp.

References d.

Referenced by operator==().

bool GridAttributes::isSubGridVisible ( ) const

Definition at line 251 of file KDChartGridAttributes.cpp.

References d.

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

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

Definition at line 104 of file KDChartGridAttributes.h.

References KDGantt::operator==().

GridAttributes & GridAttributes::operator= ( const GridAttributes r)

Definition at line 83 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setAdjustBoundsToGrid ( bool  adjustLower,
bool  adjustUpper 
)

By default visible bounds of the data area are adjusted to match a main grid line.

If you set the respective adjust flag to false the bound will not start at a grid line's value but it will be the exact value of the data range set.

See also:
CartesianCoordinatePlane::setHorizontalRange
CartesianCoordinatePlane::setVerticalRange

Definition at line 221 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setGridGranularitySequence ( KDChartEnums::GranularitySequence  sequence)

Specify which granularity sequence is to be used to find a matching grid granularity.

Specifies the granularity sequence to be used for calculating the grid lines.

See details explained at KDChartEnums::GranularitySequence.

You might also want to use setAdjustBoundsToGrid for fine-tuning the start/end value.

See also:
setAdjustBoundsToGrid, GranularitySequence

By default the GridAttributes class uses KDChartEnums::GranularitySequence_10_20.

Note:
Granularity can be set for Linear axis calculation mode only, there is no way to specify a step width for Logarithmic axes.
The sequence specified by this method is ignored, if a fixed step width was specified via setStepWidth.
Parameters:
sequenceone of the sequences declared in KDChartEnums::GranularitySequence.
See also:
gridGranularitySequence, setStepWidth

Definition at line 205 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setGridPen ( const QPen &  pen)

Definition at line 235 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setGridStepWidth ( qreal  stepWidth = 0.0)

Specifies the step width to be used for calculating the grid lines.

Note:
Step with can be set for Linear axis calculation mode only, there is no way to specify a step width for Logarithmic axes.

By default the GridAttributes class does not use a fixed step width, but it uses KDChartEnums::GranularitySequence_10_20.

Parameters:
stepWidththe step width to be used. If this parameter is omitted (or set to Zero, resp.) the automatic step width calculation will be done, using the granularity sequence specified. This is the default.
See also:
gridStepWidth, setGranularitySequence

Definition at line 141 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setGridSubStepWidth ( qreal  subStepWidth = 0.0)

Specifies the sub-step width to be used for calculating the grid sub-lines.

Parameters:
subStepWidththe sub-step width to be used. If this parameter is omitted (or set to Zero, resp.) the automatic calculation will be done, using the granularity sequence specified. This is the default.
See also:
gridSubStepWidth

Definition at line 172 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setGridVisible ( bool  visible)

Definition at line 113 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setOuterLinesVisible ( bool  visible)

Definition at line 267 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setSubGridPen ( const QPen &  pen)

Definition at line 256 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setSubGridVisible ( bool  visible)

Definition at line 246 of file KDChartGridAttributes.cpp.

References d.

void GridAttributes::setZeroLinePen ( const QPen &  pen)

Definition at line 277 of file KDChartGridAttributes.cpp.

References d.

QPen GridAttributes::subGridPen ( ) const

Definition at line 262 of file KDChartGridAttributes.cpp.

References d.

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

QPen GridAttributes::zeroLinePen ( ) const

Definition at line 283 of file KDChartGridAttributes.cpp.

References d.

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/