KChart::GridAttributes

Search for usage in LXR

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 25 of file KChartGridAttributes.h.

Member Function Documentation

◆ gridGranularitySequence()

KChartEnums::GranularitySequence GridAttributes::gridGranularitySequence ( ) const

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

See also
setGridGranularitySequence

Definition at line 149 of file KChartGridAttributes.cpp.

◆ gridStepWidth()

qreal GridAttributes::gridStepWidth ( ) const

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

See also
setGridStepWidth

Definition at line 127 of file KChartGridAttributes.cpp.

◆ gridSubStepWidth()

qreal GridAttributes::gridSubStepWidth ( ) const

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

See also
setGridStepWidth

Definition at line 139 of file KChartGridAttributes.cpp.

◆ setAdjustBoundsToGrid()

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

◆ setGridGranularitySequence()

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

◆ setGridStepWidth()

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

◆ setGridSubStepWidth()

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

◆ setLinesOnAnnotations()

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 112 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-2023 The KDE developers.
Generated on Mon May 8 2023 03:59:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.