KChart::GridAttributes

KChart::GridAttributes Class Reference

#include <KChartGridAttributes.h>

Public Member Functions

 GridAttributes (const GridAttributes &)
 
bool adjustLowerBoundToGrid () const
 
bool adjustUpperBoundToGrid () const
 
KChartEnums::GranularitySequence gridGranularitySequence () const
 
QPen gridPen () const
 
qreal gridStepWidth () const
 
qreal gridSubStepWidth () const
 
bool isGridVisible () const
 
bool isOuterLinesVisible () const
 
bool isSubGridVisible () const
 
bool linesOnAnnotations () const
 
bool operator!= (const GridAttributes &other) const
 
GridAttributesoperator= (const GridAttributes &)
 
bool operator== (const GridAttributes &) const
 
void setAdjustBoundsToGrid (bool adjustLower, bool adjustUpper)
 
void setGridGranularitySequence (KChartEnums::GranularitySequence sequence)
 
void setGridPen (const QPen &pen)
 
void setGridStepWidth (qreal stepWidth=0.0)
 
void setGridSubStepWidth (qreal subStepWidth=0.0)
 
void setGridVisible (bool visible)
 
void setLinesOnAnnotations (bool)
 
void setOuterLinesVisible (bool visible)
 
void setSubGridPen (const QPen &pen)
 
void setSubGridVisible (bool visible)
 
void setZeroLinePen (const QPen &pen)
 
QPen subGridPen () const
 
QPen zeroLinePen () const
 

Detailed Description

A set of attributes controlling the appearance of grids.

Definition at line 36 of file KChartGridAttributes.h.

Member Function Documentation

KChartEnums::GranularitySequence GridAttributes::gridGranularitySequence ( ) const

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

See also
setGridGranularitySequence

Definition at line 160 of file KChartGridAttributes.cpp.

qreal GridAttributes::gridStepWidth ( ) const

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

See also
setGridStepWidth

Definition at line 138 of file KChartGridAttributes.cpp.

qreal GridAttributes::gridSubStepWidth ( ) const

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

See also
setGridStepWidth

Definition at line 150 of file KChartGridAttributes.cpp.

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 165 of file KChartGridAttributes.cpp.

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

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

By default the GridAttributes class uses KChartEnums::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 KChartEnums::GranularitySequence.
See also
gridGranularitySequence, setStepWidth

Definition at line 155 of file KChartGridAttributes.cpp.

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 KChartEnums::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 133 of file KChartGridAttributes.cpp.

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 145 of file KChartGridAttributes.cpp.

void GridAttributes::setLinesOnAnnotations ( bool  b)

When this is enabled, grid lines are drawn only where axis annotations are.

Otherwise annotations are disregarded as far as the grid is concerned.

The default is false.

Definition at line 123 of file KChartGridAttributes.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 9 2020 22:38:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.