KD Chart 2
[rev.2.7]
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
KDChart
Ternary
KDChartAbstractTernaryDiagram.cpp
Go to the documentation of this file.
1
/****************************************************************************
2
** Copyright (C) 2001-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3
**
4
** This file is part of the KD Chart library.
5
**
6
** Licensees holding valid commercial KD Chart licenses may use this file in
7
** accordance with the KD Chart Commercial License Agreement provided with
8
** the Software.
9
**
10
**
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 and version 3 as published by the
13
** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14
**
15
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17
**
18
** Contact info@kdab.com if any conditions of this licensing are not
19
** clear to you.
20
**
21
**********************************************************************/
22
23
#include "
KDChartAbstractTernaryDiagram.h
"
24
#include "KDChartAbstractTernaryDiagram_p.h"
25
26
#include "
KDChartTernaryCoordinatePlane.h
"
27
28
using namespace
KDChart
;
29
30
AbstractTernaryDiagram::Private::Private()
31
:
AbstractDiagram
::Private()
32
{
33
}
34
35
void
AbstractTernaryDiagram::init()
36
{
37
}
38
39
#define d d_func()
40
41
AbstractTernaryDiagram::AbstractTernaryDiagram(
QWidget
*
parent
,
42
TernaryCoordinatePlane
* plane )
43
:
AbstractDiagram
( parent, plane )
44
{
45
}
46
47
AbstractTernaryDiagram::~AbstractTernaryDiagram()
48
{
49
while
( !
d
->axesList.isEmpty() ) {
50
TernaryAxis
* axis =
d
->axesList.takeFirst();
51
delete
axis;
52
}
53
}
54
55
void
AbstractTernaryDiagram::addAxis(
TernaryAxis
* axis )
56
{
57
d
->axesList.append( axis );
58
// FIXME update
59
}
60
61
void
AbstractTernaryDiagram::takeAxis(
TernaryAxis
* axis )
62
{
63
64
int
index =
d
->axesList.indexOf( axis );
65
if
( index != -1 )
66
d
->axesList.removeAt( index );
67
// FIXME update
68
}
69
70
TernaryAxisList
AbstractTernaryDiagram::axes()
const
71
{
72
return
d
->axesList;
73
}
74
75
void
AbstractTernaryDiagram::paint (
PaintContext
*paintContext)
76
{
77
d
->paint( paintContext );
78
}
79
KDChart::TernaryCoordinatePlane
Ternary coordinate plane.
Definition:
KDChartTernaryCoordinatePlane.h:35
KDChartTernaryCoordinatePlane.h
KDChart
Definition:
KDChartAbstractCartesianDiagram.h:30
KDChart::AbstractProxyModel::parent
QModelIndex parent(const QModelIndex &index) const override
Definition:
KDChartAbstractProxyModel.cpp:94
KDChart::AbstractDiagram
AbstractDiagram defines the interface for diagram classes.
Definition:
KDChartAbstractDiagram.h:50
d
#define d
Definition:
KDChartAbstractTernaryDiagram.cpp:39
KDChart::TernaryAxis
The class for ternary axes.
Definition:
KDChartTernaryAxis.h:40
KDChartAbstractTernaryDiagram.h
KDChart::PaintContext
Stores information about painting diagrams.
Definition:
KDChartPaintContext.h:41
QList
Definition:
KDChartPosition.h:36
QWidget
Class only listed here to document inheritance of some KDChart classes.
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/