2
KDChart - a multi-platform charting engine
5
/****************************************************************************
6
** Copyright (C) 2005-2007 Klarälvdalens Datakonsult AB. All rights reserved.
8
** This file is part of the KD Chart library.
10
** This file may be used under the terms of the GNU General Public
11
** License versions 2.0 or 3.0 as published by the Free Software
12
** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
13
** included in the packaging of this file. Alternatively you may (at
14
** your option) use any later version of the GNU General Public
15
** License if such license has been publicly approved by
16
** Klarälvdalens Datakonsult AB (or its successors, if any).
18
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
19
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
20
** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
21
** not expressly granted herein.
23
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26
**********************************************************************/
28
#ifndef KDCHARTTERNARYGRID_H
29
#define KDCHARTTERNARYGRID_H
33
#include "KDChartAbstractGrid.h"
34
#include "PrerenderedElements/KDChartTextLabelCache.h"
39
TickInfo( double percentage = 0, int depth = 0 );
44
bool operator==(const TickInfo&, const TickInfo& );
48
// VERIFY: Grids are not public API, are they?
49
class TernaryGrid : public AbstractGrid
54
virtual ~TernaryGrid();
56
void drawGrid( PaintContext* context );
57
DataDimensionsList calculateGrid( const DataDimensionsList& rawDataDimensions ) const;
59
/** Returns two QSizeF objects specifying the dimension of the
60
margins needed between each corner of the diagram and the
61
border of the drawing area. Margins are required because
62
the tick marks are placed outside of the trianges
64
The margins are returned in <em>diagram coordinates</em>,
65
since the grid does not know about widget coordinates.
67
QPair<QSizeF, QSizeF> requiredMargins() const;
68
/** Return the locations of the grid lines, so that axes can
69
draw axis rulers at the correct positions.
70
This information is valid after the grid has been
71
painted (that is, the axes need to be painted after the
73
const QVector<TickInfo>& tickInfo() const;
75
QVector<TickInfo> m_tickInfo;
76
// QList<PrerenderedLabel> m_labels;