KChart

KChartTernaryGrid.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 KCHARTTERNARYGRID_H
21 #define KCHARTTERNARYGRID_H
22 
23 #include <QList>
24 
25 #include "KChartAbstractGrid.h"
26 #include "KChartTextLabelCache.h"
27 
28 namespace KChart {
29 
30  struct TickInfo {
31  TickInfo( qreal percentage = 0, int depth = 0 );
32  qreal percentage;
33  int depth;
34  };
35 
36  bool operator==(const TickInfo&, const TickInfo& );
37 
38  class PaintContext;
39 
40  // VERIFY: Grids are not public API, are they?
41  class TernaryGrid : public AbstractGrid
42  {
43  public:
44  TernaryGrid();
45 
46  virtual ~TernaryGrid();
47 
48  void drawGrid( PaintContext* context ) override;
49  DataDimensionsList calculateGrid( const DataDimensionsList& rawDataDimensions ) const override;
50 
59  QPair<QSizeF, QSizeF> requiredMargins() const;
65  const QVector<TickInfo>& tickInfo() const;
66  private:
67  QVector<TickInfo> m_tickInfo;
68  // QList<PrerenderedLabel> m_labels;
69  };
70 
71 }
72 
73 #endif
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Sep 24 2020 22:36:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.