KD Chart API Documentation
3.1
src
KDChart
Ternary
KDChartTernaryAxis.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 KDCHARTTERNARYAXIS_H
12
#define KDCHARTTERNARYAXIS_H
13
14
#include <
KDChartAbstractAxis.h
>
15
#include <
KDChartPosition.h
>
16
#include <
KDChartTextAttributes.h
>
17
18
class
PrerenderedLabel
;
19
20
namespace
KDChart
{
21
22
class
AbstractTernaryDiagram;
23
27
class
KDCHART_EXPORT
TernaryAxis
:
public
AbstractAxis
28
{
29
Q_OBJECT
30
31
Q_DISABLE_COPY(
TernaryAxis
)
32
KDCHART_DECLARE_PRIVATE_DERIVED_PARENT
(
TernaryAxis
,
AbstractDiagram
*)
33
34
public
:
35
explicit
TernaryAxis
(
AbstractTernaryDiagram
*diagram =
nullptr
);
36
~
TernaryAxis
()
override
;
37
38
void
paintAll(QPainter &)
override
;
39
void
paint(QPainter *)
override
;
40
void
paintCtx(
PaintContext
*)
override
;
41
42
QRect geometry()
const override
;
43
void
setGeometry(
const
QRect &rect)
override
;
44
45
bool
isEmpty()
const override
;
46
QSize minimumSize()
const override
;
47
QSize maximumSize()
const override
;
48
QSize sizeHint()
const override
;
49
Qt::Orientations expandingDirections()
const override
;
50
51
virtual
const
Position
position()
const
;
52
virtual
void
setPosition(
Position
p);
53
54
void
setTitleText(
const
QString &text);
55
QString titleText()
const
;
56
void
setTitleTextAttributes(
const
TextAttributes
&a);
57
TextAttributes
titleTextAttributes()
const
;
58
void
resetTitleTextAttributes();
59
bool
hasDefaultTitleTextAttributes()
const
;
60
61
QPair<QSizeF, QSizeF> requiredMargins()
const
;
62
63
private
:
64
void
updatePrerenderedLabels();
65
// TODO, move class variables to private class
66
QRect m_geometry;
67
Position
m_position;
68
69
QString m_title;
70
TextAttributes
m_titleAttributes;
71
72
// FIXME (Mirko): Move axis labels from grid to here, do not
73
// expose them, just paint them. Use title text for text. Make
74
// a function to allow the coordinate plane to calculate the
75
// necessary margins, like this:
76
PrerenderedLabel
*m_label;
77
PrerenderedLabel
*m_fifty;
78
};
79
80
typedef
QList<TernaryAxis *>
TernaryAxisList
;
81
}
82
83
#endif
KDChartAbstractAxis.h
KDCHART_DECLARE_PRIVATE_DERIVED_PARENT
#define KDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)
Definition:
KDChartGlobal.h:50
KDChartPosition.h
KDChartTextAttributes.h
KDChart::AbstractAxis
Definition:
KDChartAbstractAxis.h:45
KDChart::AbstractDiagram
AbstractDiagram defines the interface for diagram classes.
Definition:
KDChartAbstractDiagram.h:39
KDChart::AbstractTernaryDiagram
Base class for diagrams based on a ternary coordinate plane.
Definition:
KDChartAbstractTernaryDiagram.h:26
KDChart::PaintContext
Stores information about painting diagrams.
Definition:
KDChartPaintContext.h:30
KDChart::Position
Defines a position, using compass terminology.
Definition:
KDChartPosition.h:63
KDChart::TernaryAxis
Definition:
KDChartTernaryAxis.h:28
KDChart::TextAttributes
A set of text attributes.
Definition:
KDChartTextAttributes.h:35
PrerenderedLabel
PrerenderedLabel is an internal KDChart class that simplifies creation and caching of cached text lab...
Definition:
KDChartTextLabelCache.h:89
KDChart
Definition:
CartesianCoordinateTransformation.h:23
KDChart::TernaryAxisList
QList< TernaryAxis * > TernaryAxisList
Definition:
KDChartTernaryAxis.h:80
© 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