KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartAbstractGrid.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Chart library.
4**
5** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef KDCHARTABSTRACTGRID_H
12#define KDCHARTABSTRACTGRID_H
13
14#include <QPair>
15
20
21namespace KDChart {
22
23class PaintContext;
24
35{
36public:
37 virtual ~AbstractGrid();
38
39protected:
41
42public:
49
60 virtual void drawGrid(PaintContext *context) = 0;
61
68 void setNeedRecalculate();
69
76 static bool isBoundariesValid(const QRectF &r);
77
84 static bool isBoundariesValid(const QPair<QPointF, QPointF> &b);
85
93 static bool isBoundariesValid(const DataDimensionsList &l);
94
98 static bool isValueValid(const qreal &r);
99
104 static void adjustLowerUpperRange(
105 qreal &start, qreal &end,
106 qreal stepWidth,
107 bool adjustLower, bool adjustUpper);
108
116 const DataDimension &dim,
117 bool adjustLower, bool adjustUpper);
118
120
121protected:
124
125private:
140 virtual DataDimensionsList calculateGrid(const DataDimensionsList &rawDataDimensions) const = 0;
141 DataDimensionsList mCachedRawDataDimensions;
142};
143}
144
145#endif
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
DataDimensionsList updateData(AbstractCoordinatePlane *plane)
Returns the cached result of data calculation.
DataDimensionsList mDataDimensions
AbstractCoordinatePlane * mPlane
static bool isValueValid(const qreal &r)
virtual void drawGrid(PaintContext *context)=0
static void adjustLowerUpperRange(qreal &start, qreal &end, qreal stepWidth, bool adjustLower, bool adjustUpper)
static const DataDimension adjustedLowerUpperRange(const DataDimension &dim, bool adjustLower, bool adjustUpper)
static bool isBoundariesValid(const QRectF &r)
Helper class for one dimension of data, e.g. for the rows in a data model, or for the labels of an ax...
A set of attributes controlling the appearance of grids.
Stores information about painting diagrams.

© 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 Wed May 1 2024 00:01:10 for KD Chart API Documentation by doxygen 1.9.8