KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDChart::GridAttributes Class Reference

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

#include <KDChartGridAttributes.h>

Public Member Functions

 GridAttributes ()
 
 GridAttributes (const GridAttributes &)
 
 ~GridAttributes ()
 
bool adjustLowerBoundToGrid () const
 
bool adjustUpperBoundToGrid () const
 
KDChartEnums::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 (KDChartEnums::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 27 of file KDChartGridAttributes.h.

Constructor & Destructor Documentation

◆ GridAttributes() [1/2]

GridAttributes::GridAttributes ( )

Definition at line 54 of file KDChartGridAttributes.cpp.

◆ GridAttributes() [2/2]

GridAttributes::GridAttributes ( const GridAttributes r)

Definition at line 60 of file KDChartGridAttributes.cpp.

◆ ~GridAttributes()

GridAttributes::~GridAttributes ( )

Definition at line 75 of file KDChartGridAttributes.cpp.

Member Function Documentation

◆ adjustLowerBoundToGrid()

bool GridAttributes::adjustLowerBoundToGrid ( ) const

Definition at line 208 of file KDChartGridAttributes.cpp.

References d.

Referenced by KDChart::CartesianGrid::drawGrid(), and operator==().

◆ adjustUpperBoundToGrid()

bool GridAttributes::adjustUpperBoundToGrid ( ) const

Definition at line 212 of file KDChartGridAttributes.cpp.

References d.

Referenced by KDChart::CartesianGrid::drawGrid(), and operator==().

◆ gridGranularitySequence()

KDChartEnums::GranularitySequence GridAttributes::gridGranularitySequence ( ) const

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

See also
setGridGranularitySequence

Definition at line 198 of file KDChartGridAttributes.cpp.

References d.

Referenced by operator==().

◆ gridPen()

QPen GridAttributes::gridPen ( ) const

Definition at line 223 of file KDChartGridAttributes.cpp.

References d.

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

◆ gridStepWidth()

qreal GridAttributes::gridStepWidth ( ) const

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

See also
setGridStepWidth

Definition at line 135 of file KDChartGridAttributes.cpp.

References d.

Referenced by operator<<().

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

References d.

Referenced by operator<<().

◆ isGridVisible()

bool GridAttributes::isGridVisible ( ) const

◆ isOuterLinesVisible()

bool GridAttributes::isOuterLinesVisible ( ) const

Definition at line 254 of file KDChartGridAttributes.cpp.

References d.

Referenced by KDChart::CartesianGrid::drawGrid(), and operator==().

◆ isSubGridVisible()

bool GridAttributes::isSubGridVisible ( ) const

Definition at line 233 of file KDChartGridAttributes.cpp.

References d.

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

◆ linesOnAnnotations()

bool GridAttributes::linesOnAnnotations ( ) const

Definition at line 101 of file KDChartGridAttributes.cpp.

References d.

Referenced by KDChart::CartesianGrid::drawGrid(), and operator==().

◆ operator!=()

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

Definition at line 98 of file KDChartGridAttributes.h.

References KDChart::operator==().

◆ operator=()

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

Definition at line 65 of file KDChartGridAttributes.cpp.

References d.

◆ operator==()

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

◆ 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 203 of file KDChartGridAttributes.cpp.

References d.

◆ setGridGranularitySequence()

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

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

See details explained at KDChartEnums::GranularitySequence.

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

See also
setAdjustBoundsToGrid, GranularitySequence

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

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 187 of file KDChartGridAttributes.cpp.

References d.

◆ setGridPen()

void GridAttributes::setGridPen ( const QPen pen)

Definition at line 217 of file KDChartGridAttributes.cpp.

References d, Qt::FlatCap, and QPen::setCapStyle().

◆ 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 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 124 of file KDChartGridAttributes.cpp.

References d.

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

References d.

◆ setGridVisible()

void GridAttributes::setGridVisible ( bool  visible)

Definition at line 86 of file KDChartGridAttributes.cpp.

References d.

◆ 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 96 of file KDChartGridAttributes.cpp.

References d.

◆ setOuterLinesVisible()

void GridAttributes::setOuterLinesVisible ( bool  visible)

Definition at line 249 of file KDChartGridAttributes.cpp.

References d.

◆ setSubGridPen()

void GridAttributes::setSubGridPen ( const QPen pen)

Definition at line 238 of file KDChartGridAttributes.cpp.

References d, Qt::FlatCap, and QPen::setCapStyle().

◆ setSubGridVisible()

void GridAttributes::setSubGridVisible ( bool  visible)

Definition at line 228 of file KDChartGridAttributes.cpp.

References d.

◆ setZeroLinePen()

void GridAttributes::setZeroLinePen ( const QPen pen)

Definition at line 259 of file KDChartGridAttributes.cpp.

References d, Qt::FlatCap, and QPen::setCapStyle().

◆ subGridPen()

QPen GridAttributes::subGridPen ( ) const

Definition at line 244 of file KDChartGridAttributes.cpp.

References d.

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

◆ zeroLinePen()

QPen GridAttributes::zeroLinePen ( ) const

Definition at line 265 of file KDChartGridAttributes.cpp.

References d.

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


The documentation for this class was generated from the following files:

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Fri Apr 26 2024 00:04:57 for KD Chart API Documentation by doxygen 1.9.8