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.

Constructor & Destructor Documentation

◆ GridAttributes() [1/2]

GridAttributes::GridAttributes ( )

Definition at line 60 of file KChartGridAttributes.cpp.

◆ GridAttributes() [2/2]

GridAttributes::GridAttributes ( const GridAttributes & r)

Definition at line 66 of file KChartGridAttributes.cpp.

◆ ~GridAttributes()

GridAttributes::~GridAttributes ( )

Definition at line 81 of file KChartGridAttributes.cpp.

Member Function Documentation

◆ adjustLowerBoundToGrid()

bool GridAttributes::adjustLowerBoundToGrid ( ) const

Definition at line 159 of file KChartGridAttributes.cpp.

◆ adjustUpperBoundToGrid()

bool GridAttributes::adjustUpperBoundToGrid ( ) const

Definition at line 163 of file KChartGridAttributes.cpp.

◆ 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.

◆ gridPen()

QPen GridAttributes::gridPen ( ) const

Definition at line 174 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.

◆ isGridVisible()

bool GridAttributes::isGridVisible ( ) const

Definition at line 107 of file KChartGridAttributes.cpp.

◆ isOuterLinesVisible()

bool GridAttributes::isOuterLinesVisible ( ) const

Definition at line 205 of file KChartGridAttributes.cpp.

◆ isSubGridVisible()

bool GridAttributes::isSubGridVisible ( ) const

Definition at line 184 of file KChartGridAttributes.cpp.

◆ linesOnAnnotations()

bool GridAttributes::linesOnAnnotations ( ) const

Definition at line 117 of file KChartGridAttributes.cpp.

◆ operator!=()

bool KChart::GridAttributes::operator!= ( const GridAttributes & other) const
inline

Definition at line 156 of file KChartGridAttributes.h.

◆ operator=()

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

Definition at line 71 of file KChartGridAttributes.cpp.

◆ operator==()

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

Definition at line 87 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.

◆ setGridPen()

void GridAttributes::setGridPen ( const QPen & pen)

Definition at line 168 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.

◆ setGridVisible()

void GridAttributes::setGridVisible ( bool visible)

Definition at line 102 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.

◆ setOuterLinesVisible()

void GridAttributes::setOuterLinesVisible ( bool visible)

Definition at line 200 of file KChartGridAttributes.cpp.

◆ setSubGridPen()

void GridAttributes::setSubGridPen ( const QPen & pen)

Definition at line 189 of file KChartGridAttributes.cpp.

◆ setSubGridVisible()

void GridAttributes::setSubGridVisible ( bool visible)

Definition at line 179 of file KChartGridAttributes.cpp.

◆ setZeroLinePen()

void GridAttributes::setZeroLinePen ( const QPen & pen)

Definition at line 210 of file KChartGridAttributes.cpp.

◆ subGridPen()

QPen GridAttributes::subGridPen ( ) const

Definition at line 195 of file KChartGridAttributes.cpp.

◆ zeroLinePen()

QPen GridAttributes::zeroLinePen ( ) const

Definition at line 216 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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.