KD Chart API Documentation  3.1
KDChartTernaryGrid.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 KDCHARTTERNARYGRID_H
12 #define KDCHARTTERNARYGRID_H
13 
14 #include <QList>
15 
16 #include "KDChartAbstractGrid.h"
17 #include "KDChartTextLabelCache.h"
18 
19 namespace KDChart {
20 
21 struct TickInfo
22 {
23  TickInfo(qreal percentage = 0, int depth = 0);
24  qreal percentage;
25  int depth;
26 };
27 
28 bool operator==(const TickInfo &, const TickInfo &);
29 
30 class PaintContext;
31 
32 // VERIFY: Grids are not public API, are they?
33 class TernaryGrid : public AbstractGrid
34 {
35 public:
36  TernaryGrid();
37 
38  ~TernaryGrid() override;
39 
40  void drawGrid(PaintContext *context) override;
41  DataDimensionsList calculateGrid(const DataDimensionsList &rawDataDimensions) const override;
42 
51  QPair<QSizeF, QSizeF> requiredMargins() const;
57  const QVector<TickInfo> &tickInfo() const;
58 
59 private:
60  QVector<TickInfo> m_tickInfo;
61  // QList<PrerenderedLabel> m_labels;
62 };
63 }
64 
65 #endif
Stores information about painting diagrams.
void drawGrid(PaintContext *context) override
QPair< QSizeF, QSizeF > requiredMargins() const
DataDimensionsList calculateGrid(const DataDimensionsList &rawDataDimensions) const override
Calculates the grid start/end/step width values.
const QVector< TickInfo > & tickInfo() const
bool operator==(const TickInfo &, const TickInfo &)
QList< DataDimension > DataDimensionsList
TickInfo(qreal percentage=0, int depth=0)

© 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 by doxygen 1.9.1