KChart

KChartLeveyJenningsGrid.h
1 /*
2  * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef KCHARTLEVEYJENNINGSGRID_H
21 #define KCHARTLEVEYJENNINGSGRID_H
22 
23 #include "KChartCartesianGrid.h"
24 
25 namespace KChart {
26 
27  class PaintContext;
28 
40  {
41  public:
43  virtual ~LeveyJenningsGrid() {}
44 
45  void drawGrid( PaintContext* context ) override;
46 
47  private:
48  DataDimensionsList calculateGrid( const DataDimensionsList& rawDataDimensions ) const override;
49  DataDimension calculateGridXY( const DataDimension& rawDataDimension,
50  Qt::Orientation orientation, bool adjustLower, bool adjustUpper ) const override;
51  void calculateStepWidth( qreal start_, qreal end_, const QList<qreal>& granularities, Qt::Orientation orientation,
52  qreal& stepWidth, qreal& subStepWidth, bool adjustLower, bool adjustUpper ) const override;
53  };
54 
55 }
56 
57 #endif
Helper class for one dimension of data, e.g.
void drawGrid(PaintContext *context) override
Doing the actual drawing.
Stores information about painting diagrams.
Class for the grid in a cartesian plane.
Class for the grid in a Levey Jennings plane.
Orientation
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 14 2021 22:38:05 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.