KD Chart 2
[rev.2.7]
|
A set of attributes controlling the appearance of grids. More...
#include <KDChartGridAttributes.h>
Public Member Functions | |
bool | adjustLowerBoundToGrid () const |
bool | adjustUpperBoundToGrid () const |
GridAttributes () | |
GridAttributes (const GridAttributes &) | |
KDChartEnums::GranularitySequence | gridGranularitySequence () const |
Returns the granularity sequence to be used for calculating the grid lines. More... | |
QPen | gridPen () const |
qreal | gridStepWidth () const |
Returns the step width to be used for calculating the grid lines. More... | |
qreal | gridSubStepWidth () const |
Returns the sub-step width to be used for calculating the sub-grid lines. More... | |
bool | isGridVisible () const |
bool | isOuterLinesVisible () const |
bool | isSubGridVisible () const |
bool | linesOnAnnotations () const |
bool | operator!= (const GridAttributes &other) const |
GridAttributes & | operator= (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. More... | |
void | setGridGranularitySequence (KDChartEnums::GranularitySequence sequence) |
Specify which granularity sequence is to be used to find a matching grid granularity. More... | |
void | setGridPen (const QPen &pen) |
void | setGridStepWidth (qreal stepWidth=0.0) |
Specifies the step width to be used for calculating the grid lines. More... | |
void | setGridSubStepWidth (qreal subStepWidth=0.0) |
Specifies the sub-step width to be used for calculating the grid sub-lines. More... | |
void | setGridVisible (bool visible) |
void | setLinesOnAnnotations (bool) |
When this is enabled, grid lines are drawn only where axis annotations are. More... | |
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 () | |
A set of attributes controlling the appearance of grids.
Definition at line 39 of file KDChartGridAttributes.h.
GridAttributes::GridAttributes | ( | ) |
Definition at line 74 of file KDChartGridAttributes.cpp.
GridAttributes::GridAttributes | ( | const GridAttributes & | r | ) |
Definition at line 80 of file KDChartGridAttributes.cpp.
GridAttributes::~GridAttributes | ( | ) |
Definition at line 95 of file KDChartGridAttributes.cpp.
bool GridAttributes::adjustLowerBoundToGrid | ( | ) | const |
Definition at line 239 of file KDChartGridAttributes.cpp.
References d.
Referenced by allAxisAnnotations(), and operator==().
bool GridAttributes::adjustUpperBoundToGrid | ( | ) | const |
Definition at line 243 of file KDChartGridAttributes.cpp.
References d.
Referenced by allAxisAnnotations(), and operator==().
KDChartEnums::GranularitySequence GridAttributes::gridGranularitySequence | ( | ) | const |
Returns the granularity sequence to be used for calculating the grid lines.
Definition at line 229 of file KDChartGridAttributes.cpp.
References d.
Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList(), and operator==().
QPen GridAttributes::gridPen | ( | ) | const |
Definition at line 254 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.
Definition at line 165 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.
Definition at line 196 of file KDChartGridAttributes.cpp.
References d.
Referenced by KDChart::CartesianCoordinatePlane::getDataDimensionsList(), and operator<<().
bool GridAttributes::isGridVisible | ( | ) | const |
Definition at line 121 of file KDChartGridAttributes.cpp.
References d.
Referenced by operator<<(), and operator==().
bool GridAttributes::isOuterLinesVisible | ( | ) | const |
bool GridAttributes::isSubGridVisible | ( | ) | const |
Definition at line 264 of file KDChartGridAttributes.cpp.
References d.
Referenced by operator<<(), and operator==().
bool GridAttributes::linesOnAnnotations | ( | ) | const |
bool KDChart::GridAttributes::operator!= | ( | const GridAttributes & | other | ) | const |
Definition at line 110 of file KDChartGridAttributes.h.
References KDCHART_DECLARE_PRIVATE_BASE_VALUE, KDCHART_DECLARE_SWAP_SPECIALISATION, KDChart::operator<<(), KDGantt::operator==(), and Q_DECLARE_TYPEINFO().
GridAttributes & GridAttributes::operator= | ( | const GridAttributes & | r | ) |
Definition at line 85 of file KDChartGridAttributes.cpp.
References d.
bool GridAttributes::operator== | ( | const GridAttributes & | r | ) | const |
Definition at line 101 of file KDChartGridAttributes.cpp.
References adjustLowerBoundToGrid(), adjustUpperBoundToGrid(), gridGranularitySequence(), gridPen(), isGridVisible(), isOuterLinesVisible(), isSubGridVisible(), linesOnAnnotations(), subGridPen(), and zeroLinePen().
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.
Definition at line 234 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.
By default the GridAttributes class uses KDChartEnums::GranularitySequence_10_20.
sequence | one of the sequences declared in KDChartEnums::GranularitySequence. |
Definition at line 218 of file KDChartGridAttributes.cpp.
References d.
void GridAttributes::setGridPen | ( | const QPen & | pen | ) |
Definition at line 248 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.
By default the GridAttributes class does not use a fixed step width, but it uses KDChartEnums::GranularitySequence_10_20.
stepWidth | the 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. |
Definition at line 154 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.
subStepWidth | the 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. |
Definition at line 185 of file KDChartGridAttributes.cpp.
References d.
void GridAttributes::setGridVisible | ( | bool | visible | ) |
Definition at line 116 of file KDChartGridAttributes.cpp.
References d.
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 126 of file KDChartGridAttributes.cpp.
References d.
void GridAttributes::setOuterLinesVisible | ( | bool | visible | ) |
Definition at line 280 of file KDChartGridAttributes.cpp.
References d.
void GridAttributes::setSubGridPen | ( | const QPen & | pen | ) |
Definition at line 269 of file KDChartGridAttributes.cpp.
References d.
void GridAttributes::setSubGridVisible | ( | bool | visible | ) |
Definition at line 259 of file KDChartGridAttributes.cpp.
References d.
void GridAttributes::setZeroLinePen | ( | const QPen & | pen | ) |
Definition at line 290 of file KDChartGridAttributes.cpp.
References d.
QPen GridAttributes::subGridPen | ( | ) | const |
Definition at line 275 of file KDChartGridAttributes.cpp.
References d.
Referenced by operator<<(), and operator==().
QPen GridAttributes::zeroLinePen | ( | ) | const |
Definition at line 296 of file KDChartGridAttributes.cpp.
References d.
Referenced by operator<<(), and operator==().